7 Concepts about SM37 tcode in SAP, nobody will teach you

What is SM37 tcode in SAP?

SM37 tcode in SAP is a very significant application in SAP. It helps in background job monitoring, analysis and solving issues. These concepts related to SM37 tcode in SAP can be learn only while working on project and handling issues. There is no as such study material which teaches these concepts. If you are an SAP MM, SD or FI Consultant then probably you already know the below concepts and tips. However, if you are an SAP PM, QM, EHS consultant then this article will help you a lot to know about SM37 tcode. Here is the table of content:

Jump on the concept

  1. How to Identify the program name
  2. How to Identify job name
  3. How to analyze background job log
  4. How to check job spool
  5. How to check program variant
  6. SM37 table in SAP
  7. Is a background job really working? How to check?

Concept 1How to identify the program name in SM37 ?

How to know the program name if background job name is known to you:

Suppose you know the name of background job but you do not know which program is running in this background job. In such cases you can use this trick. First go to SM37 tcode in SAP and enter the job name. Then execute the query (as shown in the below screen shot).

SM37 tcode in SAP
SM37 tcode in SAP MM

You will get the job name with some basic information. Select the job and click on steps button. Once you click on steps button you will get a new screen here you will get the program name in first column (as shown in below screen shot).

SM37_program name
SM37_Program_name

This technique can be used when there is a background job failure and you want to take a quick action. Then you can find out the program name and ask the ABAP program to check the program.

Concept 2How to identify job name in SM37 ?

How to get the job name if program name is know to you

Again go to SM37 tcode in SAP and enter the program name at the bottom of the screen (as shown in the screen shot). Then enter * in the user filed. And execute. You can also press F8 (function key) to execute. F8 is a shortcut key to execute the transaction.

SM37_Job name

On execution a new screen will appear this will have the list of all job names which are running for the program. There can be more than one jobs. You will have to figure out your job by analyzing each one of them. Please refer below screen shot.

SM37_program

Concept 3How to analyze job log ?

If job fails then u can get the job log here

The job log of a background job gives us information about the activities performed by the program in background. If there is a custom program (Z program), then the job log can be defined in the program itself. If a job fails then the consultant can refer to the job log and find out the real reason of job failure. It does not provides the details reason, but a brief overview of the job failure. This helps give an initial response to client. The other benefit of job log is its help in performance improvement of program. Suppose there is a big program which performs numbers of tasks at a time and it is taking more than expected time to complete then with the help of an ABAP programmer you can create a job log at every step of the program. By doing that you can see which step of program is taking more than expected time to finish. By this you can do necessary indexing of ABAP tables to improve the performance of program.

SM37_Job log
SM37_Job_log

Concept 4How to check job spool ?

You can see the final result of job in the spool

The spool of a background job is very important. It carried the result of background job. For example: If you are running a PR to PO conversion program then spool will have the list of all PR and PO which are converted and created respectively. If it is deadline monitoring of Plant Maintenance module then spool will have information about the maintenance plans which have been triggered maintenance orders. Also if there is an interface program then spool will have the data which is transferred to the third party system. The spool of Z programs can be designed as per the requirement. As a consultant I would recommend to design the spool in such a way that if a client asks about the processing of a specific data, then a consultant can easily respond to his query.

Concept 5How to identify program variant ?

You can get the program variant name here

To manage a background job an SAP functional consultant must know the program name and selection screen variant name. In the point number 1, I have explained the way to find out the program name. Variant name is Parameters field. It is highlighted below in yellow color.

Variant in a background job

If you want to know the selection parameter saved in the variant the go to top menu bar-> Goto-> Variant

Variant in top menu bar

When you click on the variant button it will display the selection screen parameters as shown below. So if the background job fails then you can check which variant was used and what were the selection screen paramters in the program:

Selection screen parameters of a background job

Concept 6 – What are SM37 table in SAP (Background job tables) ?

SM37 table in SAP => When you save a job it updates TBTCO and TBTCP tables

Once a background job is created, it is stored in SAP database tables. These tables are:

  • TBTCO: The job header table (job management data)
  • TBTCP: The job step table (individual processing steps in jobs)

Why it is important to know these tables? It is important because anytime your client may ask you to provide the list of all job which are running in system with program name and variant name in MS excel format. In such a situation you can take the dump of background jobs from these tables.

Also if your system administrator (SAP Basis Consultant) is taking shutdown of production system on a Sunday then functional consultant must know the impact of background jobs which will not run during that time period. If required they will have to rerun the jobs. To know the names of those background jobs you can make use of these tables. Below screen shots are helpful to understand the concept.

TBTCO
TBTCP

Concept 7 – Is a background job really working?

How to check if a background job is really hitting the tables?

Sometimes a background job is running on and on for a very long time. The person who is monitoring the job will also be confuse what exactly is happening.

  • Is the background job really updating the table ?
  • Is it really hitting the tables ?

Tcode SM50 can be used to monitor if the background job is really hiting the tables or not. We can check if program is really reading the data from database sequentially. You can take help from basis consultant to understand this.

SM50 tcode in SAP
SM50 tcode in SAP
Details of background job at Database level in SM50 tcode
Details of background job at Database level in SM50 tcode
error: Content is protected !!