How to know if a program is running in background
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.
Check for system field Sy-batch.
If program is run in backgroung Sy-batch will be X.
Sachin M M