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

hi experts

Former Member
0 Likes
472

can any body give me solution for

i using alv grid and

when i press back button then it will print the header on list display

then it go to selection screen.....

i want it go directly to selection scree.

if it is helpful then rewarded.....with full.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
453

in the PAI of the ALV screen...

when OK_CODE = 'BACK' submit the original report...

this way the report will navigate to the selection screen directly.. and the report will start its execution from initial code...

can any body give me solution for

i using alv grid and

when i press back button then it will print the header on list display

then it go to selection screen.....

i want it go directly to selection scree.

if it is helpful then rewarded.....with full.

3 REPLIES 3
Read only

Former Member
0 Likes
454

in the PAI of the ALV screen...

when OK_CODE = 'BACK' submit the original report...

this way the report will navigate to the selection screen directly.. and the report will start its execution from initial code...

Read only

Former Member
0 Likes
453

Hi,

You need to first call the EVENTS FM to get the events

CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
   EXPORTING
     i_list_type           = 2
   IMPORTING
     et_events             = it_events
*  EXCEPTIONS
*    LIST_TYPE_WRONG       = 1
*    OTHERS                = 2
            .
  IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

then modify the events table which is obtained by the above FM

READ TABLE it_events INTO wa_event WITH KEY name = 'USER_COMMAND'.
  IF sy-subrc EQ 0.
    wa_event-form = 'USER_COMMAND'.
    MODIFY it_events FROM wa_event TRANSPORTING form
    WHERE name = wa_event-name.
  ENDIF.

And finally in the routine write the code for what you need to process.

FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
 
  CASE r_ucomm.
 
    WHEN '&BACK_PRO'. 
         Your code to do what ever u want.
  ENDCASE.
ENDFORM.                    "user_command

Regards,

Omkar.

Read only

Former Member
0 Likes
453

i think you8 are using different screen for both alv grid(102) and selection screen(101)

if this is the case

then at

case ok_code.

when 'BACK'.

leave to screen 100.

endcase.

Another solution i think you can use is just take one screen say 100 and add a subscreen are for selection screen and a custome controller for alv.

I think it will be a better view with just one single screen.

all you have to do is refresh table display

reward if useful.