Managing the Background System SAP BASIS

The SAP system includes functions that allow users to work noninteractively, or offline. These functions are handled by the background processing system. Users normally work interactively with the SAP system. Interactively means they are working online, they input data into the application screens, and the system responds. The interactive service is provided to the users through the dialog work processes.

There is, however, the option of working noninteractively, or offline. Noninteractively means that instead of executing programs and waiting for an answer, users can submit those programs for execution at a more convenient, planned time. This type of work is performed by the background work processes.

Introduction to Background Processing

The execution of programs in the background are submitted in the form of background jobs, or simply jobs.There are several reasons to submit programs for background execution: The interactive user sessions are always fighting to get a free dialog work process for their requests. The maximum allowed time for online execution is defined in a SAP parameter profile (rdisp/max_wprun_time), which normally should not exceed 300 seconds. This means that for ABAP programs whose processing time would exceed that parameter, users would get a TIMEOUT error and an aborted transaction. To avoid these types of errors, you could submit jobs for background processing.

You can continue to work in the system while your program is executing—this is the most important reason to run background processing jobs. When working online with a long processing report, you cannot interact with the system and have to wait until it finishes or the dispatcher throws you out if you exceed the time limit.

This does not mean that interactive or online work is not useful. Both types of processing have their purposes. Online work is the most common one: entering business data, displaying information, printing small reports, managing the system, and so on. Working interactively or online requires the person to be present to interact with the system. However, with background jobs, the system does not need user input or users have already provided the input in the job definition.

Background jobs are used mainly for the following tasks:

  • To process large amounts of data, for example, to get a quarterly report of sales, a monthly warehouse movement report, data load from external systems, and so on.
  • To execute periodic jobs without human intervention. A couple of easy examples are jobs needing everyday reports of the total incoming payments or periodic cleaning jobs submitted by the SAP system manager that take care of deleting obsolete data, such as old log files, ABAP dumps, and so on.
  • To run programs at a more convenient, planned time other than during normal working hours, for example, at night and on weekends, when there are usually less interactive users.

For example, if interactively running a report that takes two or three minutes to finish, the SAP session in which the report is executing will be busy until the report execution ends. During that time, the user cannot interact with the session. Instead, the user could have scheduled it for background processing, creating a background job and specifying the name of the report. When releasing the job, the system will execute it in the background but will give the user the control of the SAP session so he or she can keep on working and interacting with the system.

Jobs executing in the background are working online with the SAP system, so any actions performed by the program steps, such as locking a table or updating the database, will have an immediate effect just as if an interactive user was running the same program. Background jobs execution is handled with the background work processes. The way to implement the background work processes depends on the particular needs of the SAP installation.In any case, when installing a SAP system for the first time, the system configures by default the background processing system in the central SAP instance with a number of background work processes depending on the hardware configuration.

The number and location of background work processes is configurable both with SAP system profile parameters and with the use of the CCMS operation modes. With operation modes, system managers can define some work processes to work as dialog during certain hours and then switch automatically to background processes without the need to restart the application server instances.

Background Jobs

A SAP background job defines the program or group of programs that are going to be executed by the background work processes, In order to do this, the job must be defined. SAP includes several utilities to define, manage, monitor, and troubleshoot the background jobs. Figure shows the initial screen for job definition. You can get to this screen from many different places: by entering transaction code SM36 in the command field, by selecting from the initial SAP screen Tools | CCMS | Jobs | Definition, or by selecting System | Services | Jobs | Define jobs from any SAP screen.

Initial screen for defining jobs

Initial screen for defining jobs

Components of the Background Jobs

A background job has the following components:

  • Job name. Defines the name assigned to the job.
  • Job class. Indicates the type of background processing priority assigned to the job.
  • Status. Refers to the status of job status and is set automatically by the system.

