How to Run ABAP Program in Background Manually?

Sometimes your program may contain logic that must run long time. In such case, you can’t easily run it by pressing ‘Execute’ program, because SAP has defined maximum number of seconds that is able to run any programs this way (it’s called foreground processing).

In such case, you must execute the program differently. You have to run it in background.

How to run ABAP program in background?

Well, there are more ways of starting program in background.

When to use this approach?

  • you want to manually start to run your program in background
  • the program does not contain selection screen

Notice: 

If you run your program with selection screen, follow this steplist: http://abapacademy.com/blog/how-to-run-abap-program-in-background-manually-easy-way/.

Step-by-step Guide

Background Process Definition – SM36

Go to SE36 to define new Background Process / Job

Define following:

  • Job name (e.g. name of your program)
  • Job Class – this is priority of the job.
    • A – High
    • B – Medium
    • C – Low
  • Target – just hit F4 for search help and choose your current server, where you are logged in or choose different server if needed

Hit Save button or press CRTL+S.

Fill all needed fields for scheduling ABAP program as shown below and hit Save button.

In this stage, your job is saved and scheduled.

Background Process Maintenance – SM37

[sociallocker id=1191]

Go to SM37 transaction to view all background jobs and we will start the job from there.

Fill your job name and make sure that you check ‘Sched.’ Checkbox to display also scheduled jobs.

Then press F8 or Execute to display jobs.

This is how screen looks like. In my case, I have displayed 2 jobs. First one is the scheduled one, which I am looking for + one has been canceled.

Left click on scheduled job and then hit ‘Release’ button to start job execution.

Then choose, when do you want to start running this job. I choose to run it immediately.

And then hit Save.

The job, gets immediately into ‘Ready’ state. It means that it is ready to start at any time, when work process will be available to start.

If you have no background jobs running on your system and you hit ‘Refresh’ button or press F8, you should immediately see that your job goes into ‘Active’ state.

Background Processing Manually Without Selection Screen 11

Background Processing Manually Without Selection Screen 11

In this moment, the job is already running.

[/sociallocker]

Comments
  1. Brian Anderson says:

    T-Codes are SM36 and SM37, not SE36 and SE37.

Add a comment

Your email address will not be published. Required fields are marked *

 

Your personal information will be exclusively used for processing current comment only. Personal data protection policy