Background jobs status

  1. Scheduled:- You have defined the program name and variant  but not defined start condition like Start Date, End Date , Frequency etc. That means you have not defined when job should be scheduled in system.
  2. Released:- All required criteria are fulfilled for job definition. Start condition is must for the job to be in release status.
  3. Ready:- All the required conditions are met to run the job in a background workprocess. But job scheduler has put the job in the queue because it is waiting for background workprocess to be free.
  4. Active:- Job has started running in the background. We cannot change the status of the job once it is  in Active status.
  5. Finished:- Job is executed successfully. It means desired task is competed without any error.
  6. Cancelled:- There are two possibilities for this. Administrator has forcefully cancelled the jobor there might be some issue with job. You can investigate this from Job logs.

To cancel a job’s “Released” status, select the job or jobs from the Job Overview list and choose Job  Release -> Scheduled.

To cancel a job from running but keep the job definition available, select the job or jobs from the Job Overview list and choose Job  Cancel active job.

To delete a job entirely, select the job or jobs from the Job Overview list and choose Job  Delete. Jobs with the status of Ready or Running cannot be deleted.

To compare the specifications of more than one job, select the jobs from the Job Overview list and choose Job  Compare jobs.

To check the status of jobs, select the job or jobs from the Overview Job list and choose Job  Check status. This allows you to either change the job status back to Planned or cancel the job altogether. This is especially useful when a job has malfunctioned.

To review job logs, select a job or jobs with the status Completed or Canceled from the Job Overview list and choose Goto  Job log.

To release a job so it can run, select a job from the Job Overview list and choose Goto  Release.

STANDARD JOBS- It includes all the jobs which are predefined in REORGJOBS. The transaction code for standard jobs is SM36. All the standard jobs start executing  and we can check its status in SM37. This is known as default scheduling.

The program that monitors all background job is RSUSR000.

Background jobs

SAP background processing allows the automation of routine tasks and the optimization of the use of SAP computing resources. It provides you with extensive functions for scheduling and administering background jobs.

Advantages:-

 

  • It reduces manual effort &  automates the task.
  •  It can be scheduled as per user’s choice.
  •  It reduces user interaction and can run seamlessly in the background without user input
  •  Once you define the variant for background job, the user doesn’t have to worry about value input in the field. Thus, user confusion is also reduced.
  •  Ideal for time- consuming/ resource intensive  programs which can be scheduled to run in the night(when system load is low).

Classification of background jobs:-

  1. Class A (High/critical Priority) :-  Some tasks are urgent or critical and  must be scheduled with class A priority job. Class A priority reserves one or more background work processes. Users have to decide how many background work processes should be assigned to Class A priority job. Suppose a user chooses 2 background work processes for this category then available background work processes for class B and C = (Total number of work processes set in operation modes RZ03)- (Background work processes allowed to class A category).
  2. Class B(Medium Priority):- Once Class A jobs are completed , Class B job will start executing in the background before class C jobs.
  3. Class C(Low Priority):-It runs after both  class A and class B jobs are completed.

 

 

Dynamic and static profile parameters

SAP Profiles parameters are of two types :- 1. Dynamic 2. static Dynamic parameters means, if you change parameters immediately it will effect, no need to restart the system. we will change these values from rz11 But static in the sense , if you change the values , you must restart the server then only it will effect. these values are not applicable to change via RZ10. 

To increase/decrease the number of workprocesses, value to be changed accordingly for the following parameters as per workprocess in RZ10 Transaction.
  • rdisp/wp_no_dia  (for dialog workprocess)
  • rdisp/wp_no_btc  ( for background workprocess)
  • rdisp/wp_no_spo  (for spool workprocess)
  • rdisp/wp_no_enq  (for enqueue workprocess)
  • rdisp/wp_no_vb    (for update workprocess)
  • rdisp/wp_no_vb2  (for update2 workprocess)
In RZ10 transaction, select the profile of the instance, for which workprocess number to be changed and edit the profile through extended maintenance and save the changes done and activate the profile.

SE37 – Function builder

Function modules are procedures that are defined in special ABAP programs only, so-called function groups, but can be called from all ABAP programs. Function groups act as containers for function modules that logically belong together. You create function groups and function modules in the ABAP Workbench using the Function Builder.