Refer to the next section about job status.

  • Exec. target. It's the SAP instance where the job will be executed.
  • Job steps. A job step defines the program (either ABAP or external) that will be executed.
  • Job start time and job frequency. Define when the job will be started and whether it should be periodically executed.
  • Job print lists. These lists specify the printing parameters for the job output.
  • Job log. The logs for the jobs include log information about the job execution, such as starting time or any other information coded in the programs.
  • Job spool recipient list. A recipient list can be used for specifying one or more recipients who will receive automatically the spool list generated by the job.

All these components of background jobs are explained in greater detail in the following sections of this chapter.

Starting Background Processing

Starting background processing means reaching any type of job definition screen in order to specify the needed data for the background execution of programs. There are several ways to start the background processing system:

  • From the initial job definition screen as shown in Figure .
  • From the ABAP Reporting Service screen. From any menu, you can select System | Services | Reporting, then enter the report name. The reporting screen includes the option for background execution by selecting Program | Background from the menu.
  • From the ABAP Workbench Editor. On the editor initial screen, enter the name of the program in the input field and select Program | Execute | Background from the menu.
  • Sometimes working with business applications, especially navigating through the many information system and reporting functions, the system allows for background execution.

The last three methods mentioned are virtually the same thing, though the system can display different selection screens. With these three methods of starting background processing, after indicating Background Execution, the SAP system displays the Execute Report in Background screen.

The job will have automatically included the report as the first job step, whereas the user has to enter additional job definition fields, such as the job class, target host, start time, and so on.

Defining Background Jobs

Starting background jobs is a two-step process: you first define the job and then you have to release it. When users define a job and save it, they are actually scheduling the report, that is, specifying the job components, the steps, the start time, and the print parameters. So to schedule a job is the same thing as to define it. More precisely, a scheduled job is a job definition that has been saved. When users schedule programs for background processing, they are instructing the system to execute an ABAP report or an external program in the background.

Scheduled background jobs, however, are not actually executed until they are released. When jobs are released, they are sent for execution to the background processing system at the specified start time. Jobs are released automatically if the user is authorized to release jobs, and they automatically start the execution in the background system if the user has chosen the Start Immediately option. Both the scheduling and the releasing of jobs require authorizations. Standard SAP users have authorization that allows them to schedule jobs; however, releasing jobs is a task normally assigned to the system administration and requires another authorization.

Protecting the releasing of jobs with authorization enables system administrators to better monitor and maintain the background system and allows the available resources to be better distributed. The drawback is that scheduling jobs is such a common task that it can surpass the administrator's ability to maintain the whole system. Therefore, reserve some time for studying which users should be allowed to release their own jobs. When users do not have release authorization, the start time or frequency they specify does not have any affect at all, except for informing the administrator in charge of releasing them of their preference for executing the job. Administrators or users with authorization for releasing jobs can change the start time specifications and the interval. The authorization objects that control the background jobs are described later in this chapter.

When scheduling jobs, users can specify several steps, each having a different report or program. Each step has its own attributes, such as authorized users or print parameters. The same job can contain steps with ABAP reports and steps with external programs or commands (this is explained more fully in a later section). When defining jobs, users also have the option of scheduling a program as a separate job or modifying an existing job which has not yet been processed and adding it to the list of job steps.

Users, and especially administrators, should avoid having too many released jobs during normal, operative working hours, because the system processes the background jobs during online operation where there are available background work processes. Remember that a background job will perform the same tasks as if the functions were performed online. So, if a background job does lock a table or updates the database, it will have an immediate result and can affect the work of online users.

Job Definition Fields
As introduced earlier, to schedule or define a background job, there are some input fields that must be filled. From the initial job definition screen as shown in Figure, you can see in greater detail which are the job definition fields and what their intended functions are.

Job Name The job name identifies the job. You can specify up to 32 characters for the name, including letters, numbers, and space characters. Try to give a name which will easily identify the function of the job; also, you could use the same starting letters of words for related types of jobs, since the name will often be used to display lists of jobs.

