This statement immediately ends the current processing block. It can appear in any area of a processing block and ends this block regardless of which statement block or control structure the statement is in.
After leaving the processing block, the runtime environment, except for the reporting event blockSTART-OF-SELECTION, follows the schema in Leave processing blocks.
After you end the reporting event block START-OF-SELECTIONwith RETURN, the runtime environment does not trigger any further reporting events, rather, it calls the list processor directly to display the basic list.
Leave the subprogram show_list with
RETURN, if one of the required formal parameters structure or data_tab is initial.
FORM show_list USING structure TYPE c
data_tab TYPE ANY TABLE.
DATA alv_list TYPE REF TO cl_gui_alv_grid.
IF structure IS INITIAL OR
data_tab IS INITIAL.
CREATE OBJECT alv_list
EXPORTING i_parent = cl_gui_container=>screen0.
CALL METHOD alv_list->set_table_for_first_display
EXPORTING i_structure_name = structure
CHANGING it_outtab = data_tab.
CALL SCREEN 100.