‎2008 Jul 09 6:58 PM
Hi,
i have three screens 200 300 and 400.
now in 200 i have a push button so by clicking on that it should call the screen 400. and after that if u press back button then it shuld get to the screen 200.
similarly in 300 if i click the push button then it will call screen 400 and by clicking back button it shuld come to the screen 300...
so my question is how can proceed with the coding part for the back button in 400 screen because depending on the called screen the back button shuld work dynamically...ieee...if the screen is called from screen 200 then it shuld get back to that screen and if it is called by screen 300 then it shuld get back to that screen...all this happens dynamically depending on the user selection.so how can we handle that.
plz help me on this.
points will be rewarded.
Regards,
Rohan.
‎2008 Jul 09 7:06 PM
Hi,
I believe if you give leave to screen 0 will work for both the scenarios..if you use call screen 400...
IF SY-UCOMM = 'BACK'.
LEAVE TO SCREEN 0.
endif.
Thanks
Naren
‎2008 Jul 09 7:06 PM
Hi,
I believe if you give leave to screen 0 will work for both the scenarios..if you use call screen 400...
IF SY-UCOMM = 'BACK'.
LEAVE TO SCREEN 0.
endif.
Thanks
Naren
‎2008 Jul 09 7:12 PM
in the PAI of 200 screen
v_pscreen = '200'. " Move sy-dynnr (200) to this variable
call screen 400.
in the PAI of 300 screen
v_pscreen = '300'. " Move sy-dynnr (300) to this variable
call screen 400
then in 400 PAI after back
leave to screen v_pscreen.
a®
‎2008 Jul 09 8:01 PM
LEAVE SCREEN.
Effect
Leaves the current screen and processes the next screen.
If the next screen has the number 0 (either defined statically or set dynamically by SET SCREEN 0), processing in CALL mode continues after the CALL SCREEN statement. Otherwise, you branch to the transaction selection screen.
Note
If the next screen is specified dynamically, you can use the short form " LEAVE TO SCREEN scr." instead of a combination of the "SET SCREEN scr." and "LEAVE SCREEN." commands.