Hi all,
I want to change the value of the Document category of preceding SD document.
But it does not work...
order_headerx-updateflag = 'U'.
CLEAR: order_item, order_itemx.
REFRESH: order_item, order_itemx.
order_item-itm_number = it_vbap-posnr.
order_item-ref_doc_ca = 'A'.
APPEND order_item.
order_itemx-itm_number = it_vbap-posnr.
order_itemx-updateflag = 'U'.
order_itemx-ref_doc_ca = 'X'.
APPEND order_itemx.
Change Quotes
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = it_vbap-vbeln
order_header_inx = order_headerx
TABLES
return = return
order_item_in = order_item
order_item_inx = order_itemx.
APPEND LINES OF return TO return_all.
IF sy-subrc EQ 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
ENDIF.
Any ideas?
regards