‎2006 Feb 07 12:13 PM
Hi All,
Execution in Foreground has to be deactivated for the program. Program should be allowed to be executed only in the back ground.
*Spool should provide the list of documents to which changes have applied.
Thanks in Advance,
venkat
‎2006 Feb 07 12:21 PM
Hi venkat,
1. sy-batch.
check this variable in program
if its in backgrounmd, it will be 'X'.
*----
REPORT abc.
START-OF-SELECTION.
IF sy-batch = 'X'.
WRITE 😕 'AAA'.
------- all the code
else.
write 😕 'Foreground not allowed'.
ENDIF.
regards,
amit m.
Message was edited by: Amit Mittal
‎2006 Feb 07 1:50 PM
Hi Venkat,
Put the foll. piece of code in your program.
at selection-screen.
if sy-ucomm = 'ONLI'.
message e000(zz)
with
'Execute the report in Background only'.
endif.
or
if sy-ucomm <> 'SJOB'.
message e000(zz)
with
'Execute the report in Background only'.
endif.
Pls. reward the points if it works from ur end.
Thanks
Eswar
‎2006 Feb 07 2:07 PM
Here is another way to go. Instead of checking after the fact, take away the option right away.
report zrich_0003.
* Used to limit user commands on selection-screen
include rsdbc1xx.
* Selection Screen
parameters: p_check type c.
* Events
at selection-screen output.
append 'ONLI' to current_scr-excl. " Execute
append 'PRIN' to current_scr-excl. " Execute and Print
* append 'SJOB' to current_scr-excl. " Execute in Background
start-of-selection.
write:/ 'Start-of-Selection was fired'.
Welcome to SDN!!!!!
Please remember to award points for helpful answers and mark your post as solved when solved completely. Thanks.
Regards,
Rich Heilman
‎2006 Feb 07 2:11 PM
Hi,
Use system variable
sy-batch .
if sy-batch eq 'X'.
endif.
Regards
Amole