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

ALV Back to selection screen problem?

Former Member
0 Likes
1,110

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

6 REPLIES 6
Read only

Former Member
0 Likes
885

hai,

in 2nd grid use this code.

case sy-ucomm.

when 'back'.

leave to current program.

leave to transaction.

endcase.

Read only

0 Likes
885

HI Harita

I tried but no luck .

Read only

Former Member
0 Likes
885

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.

Read only

0 Likes
885

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

Read only

0 Likes
885

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.

Read only

0 Likes
885

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.