Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to know if a program is running in background

Hi experts,

I need your expertise on a particular situation. I have a program which can either be scheduled in background job or can be executed online.

If the program is executed in background there is a specific statement block which needs to be executed only when the program is schedule in a background job. My concern is how can I know if the program is being run in background so that I can trigger this specific code statements.

Any help will be greatly useful.



Former Member

Hi ,

Check for system field Sy-batch.

If program is run in backgroung Sy-batch will be X.


Sachin M M

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question