Escolar Documentos
Profissional Documentos
Cultura Documentos
A SAP job is running longer than normal and SAP job log in SM37 has no new
output for long time. Is the SAP job dead? Is my SAP job hang? You are running a
SAP program online, there is no expected result returned by the SAP system
after the normal wait time, is the SAP program hung? This post would use SAP
background job as example to show how we can check whether a SAP
job/program is truly hung or dead.
1 Overview on how to verify whether a SAP job is hung
A sap background job is always engaging SAP background work process. A
normal running SAP background process should be executing either ABAP logic
or database operation. ABAP logic operation (include table buffer access at
application server level) is consuming CPU power of an application server.
Database operation(read, insert, update or commit) activities can be seen via
database process/session monitoring tool. If a job is not consuming CPU power
and database process/session monitoring tool shows no activities then the
transaction is hung. Following are the summary of check steps:
Identify corresponding SAP work process related to the SAP job via SAP
transaction SM37.
Examine status of the SAP work process related to the job via SAP
transaction SM50/SM51.
Not all above steps/checks has to be executed and in above sequence. This
depends on your case. But after all above checks, a decision on whether the SAP
job/program is still running or truly hung can be reached for subsequent
action.
2 Details on how to verify whether a SAP job/process is hung
2.1 Verify the sap background job and Identify corresponding SAP work
process.
Assuming that you already know name of the SAP background job, you can use
SM37 to monitor the job status to make sure the job is still in active status like
below
To get the corresponding SAP background work process info for a job, you can
double click on the job entry in SAP SM37, then click job details icon on the
subsequent screen
Upon clicking job details icon, the information needed is showed in the
Detailed Information window:
From the above screen, information needed for the next step check can be
found SAP work process number such as 53,
OS level Process ID such as 26,688 and
2 . 2 . 1 C H E C K S A P W O R K P R O C E SS OV E R V I E W
Based on SAP work process number or PID number and the server information
from SM37, SAP transaction SM51/SM50 can be used to locate the specific SAP
background process in SAP Process Overview window. SAP transaction SM51 lists
all available servers/instances in a SAP system and so switching to the server
where the sap background process is running is possible.
Following is a part of SM50 Process Overview screen.
SAP background work process in SM50 could be in different status. This post
would focus on SAP background process which is in running status when
Action column is blank or a database operation like Sequential
Read/direct read/Insert /Delete/Update/commit .
Following is a sample of SAP50 Process Overview screen showing Background
process which has a status Running with a blank Action or sequential read
data operation
2 . 2 . 2 R U N N I N G S A P B A C K G R O U N D P R O C E SS W I T H B L A N K A C T I O N I N S A P S M 5 0
SAP process in this status should be executing ABAP logic which is using CPU
power. SAP SM50 records CPU time which a work process spends since it starts.
CPU time is in Process details screen which can be seen upon double clicking the
work process in SAP SM50 Work Process Overview. Following is a part of SAP
SM50 work process detail screen
If it is found that CPU time is increased together with response time after the
SAP SM50 screen is refreshed, then the SAP work process is not hung and the
SAP job is running normally from system point view. This is true to the above
example as showed in following screen
You can see both CPU time and response time is increased.
If CPU time is not increased, then this process is hung.
2 . 2 . 3 R U N N I N G S A P B A C K G R O U N D P R O C E S S W I T H D ATA B A S E O P E R AT I O N A C T I O N
If there is a change on the number, then the SAP background process is not
hung and the SAP job is running normal.
If there is no change on any of the number, then what is next step? If it is a
read operation, then the SAP job is hung. If it is not a read operation, then
further check is needed via database lock monitor SAP transaction DB01.
2.4 Review database block situation via SAP transaction DB01
SAP transaction DB01 would show who is holding a lock and who is waiting for
the lock
You can use PID to check whether your background process is appeared in above
screen in a status of _WAIT. If your background process ID is waiting for a lock
which is being held by another process, your process is not hung but having a
contention with other process and being blocked. You need to refresh the DB01
screen several times based on how long the process has been blocked in DB01.
Your job would be moving again after the lock is released.
After all those checks, a running background process is hung if it is not
consuming CPU time, incurring no database activities ,and it is not being
blocked in database lock monitor. So the corresponding SAP background job is
hung. Otherwise, it is running even it seems hung.
3 Further clarification
There are rare cases where SM37 job status is not synchronized with SAP
SM50 work process. You cannot find the associated PID in SAP SM50 for the job.
You just need to run SM37 job Synchronization command to fix this.
SAP dialog process and updating process can be long running as well. You can
use similar approach covered in this post to find out whether they are hung
when needs arise.
This post focuses on SAP work process which is at Running status. There are
other statuses like On Hold or Stopped related to a running job/program.
SAP work process should be briefly in On hold unless there is a resource