Job Class The job class determines the priority of a job. The background system admits three types of job classes or priorities: A, B, and C, which correspond to job priority. Class A is the highest priority class; class B is the next priority class; and normal jobs have the C class, which is the lowest and default priority for most jobs. To schedule jobs with higher priority, users must have special authorizations or request the administrator to change the priority of the job.

Job classes are very useful when you need to reserve some of the background work processes for scheduling important or more critical jobs. You can reserve background work processes for class A jobs. This can ensure that class A jobs will always have free processes so that they can be executed (in case there are no more class A jobs waiting for work processes reserved for class A). Class A jobs can be processed as well by normal background processes, and they have priority over regular class C or class B jobs.

With this method, administrators can decide how they want to use background processes of type A:

  • Work processes for critical tasks, such as type A, and two-level priority for job classes B and C
  • No background work processes reserved for class A jobs, so that regular three level priority is used

The advantage of having work processes reserved for class A jobs is that even when there are many released jobs of class C waiting to be processed because all work processes are busy with other jobs, these normal-priority jobs will not use the reserved work processes intended for jobs with the class A. Therefore, even in high-load background situations, administrators can release important jobs by assigning a higher priority job class. To reserve background work processes for class A jobs, you have to configure the instance operation modes with the CCMS utilities.

Exec. Target This field is used to specify the server instance where the background job is to run. You can select the instance by clicking on the possible entries list arrow and choosing one of the hosts from the list. However, this field is normally left blank, which instructs the system to execute the job in the system with the lightest work. Because of the possibilities for distributing the SAP systems services, not all servers might offer background services (run background work processes), and it's also possible to configure one or several servers just for background processing.

The target field is used mainly when, for any reason, a job must be processed on a particular server. Some of the reasons to do that might be: a job will read operating system files only accessible from a particular server, the printer defined for the job output is only defined in that server, and so forth. For example, you should be particularly careful when performing change request imports in a system with several servers. In order for the background job RDDIMPDP not to fail the first time, all SAP servers where background jobs might run should have access to the common /usr/sap/trans directory; otherwise, you should specify a target host for the importing jobs.

Commonly, jobs do not require a target instance for being executed, because the CCMS system with the help of the message server is responsible for distributing the load among the available background servers. Note Do not confuse this target host, instance, which specifies a host running background work processes, with the target host as specified when defining external programs as job steps. It can be the same, but not necessarily.

Job Steps

Once the general job definition fields are entered, you have to click on the Steps function button to define the programs that will be executed as part of the job.

Screen for creating a job step

Screen for creating a job step

There are three types of steps that can be defined depending on the nature of the program to be executed. You can notice these types by looking at the buttons on the program values box shown in Figure. These types are as follows:

  • ABAP programs. With this option, you can specify the execution of ABAP reports as steps of a background job. Module pools or functions groups are not allowed for definition as steps.
  • External commands. These are predefined commands that should have been previously defined by the system administrator. Normal users with the required authorization can schedule these job steps. Because this is a way of executing programs or commands outside SAP, for security reasons users have to specify the operating system type and cannot change the predefined arguments.
  • External programs. These programs are unrestricted operating system programs or shell scripts that require batch administrator privileges. There is no need to define these commands using transaction SM69. The requirement is that the computer must be reached from within the SAP server and have either remote shell support, a running SAP gateway, or a SAP instance that is on the reach of a SAP gateway.
    Clicking on the command function buttons for the type of step actually changes the available command buttons on the lower part of the screen. The following sections explain how to schedule steps and the requirements and parameters which can be used.

Scheduling ABAP Programs as Job Steps

When scheduling ABAP reports as job steps, there are several type parameters which can be specified. The most important one is usually the selection criteria for the execution of the report as it would be normally specified when launching the report online. A group of selection criteria is saved in variants. Refer to Chapter for a description of report variants. When an ABAP program is specified as part of a background job, if it needs selection criteria, the variant must have been previously created; otherwise you will not be able to save the ABAP step.

