Interactive ALV
Hi All,
I'm writing a integration report between PA/OM, and the report is displayed in ALV grid. The first level of report displays the entries - user selectable, to be updated, and on the second level is the result of the update (successful/unseccessful).
On the 2nd level, if I BACK, EXIT or CANCEL, the program goes back to the 1st level. How can I go back to selection screen after these function codes?
I tried defining the functions codes in IT_EVENT_EXIT, but to no avail. It always takes me back to 1st level.
Thanks for the help,
Nixter
If you use REUSE* FM then you should do something like this:
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = g_repid
i_callback_user_command = 'USER_COMMAND'
TABLES
t_outtab = first_outtab
EXCEPTIONS
program_error = 1
OTHERS = 2.
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
DATA:
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.
ENDFORM.
Note the usage of rs_selfield-exit field.
_________________
Best regards, Sergey Korolev
Thanks Sergei. The solution you posted works perfectly.
Regards,
Nixter