Code: Alles auswählen.
*Interaktion über das erste ALV-Grid
CASE e_ucomm.
WHEN 'DETAIL'.
herkunft = 'unbest'.
CALL METHOD unbest_grid_alv->get_selected_rows
IMPORTING et_index_rows = lt_rows.
CALL METHOD cl_gui_cfw=>flush.
IF sy-subrc NE 0.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = g_repid
txt2 = sy-subrc
txt1 = 'Error in Flush'(500).
ELSE.
PERFORM position_details TABLES lt_rows.
ENDIF.
ENDCASE.
Code: Alles auswählen.
FORM position_details TABLES p_lt_rows STRUCTURE lvc_s_row.
DATA: ls_selected_line LIKE lvc_s_row,
lf_row_index TYPE lvc_index.
CLEAR itab_vbap.
REFRESH itab_vbap.
IF NOT p_lt_rows[] IS INITIAL.
LOOP AT p_lt_rows.
CASE herkunft.
WHEN 'unbest'.
READ TABLE itab_rumpf INTO wa_itab_rumpf
INDEX p_lt_rows-index.
WHEN 'best'.
READ TABLE itab_rumpf_best INTO wa_itab_rumpf_best
INDEX p_lt_rows-index.
ENDCASE.
PERFORM detaildaten.
ENDLOOP.
CALL SCREEN 201 STARTING AT 10 5.
ENDIF.
IF p_lt_rows[] IS INITIAL.
MESSAGE i024(zcem) WITH 'Bitte markieren Sie eine'
'oder mehrere zeilen'.
* & & & &
ENDIF.
ENDFORM. " position_details
Code: Alles auswählen.
MODULE aufbau_0201 OUTPUT.
SET PF-STATUS '0201'.
PERFORM fcat_detail.
CALL FUNCTION 'WLF_GET_ID_FOR_VARIANT'
EXPORTING
i_handle = '0201'
IMPORTING
e_variant = l_variant_d
CHANGING
p_save = l_save_d.
IF detail_alv IS INITIAL.
CREATE OBJECT detail_alv
EXPORTING container_name = 'DETAIL_ALV'.
CREATE OBJECT detail_grid_alv
EXPORTING i_parent = detail_alv.
ENDIF.
CALL METHOD detail_grid_alv->set_table_for_first_display
EXPORTING
i_structure_name = 'VBAP'
it_toolbar_excluding = lt_excl_func_d
is_variant = l_variant_d
is_layout = l_layout_d
i_save = l_save_d
CHANGING
it_outtab = itab_vbap.
ENDMODULE. " AUFBAU_0201 OUTPUT
Code: Alles auswählen.
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0201 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE user_command_0201 INPUT.
CASE ok-code.
WHEN 'RETURN'. "Zurück Button
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_0201 INPUT