on 2024 Jul 23 10:42 PM
Hello friends, I want to change the LOEKZ field in EKPO as seen in the codes below. However, although BAPI returns a success message, LOEKZ does not change. Why could it be ? I add my code below .
LOOP AT lt_wf_td_003 INTO ls_wf_td_003.
APPEND INITIAL LINE TO lt_poitem ASSIGNING <fs_poitem>.
<fs_poitem>-po_item = ls_wf_td_003-ebelp.
<fs_poitem>-delete_ind = abap_false.
APPEND INITIAL LINE TO lt_poitemx ASSIGNING <fs_poitemx>.
<fs_poitemx>-po_item = ls_wf_td_003-ebelp.
<fs_poitemx>-po_itemx = abap_true .
<fs_poitemx>-delete_ind = abap_true.
UNASSIGN: <fs_poitem>,<fs_poitemx>.
ENDLOOP.
" Call BAPI To Update PO With Items Table
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = iv_doc_number+0(10)
TABLES
return = lt_return_po
poitem = lt_poitem
poitemx = lt_poitemx.
LOOP AT lt_return_po TRANSPORTING NO FIELDS WHERE type CA 'EAX'.
EXIT.
ENDLOOP.
IF sy-subrc NE 0. " No Error
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
ENDIF.
Please debug and check your Commit has triggered.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
3 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.