Application Development 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: 

Come back to screen

Former Member
0 Kudos

Hi All,

I am using a program which contains screen.

i have created Selection screen as we do for normal report.In start-of-selection i am calling screen1.

When i press back button in screen1 it should come to my selection screen.

I am using Leave to screen 0.but this is not working.Bcoz i have 5 screens and when i came back from screen2 to screen1 and when i press back in screen1 it is going to screen2 again.

Please dont suggest me to create selection screen as screen.

Thanks in advance....

9 REPLIES 9

Former Member
0 Kudos

Hi,

WHEN 'BACK".

LEAVE PROGRAM.

Try this.....

0 Kudos

Leave program comes out of program and doesnt display selection screen

Thanks for reply..

0 Kudos

Hi Madan,

I guess there is a option in the leave screen statement to leave to a specified screen. Jus t check in syntax by using F1 help. That'll help u learn more

Regards,

Sakkthiss.R

0 Kudos

Hi Madan

use LEAVE TO SCREEN 0.

i just checked it.

DATA : ok_code TYPE sy-ucomm.

PARAMETERS : matnr TYPE matnr.

START-OF-SELECTION.

IF matnr IS NOT INITIAL.

CALL SCREEN 100.

ENDIF.

MODULE status_0100 OUTPUT.

SET PF-STATUS 'AA'.

  • SET TITLEBAR 'xxx'.

ENDMODULE. " STATUS_0100 OUTPUT

&----


*& Module USER_COMMAND_0100 INPUT

&----


  • text

----


MODULE user_command_0100 INPUT.

CASE ok_code.

WHEN 'BACK'.

LEAVE TO SCREEN 0.

ENDCASE.

ENDMODULE. " USER_COMMAND_0100 INPUT

Regards

Ram

Edited by: ramchander krishnamraju on Dec 15, 2008 11:00 AM

0 Kudos

Hi,

It works for one screen.But i have almost 5 screens.If you come back from screen5>screen4>Screen3>Screen2>Screen1 and if u press back now you will be going to screen 2 and not to the selection screen.

Thanks

Former Member
0 Kudos

Do not mix SELECTION SCREEN with MODULE POOL screens in a program. Use this approch

Let 1000 be the screen on which you want to put Range button.

Make a subscreen area on it. Let it be named as sub_area.

Now make a selection screen in your program.

SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.

SELECT-OPTIONS R_PERNR FOR PERNR-PERNR.

SELECTION-SCREEN END OF SCREEN.

Now in screen 1000 flow logic, we can call the selection screen in the sub screen area defined.

In PBO of 1000

CALL SUBSCREEN SUB_AREA INCLUDING SY-REPID '0100'.

Now, code in AT SELECTION-SCREEN OUTPUT event will be exe.

In PAI of 1000

CALL SUBSCREEN SA_SS. as the first line after PAI

Now, AT SELECTION-SCREEN event will be exe.

Using above method u will get the functionality of Select-Options of Selection Screen on a Module Pool Screen.

Former Member
0 Kudos

HI,

On the first screen u write....

call screen <screen number>.

nd on the second screen ....

u write..

LEAVE TO SCREEN 0.

ths take u to the previous call screen...

hope ths help u...

regards..

Ritesh Jha

Former Member
0 Kudos

Hi,

Try...LEAVE TO SCREEN '1000'.

Thanks

Naren

Former Member
0 Kudos

Hello,

On the 1st screen you can write:

begin of screen 100 instead of the default screen number,

end of screen 100.

After that you have to call that screen 100.

On that screen's functionality you are going to next screen.

From that screen you can write: leave to screen 0 or

Return to screen 0.

Hope this Helps you.

Thanks