Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

module pool program development

Former Member
0 Likes
445

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
423

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

3 REPLIES 3
Read only

Former Member
0 Likes
424

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

Read only

former_member194669
Active Contributor
0 Likes
423

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®

Read only

Former Member
0 Likes
423

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.