Function modules allow you to encapsulate and reuse global functions in the SAP System. They are managed in a central function library. The SAP System contains several predefined functions modules that can be called from any ABAP program. Function modules also play an important role during updating  and in interaction between different SAP systems, or between SAP systems and remote systems through remote communications.

SE37- Function Builder

SE37 can also be used to copy, delete, activate Function modules.
Testing any FM is breeze by using SE37

SAP common transport errors and Troubleshooting

Common Errors :-

Return code (4) indicates imported ended with warning.
Ex:
1. Generation of programs and screens
2. Columns missing and Rows missing.

Return code (8) indicates not imported ended with error
Ex:
1. Syntax error.
2. Program generation error.
3. Dictionary activation error.
4. Method execution error.

Return code (12) indicates import is cancelled.
Ex:
1. Import is cancelled due to object missing.
2. Objects are not active.
3. Program terminated due to job RDDEXECL is not working.

Return code (16) indicates import is cancelled.
Ex:
1. Import cancelled due to system down while importing.
2. Import cancelled due to user expires while
importing
3. Import cancelled due to insufficient roles.

 

Solutions:-

1. The log for import post processing contains messages that indicate that objects are missing

Solution- Look for the missing objects on transport requests using the tools of the Transport Organizer (transaction SE03).

If the missing object is on another request, import it first.

If the missing object is not on a request, collect it and the incorrect object on a request and transport it. Do not import the original request again. Create a merge transport for the consolidation if necessary.

  1. Objects are deleted during import postprocessing although they should have been imported

Solution- The object was transported as a deletion.

You can see this from the piece list of the request in that the objects to be deleted are marked with a deletion indicator.

Make sure that the object to be transported is active. When delivering BI Content, make sure that the delivery or shadow version exists

The request was included in a mass import and the object is in more than one request

Import the requests individually or create a merge transport by merging the object lists of the requests.

3. Objects were not activated or not found (especially process chains and DataSources)

Solution- The client-dependent parts could not be activated because the transport destination is incorrect or missing.

Maintain the correct transport destination:

4. troubleshoot when a transport is running for unusually long duration and not getting completed or terminated

Solution- Go to transaction STMS_IMPORT and identify the transport which is running since a long duration.

Deleting Transport Routes

Before configuring new routes it is important to delete the old routes. Following steps can be taken to delete the old routes:-

  1. Log on to the system functioning as the transport domain controller.
  2. Enter Transaction STMS.
  3. Choose Overview ® Systems. The system overview appears.
  4. Position the cursor on the SAP System you want to delete.
  5. Choose SAP System ® Delete.
  6. Confirm the prompt and distribute the configuration.

Any changes made in the development server needs to be transported to the Quality server for checking and then finally in Production server.

So Importing the Transport Requests is the critical. Sometimes by mistake if one click on the button Import All in the production environment all the Transport Request which is in released status or already Imported to Production can be directly Imported to the production environment (Which may not be required in the Production). This will create great impact in the production Server.

So to avoid this IMPORT_ALL icon is disabled.

Lock / Unlock SAP System

There may be certain cases when the need arises to lock TMS of SAP system.If you have to stop an SAP System for hardware maintenance, for example, communicate this to the other SAP Systems in the transport domain. This prevents unnecessary attempts to access an SAP System that cannot be reached.
Locked SAP Systems are not displayed in the import overview. Display and import functions are not available for SAP Systems that have been locked.

To lock an SAP System:

  1. Log onto the SAP System functioning as the transport domain controller.
  2. Enter Transaction STMS.
  3. Choose Overview ® Systems. The system overview appears.
  4. Position the cursor on the SAP System you want to lock.
  5. Choose SAP System ® Lock.
  6. Confirm the prompt and distribute the configuration.

The SAP System has been locked for the TMS. All SAP Systems belonging to the transport domain are informed that the SAP System has been locked.
To unlock a locked SAP System:

  1. Log onto the SAP System functioning as the transport domain controller.
  2. Enter Transaction STMS.
  3. Choose Overview ® Systems. The system overview appears.
  4. Position the cursor on the SAP System you want to unlock.
  5. Choose SAP System ® Unlock.
  6. Confirm the prompt and distribute the configuration.

Operation Modes

A work process is where an individual dialog steps are actually processed and the work is done. Each work process handles one type of request. There are five types of work processes:-

Table 3.1 work processes

