12-02-2008 8:34 AM
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.
Thanks
Shabir
12-02-2008 8:37 AM
Hi ,
Check for system field Sy-batch.
If program is run in backgroung Sy-batch will be X.
Regards,
Sachin M M
12-02-2008 8:37 AM
Hi,
try using the FM JOB_OPEN
JOB_SUBMIT
JOB_CLOSE
Also take the KEY word help of SY-BATCH
Regards
Ramchander Rao.K
12-02-2008 8:37 AM
Hi ,
Check for system field Sy-batch.
If program is run in backgroung Sy-batch will be X.
Regards,
Sachin M M
12-02-2008 8:39 AM
12-02-2008 8:40 AM
12-02-2008 8:41 AM
Hi,
You can check for system variables SY-BATCH, for programs that run in background and SY-BINPT , for BDC sessions running in Background. Execute the code block if either of them is set to 'X'
regards,
Advait
Edited by: Advait Gode on Dec 2, 2008 9:42 AM
12-02-2008 8:47 AM
Hi Sabir ,
If Sy-Batch = 'X'
Write the Specific code that you want to run in background.
endif.
Thanks.