Code: Alles auswählen.
DATA: it_test TYPE HASHED TABLE OF test WITH UNIQUE KEY mandt,
wa_satz LIKE LINE OF it_test.
SELECTION-SCREEN BEGIN OF BLOCK selektion WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS : so_matnr FOR wa_satz-matnr.
PARAMETERS : p_vkorg LIKE wa_satz-vkorg.
SELECTION-SCREEN END OF BLOCK selektion.
wa_satz-mandt = sy-mandt.
wa_satz-matnr = so_matnr.
wa_satz-vkorg = p_vkorg.
wa_tumlm-vtweg = '01'.
.......
INSERT wa_satz INTO TABLE it_test.
INSERT test FROM TABLE it_test ACCEPTING DUPLICATE KEYS.
Code: Alles auswählen.
wa_satz-mandt = sy-mandt.
wa_satz-vkorg = p_vkorg.
wa_tumlm-vtweg = '01'.
LOOP AT so_matnr.
wa_satz-matnr = so_matnr-low.
INSERT wa_satz INTO TABLE it_test.
ENDLOOP.
Code: Alles auswählen.
LOOP AT so_matnr.
wa_satz-mandt = sy-mandt.
wa_satz-matnr = so_matnr-LOW.
wa_satz-vkorg = p_vkorg.
wa_satz-vtweg = '01'.
...
INSERT wa_satz INTO TABLE it_test.
INSERT test FROM TABLE it_test ACCEPTING DUPLICATE KEYS.
ENDLOOP.
Code: Alles auswählen.
INSERT test FROM TABLE it_test ACCEPTING DUPLICATE KEYS.
Code: Alles auswählen.
wa_satz-vkorg = p_vkorg.
wa_tumlm-vtweg = '01'.
LOOP AT so_matnr.
wa_satz-matnr = so_matnr-low.
append wa_satz TO TABLE it_test.
ENDLOOP.
modify test FROM TABLE it_test.