Batch jobs are great. They get a lot of work done while you are sleeping or working on other important things. Batch jobs can be scheduled in many ways and with many different variations. But if you are not the individual who is creating the batch job and dictating the parameters that are being used, it can be a guessing game at best to understand what is being accomplished.
Transaction SM37 (Simple Job Selection) is your gateway into seeing what jobs are running, when they are running or are scheduled to run, if a job failed or was cancelled, who scheduled the job and the parameters set for the job. In addition you can use the * wildcard to search for a job, user and ABAP program.
Transaction SM37 (Simple Job Selection) is your gateway into seeing what jobs are running, when they are running or are scheduled to run, if a job failed or was cancelled, who scheduled the job and the parameters set for the job. In addition you can use the * wildcard to search for a job, user and ABAP program.
In the screenshot above you will see that there is a wildcard in both the Job Name and User Name, but the ABAP Program name is being specified. Along with the other parameters this will return all batch jobs that were run for this program over two days (not including the Scheduled jobs). But feel free testing each of the options on this screen until you find what you are looking for.
What did the Job do? | As you can see, two jobs were found. One job was run on 10/16 at 22:30 hours and has finished successfully and the other is released awaiting its start time. The job name here is fairly good in this example in giving you a clue that it is a Finance job for case creation, but you will not always have good job names and you'll need to dig into the job to find more specifics. In cases were a Spool file is created you can click the check-mark next to the job and click on the Spool icon. |
Now click on the Type Icon to view the Spool contents.
The Spool details are then presented and will vary based on the batch job that was executed.
What parameters were used? | When you need to drill into the parameters and fields used for the batch job, you can do this by using the Step button within the Job Overview screen. Once again you will need to click on the check-box next to the job and then click on the Step button on the toolbar. |
Now you will see the program and the variant used for the batch job. You have a couple options at this point and you can either Display or Change the variant. I prefer to use the Change button as it allows you to see the parameters as you would expect to run the job in the foreground. The Display button lists the parameters in a grid only.
Once the Change button is selected you will now see the fields that were populated for the batch job.
At this point this should have answered your questions about the batch job. But if you need to adjust the variant to add or subtract certain parameters for future batch jobs, here's your chance to do that. Just make the needed changes and press the save button.