To define an ABAP program as a job step, from the initial job definition screen, press the Define Steps button on the application toolbar, and then click on the ABAP Program button on the Create Step screen. Then proceed as follows:

  • The User input field will be filled automatically with your own username. But you can select another username that will be used by the system to check the authorizations for the running job. You can only enter another username if your own user is authorized to do so.
  • Enter the name of the ABAP program in the Name input field.
  • If the ABAP program has selection fields, you must enter a variant in the Variant input field. If you don't know the name of the variant, click on the Variant List button and select one. If you don't have any variant defined, you have to first define at least one variant; otherwise the system will not let you schedule the job. You can leave this field blank only in the case that the program does not require variants.
  • Finally, in the Language input field, you can select a different language than the default, which is the one used when logging in to the system. Because SAP solutions are multilanguage systems, there might be some language-dependent texts in the program that will be affected by the value of the Language field. In the definition of steps with ABAP programs, you can also specify print parameters to instruct the system on where and how to print the job output. When finished entering the needed information in the input fields, you can check your definition by clicking on the Check button. The system will display a message in the status bar if it finds any errors in the job definition. If there are no errors, click the Save icon to save your step.

Scheduling External Commands

Both external commands and external programs are executed by means of the sapxpg program. This program is called either by a remote shell (rsh, remsh, and others) or by the SAP gateway (the usual way under Microsoft Windows platforms). External commands to be scheduled must have been previously defined by the system administrator (transaction code SM69 or Tools | CCMS | Configuration | External Commands). To define these commands as job steps, first click on the External Command pushbutton on the Create Step dialog box.

On the Name input field, click on the possible entries arrow to select one of the available external commands. Only the commands available for the target operating system can be successfully executed. The Parameters input field is used for specifying additional flags or parameters for the command. Select Operating System from the available options, and the Target Server where the command will be executed. Finally, verify the definition by clicking on the Check icon. If no errors are found, proceed by saving the step definition.

Scheduling External Programs

You can schedule external programs as job steps. These external programs can be of any type as long as they can be reached from the SAP server and the host where the program resides can execute the program itself. It can be any compiled or executable program, shell script, and so forth. The step definition for external programs allows you to include any parameters the program needs in a complete transparent way. The error messages generated by external programs are included in the log file for the background job.

To enter an external program as part of a job, when on the Create Step screen, click on the external program. The system will change the colors for the relevant input fields while graying out the field for the ABAP programs.
Notice how the command buttons in the lower part of the screen change as well, depending on the type of program. Enter the following information for the external program:

  • Name. Enter the name and path of the external program. You should enter the path to ensure that the program can be found in the target system except if the program is in the search path of the SAP user with which the SAP gateway was started (normally the <sid>adm user). For example, enter /home/dd1adm/copy.sh, instead of entering just copy.sh.
  • Parameter. Enter here any parameters, flags, or options that the external program might need. For example, if the program /usr/bin/ps needs the option -eaf, enter this value in the parameter field.
  • Target host. You have to enter here the hostname of the server where the external program is to be executed. This host must be reachable from the SAP server. The SAP system includes some special options for submitting external commands or external programs, which can be reached by clicking on the Control Flags button that appears on the screen for creating a step with external programs.

The Control Flag display for external programs

The Control Flag display for external programs

With the Control Flag options, you can activate a trace for the external programs, and also direct the output and error information to the job log. But the most interesting option within the Control Flags is the Job to wait for ext. termination. By selecting the Check button option, the SAP system will start the external programs as service programs in the host where they are started, which means that they will remain active in the system. When starting these types of service program which do not terminate, these programs return control to the SAP background system which terminates the job as soon as it has been started.

Defining the Start Conditions for the Job

For background jobs to execute, you have to specify their start time. SAP systems provide many options that virtually cover most needs both for defining start-time criteria and for defining a repeat interval. In any case, jobs are not executed until they are released, independently of the start time defined. Start time can be defined before or after the definition of the job steps. However, if no start time is specified, the job will be saved but will never be executed unless the system or job administrator modifies a job and defines a start time and then releases it. To define a start time, click on the Start Condition button on the initial job definition screen. Figure shows the resulting display. The system provides the following start options:

  • Immediate start
  • At a specified date and time
  • After receiving a system event
  • At change of operating mode
  • After termination of a preceding job
  • On a specific work day

