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 Selection Screen parameters when Press Back(Custom Container)

Former Member
0 Likes
3,020

Here is the description of problem:

I have created a report (Executable program) which in turn

after giving  selection screen parameters call a second screen

which have custom container on it.

To call custom container i have used statement:

SET Screen 100.

Here is the code of screen with container.

PROCESS BEFORE OUTPUT.

MODULE STATUS_0100.

module check_dock_initial.

MODULE set_table_display.

PROCESS AFTER INPUT.

MODULE USER_COMMAND_0100.

   MODULE exit_command_0100 AT EXIT-COMMAND."back Fcode fires

the thing is when ALV is Displayed and user Press Back Button(F3),

in order to return to selection screen,

The selection Parameters which he have filled is not there.

Please Guide me to Code , When user press back button,

Selection  Screen should get displayed filled with earlier parameters

when user executed the report.

The code Which i have written:

MODULE EXIT_COMMAND_0100 INPUT.

   CASE sy-ucomm.

     WHEN 'BACK' .

       LEAVE to TRANSACTION 'ZCO11'."i didn't found any other statment to resume to selection Screen

        when 'CANCEL'.

       LEAVE PROGRAM.

*  WHEN OTHERS.

   ENDCASE.

ENDMODULE.        

1 ACCEPTED SOLUTION
Read only

FredericGirod
Active Contributor
0 Likes
2,050

Hi,

did you try   LEAVE TO SCREEN 0   ??

regards

Fred

11 REPLIES 11
Read only

FredericGirod
Active Contributor
0 Likes
2,051

Hi,

did you try   LEAVE TO SCREEN 0   ??

regards

Fred

Read only

0 Likes
2,050

Hi

Just use LEAVE TO SCREEN 0 as suggested by Frédéric Girod

CASE sy-ucomm.
     WHEN 'BACK'.
       LEAVE TO SCREEN 0.
   ENDCASE.

Read only

venkat_aileni
Contributor
0 Likes
2,050

Hi-

Try this code it should work:

WHEN 'BACK'.

*--to retrieve selection screen details

       CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'

         EXPORTING

           curr_report               = sy-repid

*       IMPORTING

*         SP                        =

         TABLES

           selection_table           = i_sel_table[]

*         SELECTION_TABLE_255       =

        EXCEPTIONS

          not_found                 = 1

          no_report                 = 2

          OTHERS                    = 3.

       IF sy-subrc = 0.

*--call report with abaove selection screen parameters

         SUBMIT <your report name> WITH SELECTION-TABLE i_sel_table

                          VIA SELECTION-SCREEN.

       ENDIF.

-Venkat

Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
2,050

Just do set screen 0

Read only

sivaganesh_krishnan
Contributor
0 Likes
2,050

hi abhishek,

LEAVE TO SCREEN 0 ,would work . Give it a try

Read only

Former Member
0 Likes
2,050

Hi,

Try like this,

if sy-ucomm = 'BACK'.

leave to screen 0.

endif.

Regards,

Riju Thomas.

Read only

Former Member
0 Likes
2,050

Hi,

LEAVE TO SCREEN 0.  try this one

OR

CALL TRANSACTION 'ZCO11'.

Read only

Former Member
0 Likes
2,050

hi all,

As most of you are saying:

LEAVE TO SCREEN 0. " then this is leaving me on sap session manager.(start of sap)

Read only

0 Likes
2,050

Abhishek ,

Did you give " LEAVE LIST-PROCESSING " a try ?

Read only

Former Member
0 Likes
2,050

Thanks all, Problem Solved.

The Below Statement Won.

LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.

Read only

0 Likes
2,050

Abhi ,

I was very near.

I was thinking whether to recommend this or not