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

Going back to selection screen.

Former Member
0 Likes
1,982

hi,

In my report program, when i click the BACK icon in the PAI event, i want the control to go back to the selection sreen. How do i achieve this?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,370

Hi,

Not sure..What are you looking for...But try using LEAVE TO SCREEN 0.



REPORT zreport.

  parameters: p_matnr type matnr.

START-OF-SELECTION.

* Call the screen..
  CALL SCREEN '0100'.

PROCESS AFTER INPUT.
  MODULE USER_COMMAND.

* Modules
MODULE USER_COMMAND INPUT.

  CASE SY-UCOMM.
    WHEN 'BACK'.
       
* Leave to the selection screen.
       LEAVE TO SCREEN 0.      
   
   ENDCASE.

ENDMODULE.

Thanks

Naren

8 REPLIES 8
Read only

Former Member
0 Likes
1,370

Hi

If your program is a Report, then pressing back button on the output (list) will take you back to selection screen. PAI and PBO are for Dialog programs.

Regards,

Raj

Read only

0 Likes
1,370

Hi,

Use the below code under User_command module for the partiuclar screen no.

E.g If you are using screen 9001, then in PAI.

MODULE user_command_9001 INPUT.

SET SCREEN 0.

LEAVE SCREEN.

ENDMODULE. " USER_COMMAND_9001 INPUT

Then, if you press back button, selection screen will be displayed.

Regards,

Anbalagan

Read only

Former Member
0 Likes
1,370

Hi,

While creating the layout give the function code type E for back.

Write appropriate code in CASE stmt.

regards,

RAM.

Read only

Former Member
0 Likes
1,370

Hi

You have to check for sy-ucomm.

case sy-ucomm.

when <function code of back>.

leave program.

hope this solves ur query

regards

dinesh

Read only

Former Member
0 Likes
1,371

Hi,

Not sure..What are you looking for...But try using LEAVE TO SCREEN 0.



REPORT zreport.

  parameters: p_matnr type matnr.

START-OF-SELECTION.

* Call the screen..
  CALL SCREEN '0100'.

PROCESS AFTER INPUT.
  MODULE USER_COMMAND.

* Modules
MODULE USER_COMMAND INPUT.

  CASE SY-UCOMM.
    WHEN 'BACK'.
       
* Leave to the selection screen.
       LEAVE TO SCREEN 0.      
   
   ENDCASE.

ENDMODULE.

Thanks

Naren

Read only

Former Member
0 Likes
1,370

hi

jsut try

CALL SELECTION-SCREEN dynnr

[STARTING AT col1 lin1

[ENDING AT col2 lin2]]

[USING SELECTION-SET variant].

regards

ravish

<b>plz dont forget to reward points if helpful</b>

Read only

Former Member
0 Likes
1,370

Balaji,

Set the PF status , BACK button and and fuction code.

write code when sy-ucomm eq back. call screen 1000.

Ex :

PAI

module screen_call.

double click on this module ,and write the code.

Pls. reward if useful

Read only

Former Member
0 Likes
1,370

Hi,

USE CALL SCREEN INSTEAD OF SET SCREEN WHILE CALLING THE SCREEN.

then for back button if u write SET SCREEN 0.it will goes to the selection screen.

rgds,

bharat.