2012 Oct 23 2:41 PM
Hello Gurus !......I have been trying to leave a program after a report is displayed. I have a selection screen and after pressing the back button during the report display it always takes me back to the selection screen. I have tried all sorts of exit processing and nothing seems to work. Any help would be appreciated. Thanks, Mike
2012 Oct 23 3:17 PM
hello,
The usual report functionality brings the cursor or user input to the selection screen. If you want to change that, try LEAVE PROGRAM in your back button.
best regards,
swanand
2012 Oct 23 2:47 PM
Dear Michael ,
Try:
Case Sy-ucomm.
When 'BACK' " For Back
LEAVE TO SCREEN 000. OR CALL TRANSACTION 000. LEAVE LIST PROCESSING
Endcase.
Regards
Dinesh
2012 Oct 23 3:25 PM
Hi Dinesh....I'm not sure which event block to put this code....I tried in start-of-selection and end-of-selection, but it doesn't seem to work in either of these locatons.....Thanks, Mike
2012 Oct 23 3:39 PM
Hi Michael,
Try to write the below code in At User-Command event after end-of-selection event.
Case sy-ucomm.
when '&F03'. "for Back Button.
leave to screen 0.
endcase.
I believe you need not to create Gui status for this. Hope this will help you.
shravan
2012 Oct 23 4:15 PM
Hi Shravan.....I thought this code would work, but for whatever reason it didn't.....Thanks for contributing....Mike
2012 Oct 23 3:00 PM
Hi Michael,
Check out the link given below.
http://wiki.sdn.sap.com/wiki/display/ABAP/GUI+Status+of+A+Program+using+Menu+Painter
Regards,
Akhil
2012 Oct 23 3:29 PM
Hi Akhil.....Thanks for the link....I didn't want to go down the path of making a GUI status for this, but maybe I'll have to.......Mike
2012 Oct 23 3:17 PM
hello,
The usual report functionality brings the cursor or user input to the selection screen. If you want to change that, try LEAVE PROGRAM in your back button.
best regards,
swanand
2012 Oct 23 3:32 PM
Hi Swanand......Does this mean I'll have to create a GUI status and program the "BACK" button ?.....I didn't want to create a GUI status unless there was no other solution.......Thanks, Mike
2012 Oct 23 3:39 PM
2012 Oct 23 3:43 PM
Hi,
Nope, you don't have to... there's a trick
Instead of using a normal selection screen, define it as a screen...
Ex:
SELECTION-SCREEN BEGIN OF SCREEN 100.
PARAMETERS: p_par TYPE c.
SELECTION-SCREEN END OF SCREEN 100.
START-OF-SELECTION.
CALL SELECTION-SCREEN 100.
IF sy-subrc <> 0.
EXIT.
ENDIF.
WRITE: 'Test...'.
Cheers,
Manu.
2012 Oct 23 4:08 PM
Hi Manu.....Thanks !!,,,This solution worked.....I haven't defined my own selections screen before, so that was new to me......There are alot of ways to do things in ABAP !!.....Thanks again and thanks to all who contributed !!....Mike