‎2011 Jul 11 1:02 PM
Hi ,
Iam using Grid_display , and i kept a PF-Status and calling another grid based on the check box selected . now my output is in second display . when i press back button it should come to the selection screen . i used call selection-screen 1000 . its coming to selection screen . when i press back again its gng back to the 2nd grid , its not gng to the program from selection screen .
how to resolve this .
Thanks
‎2011 Jul 11 1:11 PM
hai,
in 2nd grid use this code.
case sy-ucomm.
when 'back'.
leave to current program.
leave to transaction.
endcase.
‎2011 Jul 11 3:13 PM
‎2011 Jul 11 3:18 PM
Hi
Remove the call selection screen.Create the transaction for Program and run the program using the t.code.
Try with below code.
When 'BACK'.
Call Transaction 'Transaction Name'.
(OR).
When 'BACK'.
Leave to screen 0.
Regards,
Raghu.
‎2011 Jul 11 3:27 PM
i tried using Leave to screen 0 . but its going back to first grid instead of selection screen.
Edited by: kuladeep reddy on Jul 11, 2011 5:11 PM
‎2011 Jul 11 4:55 PM
Go to the "Status" for the program you entered in the PF-Status in SE41 and look for the button code for the green back arrow under the Function Keys (you need to expand it).
In ECC 6.0 it is '&F03' in some statuses it's 'BACK' then use that code in your User command of ALV.
‎2011 Jul 11 5:30 PM
Solved .... Need to pass rs_selfield-exit = 'X'. Then it dirctly goes to selection screen instead of previous grid display
es_exit_caused_by_user TYPE slis_exit_by_user.
CASE r_ucomm.
WHEN comand_to_show_second_grid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = g_repid
IMPORTING
es_exit_caused_by_user = es_exit_caused_by_user
TABLES
t_outtab = second_outtab
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF NOT es_exit_caused_by_user IS INITIAL.
rs_selfield-exit = 'X'.
ENDIF.
ENDCASE.