‎2009 Jun 27 3:21 PM
Hi All,
i want to display a screen which should be having only comments that so and so user only should be executing this program. the req. is like the selection screen should be displayed and when the user executes only then a table is to be locked first and then the table is to be filled with records of other two tables. I have created a program like this.
selection screen 200.
declared the comments.
initialization.
called the selection screen 200.
start of selection.
locking the table and so on...
but in this program the problem is even if the user selects back button or any other button the program is getting executed i.e the control is going to start of selection.
please help me to solve teh problem. the req. is freezed, so, do not suggest to add a pop up or anything else.
awaiting your replies.
‎2009 Jun 27 5:01 PM
Hi Ibrahim,
If this requirement is for report, Do you need custom selection screen?
Thanks,
Raj
‎2009 Jun 27 6:01 PM
Hi,
Check this code..
selection screen 200.
declared the comments.
initialization.
* called the selection screen 200. " Comment the code
start of selection.
call the selection screen 200.
check sy-subrc eq 0. " if press back/cancel/exit subrc will be 4 if execute subrc will be 0
locking the table and so on...
‎2009 Jun 29 4:10 AM
Hi Ibrahim,
You have to follow the sample program.
I hope that it helps you.
Thanks
Venkat.OREPORT ztest_notepad.
SELECTION-SCREEN BEGIN OF SCREEN 1001.
SELECTION-SCREEN COMMENT 1(83) comm2. "83 chars is max comment length using comment statement
SELECTION-SCREEN END OF SCREEN 1001.
INITIALIZATION.
comm2 = 'Hi there. It shows text like this.'.
START-OF-SELECTION.
"Call selection-screen
CALL SELECTION-SCREEN 1001.
IF sy-subrc = 0.
"locking the table and so on...
WRITE 'The user selected the function Execute or Execute + Print on the selection screen.'.
ENDIF.
‎2009 Jun 29 4:22 AM
Hi Ibrahim,
I think It is good to write program the below way instead of doing the above way which i have posted just now.
I hope that it resolves.
Thanks
VenkatREPORT ztest_notepad.
SELECTION-SCREEN COMMENT 1(83) comm2.
PARAMETERS p_dummy.
INITIALIZATION.
comm2 = 'Hi there. It shows text like this.'.
"Setting screen attributes
LOOP AT SCREEN.
IF screen-name = 'P_DUMMY' OR
screen-name = '%_P_DUMMY_%_APP_%-TEXT'.
screen-active = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
START-OF-SELECTION.
WRITE 'The user selected the function Execute or Execute + Print on the selection screen.'.