Job start options

Job start options

For those jobs which need to be periodically executed, SAP also provides the facility to specify a repeat interval, which can be assigned to every start option. The following sections cover available start options one by one.

Immediate For immediate start jobs, the background processing system sends the jobs for execution as soon as they are released. The immediate start jobs are released by clicking on the Save icon. When users define immediate as the start option, the background scheduler processes the job immediately if there are available background work processes. If there are no background work processes available, the job will wait in Released status until one of the background work processes becomes free. This also applies if the job class is B or C (normal priority) and the free work processes are reserved for class A.

If, when defining the job, the user specifies a target host, immediate start jobs will also wait for execution if there is no free background work process in the specified host, even if there are free background work processes in other hosts. When no target host is specified, immediate start jobs are evenly distributed among the available background processing servers. When selecting the Immediate option, the system includes this information within the Date/Time box and presents additional options on the same screen, such as the check box to specify whether it's going to be a periodic job and whether you want to specify additional restrictions for the start time of the job.Users not having authorization for releasing jobs cannot use the Immediate start option.

Date and Time The Date/Time option allows you to specify the date and the time when the job will be processed. When you click on the Date/Time button, the system opens input fields under the Date/Time box to allow for entering the start data, and also automatically shows the Periodic Job check box and additional function buttons on the bottom part of the screen. In the input fields, enter the requested start date and time. You can either type the requested information or click on the possible entries arrow to choose a value. In this case, when selecting dates and time, similar to the rest of the SAP system, clicking on the arrow for a date will display a dialog box with a calendar.

Sometimes, it might not be convenient for the job to be released for execution if there are no free work processes available at the specified date and time. In these cases, the system allows for restricting the job not to start after a specified date and time by entering that information in the input field No Start After. Specifying periodic intervals for execution and additional start restrictions are explained in the following sections. After Job The After Job start option lets you specify starting a background job after the execution of a previous job. Figure shows the list box displayed by the system in which you enter the name of the previous job.

Specifying a job after a predecessor

Specifying a job after a predecessor

The After Job option includes the check box Start Status-Dependent, which is used to specify whether to start the job independently of the status of the previous job or only execute the job if the previous job was finished successfully. Selecting the check box indicates the background system to start the job only if the previous job was successful. The After Job option is quite useful for defining "cascaded" jobs which need to be executed one after another.

After Event With the After Event start option, users can define jobs that will be executed when the system triggers a specific event. Events are signals that indicate that a certain condition, phase, or stage has been reached, for example, that the SAP system has just been started, a certain database operation has been performed, and so forth. Events can be triggered by ABAP programs, by the SAP system itself, or by using the sapevt program from the operating system.

Starting background jobs by sending events is quite useful especially in situations where there is an interface or relation between operating system processes and SAP. Two typical examples are as follows:

  • When imports are performed with the transport management programs, the operating system process sends the SAP_TRIGGER_RDDIMPDP event. When the SAP system receives the event, the background job RDDIMPDP is automatically started, because it is scheduled to run after receiving this event.
  • When receiving sequential files for processing by a batch input session in the background, you can have a shell script or program that periodically looks for the requested file. When it finds the needed sequential file, it can trigger an event to the SAP system to start the background job that processes the batch input program.