Work Process Type Use
Dialog Executes dialog programs (ABAP). Its parameter is rdisp/wp_no_dia.
Update Asynchronous database changes (is controlled by a COMMIT WORK statement in a dialog work process). Its parameter is rdisp/wp_no_vb and rdisp/wp_no_vb2.
Background Executes time-dependent or event-controlled background jobs. Its parameter is rdisp/wp_no_btc.
Enqueue Executes locking operations (if SAP transactions have to synchronize themselves). Its parameter is rdisp/wp_no_enq.
Spool Print formatting (to printer, file or database) . Its parameter is rdisp/wp_no_spo.

 

In SAP we have memory limitations. So, we cannot define very high number of dialog or background work processes. Usually in SAP system, dialog activity will be more during day time and batch activity will be more in the night time. Operation modes are a concept provided by SAP to take advantage of this fact. The transaction code is RZ04. In SAP, we can define operation modes like day and night and configure more dialog work processes and less background work processes during day time and more background work processes and less dialog work processes during night time. We can define duration for day and night operation modes so that operation mode switch will happen at defined time and dialog work processes will be converted to background work processes in the night and vice versa and thus improves performance of the system. For this operation mode switch restart of the SAP system is not required and system automatically does this at the mentioned time.

Difference between support packages, kernels & SAP Note

Snote :-
By implementing an SAP Note an error in a single program or
Transaction is removed.
You can apply these using SNOTE

Support Package:-
Applying an SAP Support Package, all errors are corrected that
Were known, SAP Support Package is nothing but bunch of corrections.
(Collection of corrections of serious errors in the ABAP/4 Repository)
You can apply this using transaction SPAM
 Kernel :-
SAP Kernel is the core of the application. Like all other applications the Kernel contains the executable files (.EXE files for stating various processes in SAP.
That’s the reason when a Kernel upgrade is done it means new versions of the various EXE files replace the older versions.
With regards to advantages, it is an appropriate question in this context since the Kernel is a must (.EXE)

SAP Support Pack Errors Troubleshooting (SPAM / SAINT )

1. SYNTAX_ERROR- This might come if you are trying  to access the t-codes when the update is running
 
Solution-  You have 2 options.

1. Open a customer message with SAP Support. They will give you some
OS level commands that will fix the problem. 

DO NOT attempt to do this yourself. Or SAP can refuse to support your system
until you pay Consulting services to fix the problem. 
 

2. Restore your system to the state it was before you started the
import of support package queue and start from scratch. 


2. PATCH_FILE_READ_ERROR- Error in phase: DISASSEMBLEReturn code: 12,OCS Package: SAPKB70008


Solution-  Space constrained; you are running out of space.

Status of Spool Request

The lists of spool and output requests (transaction SP01) display, the status of the requests. A request has a status indicating whether data is stored in the SAP spool system, in the host spool system (operating system spooler), or at the printer.

The request can have the following statuses:

 

 

Indicator Processing Status
Spool request has not yet been sent to the host spool system (no output request exists)
+ Spool request is being generated (stored in the SAP spool system)
Waiting The output request is awaiting processing by the SAP spool system and has not yet been sent to the host spool system.
Waiting in host spooler The output request is to be sent or is being sent to the spool work process, or for formatting, in the host spool system.

If this status is displayed for a request for an extended period of time (more than one minute), the corresponding spool work process may have terminated, or there may have been a problem establishing a connection to a remote output device.

The spool work process automatically reprints the output request affected by the problem.

In Processing The spool work process is formatting the output request for printing.
Print. (Printing) The request has been passed to the host spooler or to an output device, and a final status has not yet been returned to the SAP spool system.
Compl. (Complete) The output request has been successfully printed. In systems in which the SAP spool system cannot get information from the host spooler, the status becomes Complete as soon as the output request has been passed to the host spooler.
<F5> More than one output request has been generated and the requests have different statuses. Some requests may not yet have a final processing status.. To display the status of individual requests, choose Output requests or double-click the request status.
Problem There is a minor problem; the output request was printed, but probably contains errors.

Example: If the printer character set is incomplete, a missing character is replaced with another (#).

Errors There is a problem with severe consequences. Requests of this type could not be printed and remain in the spool system until you delete them or the retention period is exceeded and they are deleted by a reorganization.

Example: The system cannot find the printer in the network.

Use the error log to determine the cause of the error.

Archive (For spool requests sent to an archiving device.) The spool request has been processed by the spool system and is waiting to be archived.
Time
or
Scheduled
The user who created the request specified a time when the request is to be output.