REPORT z0304.
DATA:ls_return TYPE bapiret2,
lt_aufnr TYPE TABLE OF bapi_order_key WITH HEADER LINE,
lt_detail TYPE TABLE OF bapi_order_return WITH HEADER LINE.
lt_aufnr-order_number = '001000160107'."生产订单号加上前导零
APPEND lt_aufnr.
CALL FUNCTION 'BAPI_PRODORD_SET_DELETION_FLAG'
IMPORTING
return = ls_return
TABLES
orders = lt_aufnr
detail_return = lt_detail.
LOOP AT lt_detail WHERE type = 'I'.
IF lt_detail-type = 'I'.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
ENDIF.
ENDLOOP.
SAP中生产订单CO02删除标记激活的bapi是BAPI_PRODORD_SET_DELETION_FLAG
最新推荐文章于 2024-09-11 13:30:00 发布