It is also possible to specify the jobs started after events to be periodic. This means that when the job is triggered, the first thing it does is to automatically reschedule itself for the next time it receives the event. You can display a list of available events by clicking on the possible entries arrow. Or you can create your own events. To do that, from the main menu, select Tools | CCMS | Jobs | Maintain Events. Alternatively, run transaction SM62. A practical example is as follows:

  1. Create a new event, for example, MY_TEST_EVENT.
  2. Define a job with a simple ABAP report and select the After Event start option.
  3. Click on the event possible list arrow and select your newly defined event. Save the job. It will be released.
  4. Login at the operating system level as user <sid>adm and trigger the event by using the command sapevt "MY_TEST_EVENT" pf=/usr/sap/<SID>/SYS/profile/<instance_profile>, for example, if the <SID> is DD1 and the instance profile DD1_DVEBMGS00, the full command is sapevt "MY_TEST_EVENT" pf=/usr/sap/DD1/SYS/profile/DD1_DVEBMGS00.
  5. In the SAP system, check that the job has been started.

At Operation Mode Change Another option for starting background jobs is when the system changes the operation mode. This option can be quite useful for system or job administrators when having to reschedule many jobs for other users at a more convenient time in order to optimize system resources and performance. For example, when changing the operation mode, the system is configured to switch many dialog processes to background work processes (for example, in operation modes defined for nightly or weekend operation), which is a better time to schedule the jobs that could not be processed during a normal operation mode.To define a job at operation mode change, click on its function button and enter the operation mode name in the input field.

Additional Start Restrictions The system includes an option to restrict the job start time to a specific workday linked with a factory calendar. This option can be useful when jobs are not needed on holidays or weekends, but only on certain workdays, for example, background jobs that generate production orders or project worksheets that are only required for operative users who do not work on holidays or weekends. Restrictions on workdays and the factory calendar can only be applied to jobs with the Date/Time start option. To specify start restrictions, when in the Date/Time option, click on the Restrictions button.

Specifying start restrictions

Specifying start restrictions

In the restrictions for the Start Date dialog box, you can define jobs to execute only on workdays and decide how the background system will behave in case the scheduled job's planned start is on a nonworking day. The system allows you to either cancel the job, always execute it, move it to the next workday, or move it backward to the previous workday.

Relative Start Option The last available start option is to specify the number of workdays relative to the beginning or end of a month when a job should be started. As with every option in the system that uses workdays, it must be linked with a factory calendar. To display the dialog box for specifying relative start times, press on the >> icon on the initial Start Date/Time screen. The Period input box is specified in number of months. For instance, 02 means that the job will be repeated every two months.

Defining a Repeat Interval Period
The background processing system allows for defining a repeat interval for jobs that you want to execute periodically. For example, administrators can run cleaning background jobs everyday, sales managers can have a sales report run in the background every month, and so on.

To define a repeat interval period, you first define a start option. The dialog box automatically shows the Periodic Job check box. Select this box and then click on the period values. The system displays a new pop-up box. This is five standard options: hourly, daily, weekly, monthly, and other. To select any of the periodic values, just click the pushbutton.

The periodic value pop-up box

The periodic value pop-up box

With the fifth option, Other Period, you can specify virtually any repeat period option. Enter the desired values in the corresponding input fields. When specifying a repeat interval for jobs started with the After Event option, you cannot specify a repeat time value; instead, when the job is defined as periodic, the system will reschedule it every time it is processed.

Specifying Job Print Parameters

Often, the result of an ABAP program or external program makes database modifications that are not output in lists. Often, too, the result of a background job is a report list, which can be passed directly to the printing system, either as an output request or directly sent to the printer. You can also send the spool output to a list of recipients. When defining ABAP reports that generate report lists, you can decide to define the print parameters for the background jobs. To do that, click on the Print Specifications button, which appears in the dialog box for ABAP step creation. The Background Print Parameter screen is virtually the same as any other print request generated in the SAP system. Enter the requested print specifications and save the settings.

Specifying the Spool List Recipient

The system includes the possibility of automatically sending to a group of recipients the result of a job that includes a spool request. The system allows this output to be sent both to internal users or by other external means (Internet mail, fax, and so on) if these communication types have been previously configured in the system. To send the output of a job to a recipient or group, click on the Spool List Recipient pushbutton on the initial job definition screen. The system will display a dialog box for determination of recipients, as well as additional flags that will be attached to the message. Clicking on the possible entries arrow in the Recipient input field opens an additional dialog box for selecting the type of user or messaging system. Figure shows these screens.

