SAP 参照sto订单创建外向交货BAPI
Posted 明大叔
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了SAP 参照sto订单创建外向交货BAPI相关的知识,希望对你有一定的参考价值。
DATA: VSTEL LIKE TVST-VSTEL, "装运点/接收点 NUM_DELIVERIES TYPE VBNUM, STOCK_TRANS_ITEMS LIKE BAPIDLVREFTOSTO OCCURS 0 WITH HEADER LINE. SHIP_POINT = ‘1000‘. "装运点 STOCK_TRANS_ITEMS-REF_DOC = ‘4500000000‘. "参考凭证 APPEND STOCK_TRANS_ITEMS. REFRESH LT_RETURN. CALL FUNCTION ‘BAPI_OUTB_DELIVERY_CREATE_STO‘ EXPORTING SHIP_POINT = SHIP_POINT IMPORTING DELIVERY = LF_VBELN NUM_DELIVERIES = NUM_DELIVERIES TABLES STOCK_TRANS_ITEMS = STOCK_TRANS_ITEMS DELIVERIES = DELIVERIES CREATED_ITEMS = CREATED_ITEMS EXTENSION_OUT = EXTENSION_OUT RETURN = RETURN. IF NOT LF_VBELN IS INITIAL. CALL FUNCTION ‘BAPI_TRANSACTION_COMMIT‘ EXPORTING WAIT = ‘X‘. ENDIF.