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

return screen

Former Member
0 Likes
478

Hi.

In my program i have got a selection screen and then a call screen, how i can return to the selection screen from the dynpro.

Thanks.

1 ACCEPTED SOLUTION
Read only

former_member491305
Active Contributor
0 Likes
453

Hi,

You can use leave to screen 0 stmt to return to the previous screen which in your case is selection screen.

Eg:

case ok_9000.

when 'BACK'.

Leave to screen 0.

Endcase.

3 REPLIES 3
Read only

Former Member
0 Likes
453

Hi,

In a program, you can use one of the two following ABAP statements to leave a screen:

LEAVE SCREEN.

or

LEAVE TO SCREEN <next screen>.

The LEAVE SCREEN statement ends the current screen and calls the subsequent screen.

The LEAVE TO SCREEN statement exits the current screen and calls the dynamic next screen, which you specify as part of the statement.

Regards,

Ranjit Thakur.

<b>Please Mark The Helpful Answer.</b>

Read only

Former Member
0 Likes
453

Hi

In ur code use below code.

insert the code wherever u want to come back to selection screen.

if Sy-subrc <> 0.

  • here if u want use if condtion. Else use Submit only.

Submit ( SY-CPROG ) Via selection-screen.

pass ur program name of wanted selection-screen.

Endif.

If not slove please send ur code, i will modify it.

Reward me if its helpful.

Regards

Ravi.

Read only

former_member491305
Active Contributor
0 Likes
454

Hi,

You can use leave to screen 0 stmt to return to the previous screen which in your case is selection screen.

Eg:

case ok_9000.

when 'BACK'.

Leave to screen 0.

Endcase.