6 Concept about SM37 t code in SAP:
These concepts related to SM37 t code 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 t code.
- 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 t code in SAP and enter the job name. Then execute the query (as shown in the below screen shot).
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).
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.
- How to get the job name if program name is know to you: Again go to SM37 t code 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.
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.
- 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.
- 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.
- 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 field is next to program name as shown in the screen shot. If you know the variant name you can easily know the selection screen parameters.
- 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 re run 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.
How to know the job name by documents which are posted through batch job. example I want to know the job name by document number like, when I see the document number it is mentioned as user name is SAPBATCH, but I want to know by which job it has posted.
I knew about 2-3 points from these but the rest were new to me. Thank you. Very well written.
Please Add Info about the Country Calendar and their importance to make more Informative
Very well explain and learned new concepts.. Thanking you!!!!!!!!!1
One more Info…
Even we can send Spool output as email to the users after it completes . see spool list recipient in sm36
Thanks Gurbir. Good catch. 🙂 I will add this information in the above post as additional information.
Very well defined and executed, for explanation. It is very knowledgeable.
Very well defined and executed, for explanation.
very good information.