创建生产订单:
'BAPI_PRODORD_CREATE‘
CALL FUNCTION 'BAPI_PRODORD_CREATE'
EXPORTING
ORDERDATA = I_ORDDATA
IMPORTING
RETURN = I_RETURN
ORDER_NUMBER = I_ORDER_NUMBER
ORDER_TYPE = I_ORDER_TYPE.
输入参数主要看orderdata,填入生产订单所需信息
order_number 是输出信息
return 中保留了出错信息,如果有E类型的消息的话。
修改生产订单:
'BAPI_PRODORD_CHANGE'
CALL FUNCTION 'BAPI_PRODORD_CHANGE' "BAPI: Change Production Order EXPORTING number = " bapi_order_key-order_number Production Order Number orderdata = " bapi_pp_order_change Transfer Structure for Changing Production Orders orderdatax = "