Over many years I have been working alongside ABAP developers and functional consultants. During this time I have been asked many times if a certain job is still running because it seems like it has been running for ever and the programmer or consultant need it to complete asap. So instead of repeating the process of checking for them I will show them how to check the issue for themselves. This is what I want to share with you too. A good start is to check the work processes activity in your SAP system.
Checking the Work Processes
First of all, you have you need to determine if your SAP system in a single server system or makes use of multiple application servers. In case of any doubt, simply start the transaction SM51.
The following screen will be displayed: (Or something similar)
In this example the SAP system only has 1 application server. (See the indication at the bottom *** 1 active servers ***)
It doesn’t mean there is only one server configured on this system, but that only one is up and running for now, and because we want to check the work processes, that’s the only information we need to know.
So here you have two options, which are in this case do exactly the same thing. Either go to the SM50 transaction and double-click the Server Name. Please note, if you had more than one server being displayed then the only option left would be to double-click the Server Name to open the SM50 transaction on the targeted server.
By Double-Clicking or going to SM50 you have a screen similar to the one below:
Let’s go through the different columns of data and determine what each column means:
- No: The is the work process number. Each work process is numbered in SAP, and this number is used to identify the associated logs.
- Type: This is the type of Work Process:
- DIA stands for Dialog.
- BGD for Background.
- UPD for Update.
- ENQ Enqueue server.
- UP2 Update 2.
- SPO for Spool.
- PID: This is the Process Id at the OS level. This could be useful if you need to kill a work process directly from the operating system.
- Running – it’s actually doing something.
- Waiting – The system is waiting for a task to process.
- On Hold – The system is waiting on an external process to finish before proceeding. In this example the process is “frozen”.
- Reason: Contains the reason for a process to be On Hold (see above); SLEEP waits for a server request to be processed, RFC (remote function call) was initiated, and it waits for its completion.
- Restart: Indicates if the process would restart automatically after it died.
- Err: The number of times the work process died. This should usually report 0.
- Sem: A number in this column would indicate the system is waiting for a Semaphore to be completed. For example: This is like a table lock where 2 programs are executing something against the same table.
- CPU: In order to populate this info, you have to click on the clock button at the top of the screen. Then it would give you the time spent processing this process. It’s common to find some work processes with 0 in the CPU time value column, in fact from an optimal point of view, you should have 1 Dialog work process with a 0 value or close to it. This would indicate the system is not overloaded by the number of requests.
- Time: Indicates the number of seconds spent in the current execution; typically background processes will have a high value.
- Report: As the name suggests, it’s the report being executed.
- Client: The client where the process is being executed.
- User Names: The User Name of the person that is executing the report?
- Action: Would contain the actions against the database, for example, a Sequential Read would indicate the report is currently scanning a table.
- Table: It gives you the name of the table being read if an action is indicated in the previous column.
As you can see, from this screen you can quickly check the global work process activity on your server.
The screen is not auto refreshed as most of the SAP screens, so make use of the Refresh button or press F5 on a regular basis, as this screen is only a snapshot.
Detailed View Of The SAP Work Process Activity
Now, let’s imagine you wanted to see more details on what the report using the work process numbered 2 is doing. Double click the row to generate the following screen:
You can now see a detailed view of what the work process is actually doing.
We have access to a detail report of the Database activity, number of records, number of accesses as well as a detailed report on the Memory consumption.
From here, you can often find all you need to now about your running job and decide if everything is running as it should or if something has gone amiss.
With a simple SM50 transaction (plus SM51 in certain cases), you have access to a lot of information regarding the work processes activity in your SAP system. This tool could be useful for any person who would need to understand what a system, or a report is doing if any doubt arises.