Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a system variable indicator for a background job?

Former Member
0 Kudos
2,044

Hello all.

Is there a way for me to know, in the ABAP program, at runtime, whether the program is beeing run by a background job or not?

Thanks!

1 ACCEPTED SOLUTION

Former Member
0 Kudos
362

Hi,

Please make use of sy-batch.

Thanks,

Sriram Ponna.

4 REPLIES 4

Former Member
0 Kudos
362

HI barak,

There is no such indicator field for background job but SY-BATCH is the sytem field(check table SYST) which gives you the name of the program running in the background.

Best of luck,

Bhumika

Former Member
0 Kudos
363

Hi,

Please make use of sy-batch.

Thanks,

Sriram Ponna.

Former Member
0 Kudos
362

Hi

check

SY-BATCH for Program running in background cehck in SYST table for all.

Thanks & Regards,

Chandralekha.

Former Member
0 Kudos
362

Hi,

There is a system variable sy-batch.

if it is background the sy-batch =1

if it is online the sy-batch = 0.