Spool List Recipient options

Spool List Recipient options

Make your required entries and press the Copy icon to transfer the information to the job definition.

Management Operations on Background Jobs

Previous sections explained the process of defining and scheduling jobs. This section covers additional management options to handle modifying, monitoring, and controlling background jobs. Users can display a list of their own jobs by selecting System | Own Jobs from any SAP window. The most important background job managing operations are as follows:

  • Checking the status of jobs.
  • Modifying jobs.
  • Deleting jobs. Some time after a job has been processed, you should delete it to release system resources. You have two options for deleting a job: manually, jobby- job, or automatically, using a reorganization program that deletes jobs that are beyond a date line.
  • Viewing the job log. If a job has been aborted, you should view the job log for the cause of the failure.

Most basic management operations are performed from the Job Overview screen. To reach the Job Overview screen, first, from the main menu select System | Services | Jobs | Job Overview or, alternatively, enter transaction code SM37 in the command field.

Background jobs main selection screen

Background jobs main selection screen

On the initial screen, enter the selection criteria for the jobs you want to look for. On the job selection screen, you can specify job name, user name, a date and time interval, job status, and so forth. Wildcards, such as the asterisk sign (*) are allowed. Do not forget to enter the event name or an * to select jobs which are started after event, even when they are already finished in the date and time range. Once the criteria are specified, press ENTER to display the job overview for the requested selection. This screen includes several menu options that allow you to perform common monitoring and management tasks over a job or a group of selected jobs.

Job Overview list

Job Overview list

The next sections explain some of these common tasks.

The Job Status

A job can have one of the following statuses: scheduled, released, ready, active, finished, canceled. They indicate the following conditions:

  • Scheduled. The job has been created but still has not been released to run. A scheduled job will never execute unless it is released.
  • Released. The job is released to run at the time or condition specified in the start options.
  • Ready. The start date and time has arrived and the job is waiting to be executed.

This status is not seen very often. It is a short period of time before the job changes to an active status.

  • Active. The job is running, being executed.
  • Finished. The job has ended successfully.
  • Canceled. The job has ended with errors.

Modifying Scheduled Jobs

A job that has been released can be canceled, which reverts its status to Scheduled. To do this, from the Job Overview list, select the job, and then, from the menu, choose Job | Released | Scheduled. To release a scheduled job, from the menu, click on the Release Job button on the application toolbar. From the Job Overview screen, administrators can also change the definition of a job that has not yet been processed. By selecting the job and then choosing Job | Change from the menu, authorized users can modify the start time, the steps, print lists, restrictions, and so on.

Other available options under the Job menu are as follows:

  • Copy is used to copy a job with another name.
  • Move to different server is the option available for changing the target host of a job, useful if there are no available background work processes in the server where it was defined to run.
  • Capture: active job is a function to intervene in an active job in order to interrupt it or put it under debugging mode.
    Check status is useful in situations where, due to system failures, shutdowns, and the like, it's not clear that the status of the job is the real one.

For jobs that are already finished or have been canceled, you can display the job log by selecting the job and clicking on the Job Log function button on the application toolbar. To display the details of individual jobs, select the job and double-click on it or select Job | Job Details from the menu. From the Job Display screen, you can look further at the rest of the job information like the steps, start time, repeat interval, print specifications, and so forth.

Deleting Jobs

Background jobs become very numerous in productive SAP installation and so do the number of job logs and job-related information. It is a good practice to periodically delete all the jobs that have already been processed and are no longer needed. Deleting jobs removes the associated job log and the internal table entries. There are two ways to delete jobs: manually, by selecting jobs from the job list display and then choosing the Delete function from the menu, or automatically, by defining one or several jobs which periodically clean up old jobs. The standard ABAP report RSBTCDEL is used for this purpose.

