cancel
Showing results for 
Search instead for 
Did you mean: 

Background Job ?

Former Member
0 Kudos

Suppose i write the program 200 lines. in that code some piece of code means 20-40 lines run program in Background by using the system variable BATCH.?

HOW ? plzzzz send me the example by using System variable ?

Accepted Solutions (0)

Answers (3)

Answers (3)

sachin_mathapati
Contributor
0 Kudos

Hi ,

System variable SY-BATCH is 'X' when the report is run in Background.

So what u can do is put a check for sy-batch in the part of the code which u want to execute only in background.

Please note that when u execute the report in foreground that part of code where u have check for sy-batch will not work.

Regards,

Sachin M M

Former Member
0 Kudos

if sy-batch = 'X'.

write:/ 'this is back ground job scheduling'.

endif.

when u excute in the program in the selection screen

program-->excute in back ground.

it will work in back ground.

and the go to SM36,select own jobs button,there a job with ur report name will be created and select that and click on the button spool,

after going into spool,

click on type u can see the output.

please reward me if helpful.

gupta

former_member195383
Active Contributor
0 Kudos

IF sy-batch eq X.

reqd..20-30 lines of code

endif.

while background execution this block ll be executed....