‎2008 Aug 01 10:07 AM
Hello,
Is there a way to disable the execution button of a selection-screen leaving only the option of "Execute in background" or changing the behaviour of the execution button so it executes the report in background?
Thank you,
Nuno Silva
‎2008 Aug 01 10:26 AM
Hi ,
chk this code
REPORT ztest_cha5.
DATA itab TYPE TABLE OF sy-ucomm.
PARAMETERS test(10) TYPE c.
AT SELECTION-SCREEN OUTPUT.
APPEND 'ONLI' TO itab.
CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
EXPORTING
p_status = sy-pfkey
TABLES
p_exclude = itab.
‎2008 Aug 01 10:09 AM
Quick way is you can code into the program with appropriate message if program is run in foreground mode, use system variable to determine for if program run in background.
‎2008 Aug 01 10:11 AM
hi..
check for variable sy-batch if its 'X' program is running in background else show error message
regards
vivek
‎2008 Aug 01 10:22 AM
But is it not possible to make the program execute itself in background when it is running in foreground?
Thank you
Nuno Silva
‎2008 Aug 01 10:24 AM
I dont think its possible
When the selection screen appears, just press F9 to execute the program in background and not F8.
Regards,
Shailaja
‎2008 Aug 01 10:26 AM
Hi ,
chk this code
REPORT ztest_cha5.
DATA itab TYPE TABLE OF sy-ucomm.
PARAMETERS test(10) TYPE c.
AT SELECTION-SCREEN OUTPUT.
APPEND 'ONLI' TO itab.
CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
EXPORTING
p_status = sy-pfkey
TABLES
p_exclude = itab.
‎2008 Aug 01 10:33 AM
Hi Nanu,
Do the following,
The standard gui status for the selection screen 1000 is %_00 and its program is RSSYSTDB.
Now go to SE41 and Enter your program Name and enter the status say ZTEST.
Now click on Copy Status button in the application Toolbar next to user interface.
A pop window will appear enter the details as follows,
FROM :
Program Name : RSSYSTDB
Status : %_00
To :
Program name : your Program Name
Status : ZTEST
Click on copy, a pop up window appears again click COPY. Now you will get a message Status RSSYSTDB %_00 copied to ZTEST01 ZTEST.
Now go to Change Mode, Go to Node: Menu bar and double click on PROGRAM and remove ONLI.
Application Toolbar and remove the Item ONLI and
go to Function Keys Node and remove ONLI from Freely Assigned Function Keys. Activate your Status.
Now in your program use the status example: make sure that all ONLI is removed in your status.
REPORT ZTEST01.
set pf-status 'ZTEST'.
parameters: c(10) type c.
-
-
Thanks & Regards,
Nagaraj Kalbavi
‎2008 Aug 01 11:04 AM
Hi Nuno Silva,
With the above two reponses ie., copying the status of the mentioned program and using it in the program with the Quoted FM is very helpful and solves the problem by using the following code.
A small change you could do is ..in the status remove 'ONLI' and put 'SJOB'. This solves your problem.
DATA itab TYPE TABLE OF sy-ucomm.
PARAMETERS test(10) TYPE c.
set pf-status 'ZTEST'.
AT SELECTION-SCREEN OUTPUT.
APPEND 'ONLI' TO itab.
CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
EXPORTING
p_status = 'ZTEST'
TABLES
p_exclude = itab.Thanks Chandrashekhar and Nagraj. I didn't know we can do like that. Those were very useful posts.
Regards,
Shailaja