Folgende Benutzer bedankten sich beim Autor black_adept für den Beitrag:
tgb
Code: Alles auswählen.
lv_ebelp = ls_item-ebelp + 1.
DATA(lo_item_new) = im_item->get_header( )->create_item( lv_ebelp ).
DATA(ls_item_new) = lo_item_new->get_data( ).
ls_item_new = ls_item.
ls_item_new-ebelp = lv_ebelp.
...
lo_item_new->set_data( ls_item_new ).
Code: Alles auswählen.
clear lv_ebelp.
lv_ebelp = ls_item-ebelp + 10.
lu_item_new = im_item->get_header( ).
lo_item_new = lu_item_new->create_item( lv_ebelp ).
lo_item_new->get_persistent_data( EXCEPTIONS no_data = 1 ).
ls_item_new = lo_item_new->get_data( ).
ls_item_new-knttp = 'X'.
ls_item_new-ebelp = lv_ebelp.
ls_item_new-ematn = wa_stpo-idnrk.
ls_item_new-menge = wa_stpo-menge.
* ls_item_new-wepos = 'X'.
ls_item_new-eeind = ls_item-eeind.
lo_item_new->set_data( ls_item_new ).
Das sieht mir schon im Ansatz falsch aus.tgb hat geschrieben:Code: Alles auswählen.
clear lv_ebelp. lv_ebelp = ls_item-ebelp + 10. lu_item_new = im_item->get_header( ). lo_item_new = lu_item_new->create_item( lv_ebelp ). lo_item_new->get_persistent_data( EXCEPTIONS no_data = 1 ).