Showing posts with label Troubleshooting the Background Processing System. Show all posts
Showing posts with label Troubleshooting the Background Processing System. Show all posts

Analyzing Job Status

Procedure

From the CCMS initial screen, choose Jobs ® Maintenance.

All background processing jobs can be subjected to an analysis of job status. This analysis is concerned with the following criteria:

  • Existence
  • Attributes

(requested/actual start time, steps, target server, job class and so on)

  • Status (scheduled, released, active, nd so on)
  • Activity of a running job

You can restrict the number of jobs selected on the request screen:

This graphic is explained in the accompanying text

It is important whether or not the user who makes the selection has an administrator authorization for background processing. If a user has administrator administration, then jobs will be selected across all clients. If not then jobs will only be selected in the client onto which the user has logged on.

The system displays a list of the jobs that were found:

This graphic is explained in the accompanying text

This overview displays information that is of particular importance for problem analysis, that is, job status. The list is usually sorted alphabetically, but you can sort it according to other criteria (by choosing Edit ® Sort). You can sort it chronologically, for example, so that you can easily see the jobs that ran over a given time period.

The following functions are especially important for problem analysis:

  • Job log:

This contains information about any problems which occurred in the job at runtime, such as whether an ABAP program was terminated or an external program could not be started.

This also contains a list of all messages which were output either by ABAP programs with the MESSAGE statement or by external programs.

  • Job ® Display:

Displays all data belonging to a given job, such as the start date, steps, spool lists generated by steps, etc. The job detail information also shows on which host and in which work process the job was executed.

  • Job ® Change:

To change job data such as target server, start date, steps, and so on.

  • Spool List :

You can access the spool list of a job directly from here.

  • Steps:

You can access the step data of a job directly from here.

  • Job ® Capture:

This can be used to pause and analyze an active job which is in the middle of executing an ABAP program. An ABAP debugger window is opened, showing the ABAP program code at the point at which it is being executed. The code can now be analyzed. You exit the debugger by choosing Debugging ® Continue.

The ABAP program (the job) then continues to execute from the point at which it was stopped. You cannot use this function on external programs.

  • Job ® Cancel job:

This immediately terminates an active job.

  • Job ® Check status:

This allows you to check whether the status of a job as shown in the list is the same as the real status of the job. There is a database table that contains the status information of the jobs.

Situations sometimes occur (for example, a problem in the connection to the database) that prevent the background processing runtime system from entering the current status of a job in the appropriate database table. This will cause a discrepancy between the real status of a job and the status that was entered in the database.

Analyzing ABAP Runtime Problems

Analyzing ABAP Runtime Problems

Use

An error in an ABAP program that is running in a background generally causes an immediate termination of the background job. The only exception to this rule is if the error was output by a function module called in the program and the program has been instructed to handle the error as an exception. In this case, control returns to the ABAP program, which can attempt to correct the error and continue.

A background job is terminated, if, for example, the program does not correct the error or a division by zero takes place.

If an ABAP program terminates, an ABAP dump is usually generated. This dump contains a description of the precise cause of the error.