You can create several variants that delete only those jobs specified in the selection criteria. You can find more information about other useful cleaning jobs in the SAP Notes. When deleting jobs, be careful to determine which are predecessors of other jobs, because those jobs will no longer be started, although you have the option of rescheduling them by assigning a different start option.

Displaying Job Logs Every background job generates a job log after execution; job logs are only available for finished or canceled jobs. They record the messages that are issued by the programs specified in the job steps. The messages of the job log are language dependent. These logs can be very useful for finding the cause of errors, problems, and failures or for tracing important parts of a job. If no problem occurs in the job execution, the job log simply contains the start time and finish time of the job and an indication of the start of every job step.

Sometimes, depending on the nature of the executed program, job logs might also contain internal program information, such as statistical information. These messages are output to the log file using the MESSAGE keyword of ABAP. To display the log for a job, select the job from the Job Overview list and double-click on it or click on the Job Log button on the application toolbar. For each job log a job file is created at the operating system level. These are usually located under the SAP system global directory (/usr/sap/<SID>/SYS/global) and are managed within the TemSe (temporary sequential objects) database. These log files should not be deleted manually in the operating system, because they are managed by the SAP system and their deletion can cause inconsistencies in the TemSe database. The log files are automatically deleted by the system when the jobs are deleted.

The Graphical Job Monitoring Tool

Within the CCMS monitoring functions, the SAP system includes a utility for graphical job monitoring. To display the job scheduling graphical monitor, from the main menu, select Tools | CCMS | Control/Monitoring | Job Scheduling Monitor or transaction code RZ01.

The Job Scheduling Monitor main screen

The Job Scheduling Monitor main screen

The graphical Job Monitor is quite useful for looking at the available resources for background, the status of jobs, estimated runtime, operation mode switch, and so forth. The background processing system manages a statistics database used for making estimates of job processing times. This is particularly useful with periodic jobs. For jobs without runtime statistics, the monitor shows an estimate with the minimum length. In the left column of the display under Job Server, the monitor shows how many background work processes are available identified with the name of the host system.

The ruled horizontal line on top of the display shows the time unit used for monitoring. The broken vertical line shows the current time. The Monitoring tool shows the jobs as rectangles where you can click to display an overview with information about the particular job. The length of a job rectangle shows the approximate amount of time that the job requires for processing. For a finished job, it actually shows the time it took to complete.The status of a job is indicated by its colors. To display a legend of the meaning of each color, click on the Key button on the display toolbar.

Watch out for long yellow bars with shading, which might indicate a problem in the background scheduler or blocked work processes. Many red bars with >>> shading (estimated runtime exceeded) might indicate that the program is not running correctly. The graphical Job Monitoring tool can quickly give an idea of the load distribution among the available background work processes. From a general display, you can see if the system is executing jobs evenly among the available background servers. The Job Monitor uses an additional Alert Monitor, which automatically reports any errors related to the background processing such as canceled jobs. Since release 4.5 or the SAP Basis system, the background processing system was integrated into the new alert architecture and CCMS monitors.

To the right of the current time, the rectangles are for jobs that are waiting to be processed. On the menu bar of the graphical display, there are several functions available to configure the monitoring utility, as well as for displaying and managing jobs. The time unit menu allows you to change the time measurements on the display. By default it is set to minutes, but you can compress or expand the display by selecting another time unit such as hours or days.With the Jobs menu, administrators can display job logs and job overview information and can change the job information.

To perform any function under this menu, first select the function and then click on the job. For example, you can select Check Job Status from the Jobs menu and then click on any job in the display. The system shows a dialog box indicating whether the job status is OK or not. By clicking on the Timer On button, the system automatically updates the job display every three minutes. Using the Monitor | Customize function, you can decide to set some standard values for displaying jobs under the monitoring tool. For example, you can decide how many hours you want to have for displaying canceled jobs, what the standard expected runtime assigned to jobs without statistics is, and so forth.



Face Book Twitter Google Plus Instagram Youtube Linkedin Myspace Pinterest Soundcloud Wikipedia

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

SAP BASIS Topics