Procedure

  • To call an analysis method, choose Tools ® ABAP Workbench ® Test ® Dump-Analysis from the SAP Easy Access menu.
  • In the initial screen, you must specify whether you want to view today’s dump or the dump from yesterday. If these selection criteria are too imprecise, you can enter more specific criteria. To do this, choose Goto ® Select Short Dump
  • You can display a list of all ABAP dumps by choosing Edit ® Display List. You can then display and analyze a selected dump. To do this, choose Short Dump ® Dump Analysis.
  • Job Status Remains "Active"

    Procedure

    Analysis

    Procedure

    1) Is the job really still running?

    – Check the status of the job explicitly

    (see Analyzing Job Status)

    – Is the job still active?

    – Yes: To find out what the job is currently doing, you can ‘capture’ it (see Analyzing Job Status). However, this only works for ABAP programs that are executed as job steps. It is not possible to analyze external programs in this way. For an external program, the check if it is still active must be made at the operating system level.

    – Is the job waiting for an external program that is being executed in the job to be terminated?

    Yes: Check whether the user SAPCPIC exists in the client in which the job is running (see Analyzing Status, Configuration and Administration Data)

    No: continue with step 2

    2) Was the job server restarted while the job was still running?

    – Find out the start time and the execution host of the job (see Analyzing Job Status)

    – Find out from the system log of the job server when the job server was last started.

    – Is the start time of the job server after the start time of the job?

    – Yes:

    – The Job Server was restarted while the job was running. The runtime environment of the background processing system was not able to update the job status in the database.

    – You can manually set the job status to aborted (see Analyzing Job Status)

    – End of analysis

    – No: Contact your SAP consultant.

    Job Log Cannot Be Displayed

    Procedure

    Analysis

    Procedure

    1) Can job logs be created?

    – Perform the following test on all job servers:

    – Schedule the job with the target server = name of host on which the job server is running.

    For example, you can specify the ABAP program RSPARAM as a step.

    Start date of job = ‘Immediate’

    – Log on to job server (see Analyzing the Work Processes and System Log of an Application Server)

    – Can the job log be displayed (see Analyzing Job Status)?

    Yes: End of analysis

    No : Continue with step 2

    2) Are there unusual entries in the system log?

    – Check the system log of the job server (see Analyzing the Work Processes and System Log of an Application Server)

    – Are there any ‘permission denied’ entries, which indicate that the job server is not permitted to create a job log?

    Yes: Change the access permissions belonging to the directory in which the job log was created, so that the user ID in which the job server is running (generally c11adm) is given read and write permission for the directory

    – End of analysis

    No : Test on the job server whether the TemSe subsystem used for creating job logs is working (see Analyzing Status, Configuration, and Administration Data)

    – Does the test report errors?

    Yes: You will now find entries in the system log which describe the problem in more detail

    End of analysis

    No : Continue with step 3

    3) Is the job log supposed to be displayed on an application server other than the job server?

    – Find out which host the job is to be executed on (see Analyzing Job Status)

    – Is the system attempting to display the job log from an application server which is running on a different host than the host on which the job is being executed?

    Yes: Do the application server and the job server each have their own global directory?

    Yes: - The job log cannot be displayed because the application server cannot access the global directory of the job server. Make the necessary changes so that both servers have the same global directory.

    End of analysis

    No: Report the problem to SAP

    End of Content Area

    Job is Terminated

    Procedure

    Analysis

    Procedure

    1) Are there error messages in the job log?

    – Display the job log (see Analyzing Job Status)

    – Are there error messages?

    Yes: – View the error message long texts (choose Goto ® Long text)

    Due to the large number of different problems which can cause termination of a job, it is not possible here to give a generalized procedure for analyzing the problems. There follows a list of some of the more commonly observed problems:

    – A variant of an ABAP program cannot be found, because it has been deleted

    – There is a syntax error in an ABAP program

    – There is a runtime error in an ABAP program, e.g. divide by zero

    – An external program cannot be started (see Analyzing Problems With External Commands and Programs)

    No :

    Could the problem be solved ?

    Yes: End of analysis

    No: Continue with step 2

    2) Are there unusual entries in the system log?

    – Does the job have a target server?

    Yes: Check the system log on the target server for entries (see Analyzing the Work Processes and System Log of an Application Server)

    No: Check the system logs of all job servers for entries (see Analyzing the Work Processes and System Log of an Application Server)

    – Did you find entries?

    – Can you solve the problem yourself?

    Yes: End of analysis

    No: Notify SAP of the problem

    Job was Not Started

    Procedure

    Analysis

    Procedure

    1) Does the job have a start date?

    Display the job’s start date (see Analyzing Job Status)

    Does the job have a start date?

    Yes: Continue with step 2.

    No: Assign the job a start date

    End of analysis

    2) Does the user who scheduled the job have authorization to release jobs?

    Display the authorizations that the user has for background processing (see Analyzing Status, Configuration and Administration Data)

    Does he have release authorization?

    Yes: Continue with step 3

    No: Either give the user release authorization or have the batch administrator release the job.

    End of analysis

    3) Has the start date been reached?

    Yes: Is start date = ‘after Event’ and was the event raised using the sapevt program?

    Yes: Check whether sapevt is working (see Analyzing Problems With Events)

    – Is sapevt Notifying problems?

    Yes: End of analysis

    No: Continue with step 4

    No: Either wait until the start date is reached or assign the job a new start date (see Analyzing Job Status)

    – End of analysis

    4) Are the resources necessary for executing the job available?

    – Call the graphical job monitor

    (see Analyzing ABAP Runtime Problems)

    – Does the job have a target server?

    Yes: Is there a free background work process on the target server for the job class requested?

    Yes: Continue with step 5.

    No: Either set up a minimum of one background work process on the target server for the job class (see Analyzing Parts of the Runtime Environment,"Switching between operating modes") or remove the target server from the job definition (see Analyzing Job Status)

    – End of analysis

    No: Is there at least one host with a free background work process for the job class requested?

    Yes Continue with step 5

    No: Either wait until a background work process becomes free or set up an additional background work process for the job class (see Analyzing Parts of the Runtime Environment,"Switching between operating modes")

    – End of analysis

    5) Can the time-controlled or the event-controlled job scheduler be started?

    – Does the job have a target server?

    Yes:Check the profile parameters of the background processing on the target server (see Analyzing Status, Configuration and Administration Data)

    No: Check the profile parameters of the background processing on all job servers (see Analyzing Status, Configuration and Administration Data)

    – Are errors evident in the log?

    Yes:Fix the problems, e.g. change the profile parameters etc.

    – End of analysis

    No: Continue with step 6

    6) Are there unusual entries in the system log?

    – Does the job have a target server?

    Yes: Check the system log on the target server for entries (see Analyzing the Work Processes and System Log of an Application Server)

    No: Check the system logs of all job servers for entries (see Analyzing the Work Processes and System Log of an Application Server)

    – Did you find entries ?

    Yes: Can you solve the problem yourself?

    Yes: End of analysis

    No: Continue with step 7.

    No: Continue with step 7.

    7) Record the background processing

    – Record the component of the background processing which is responsible for starting the job (see Analyzing Parts of the Runtime Environment)

    – Analyze the trace information

    – Can you solve the problem yourself?

    Yes: End of analysis

    No: Send the trace to SAP