*&---------------------------------------------------------------------* *& Report YBO_NOTE05 *&---------------------------------------------------------------------* *& *&---------------------------------------------------------------------* REPORT YBO_NOTE05 . DATA: L_TB_ITEM TYPE STANDARD TABLE OF BAPIDLVREFTOSALESORDER WITH DEFAULT KEY, L_ST_ITEM LIKE LINE OF L_TB_ITEM, L_DELIV_NUMB TYPE BAPISHPDELIVNUMB-DELIV_NUMB, LT_ITEM_CRT TYPE STANDARD TABLE OF BAPIDLVITEMCREATED WITH DEFAULT KEY, LS_ITEM_CRT LIKE LINE OF LT_ITEM_CRT, LT_DELIVERIES TYPE STANDARD TABLE OF BAPISHPDELIVNUMB WITH DEFAULT KEY, LS_DELIVERIES LIKE LINE OF LT_DELIVERIES, L_TB_RETURN TYPE STANDARD TABLE OF BAPIRET2 WITH DEFAULT KEY, L_ST_RETURN LIKE LINE OF L_TB_RETURN. L_ST_ITEM-REF_DOC = '7800000033'. L_ST_ITEM-REF_ITEM = '000010'. L_ST_ITEM-DLV_QTY = 1. L_ST_ITEM-SALES_UNIT = 'KG'. APPEND L_ST_ITEM TO L_TB_ITEM . CALL FUNCTION 'BAPI_OUTB_DELIVERY_CREATE_SLS' * EXPORTING * SHIP_POINT = * DUE_DATE = * DEBUG_FLG = * NO_DEQUEUE = ' ' IMPORTING DELIVERY = L_DELIV_NUMB * NUM_DELIVERIES = TABLES SALES_ORDER_ITEMS = L_TB_ITEM * SERIAL_NUMBERS = * EXTENSION_IN = DELIVERIES = LT_DELIVERIES CREATED_ITEMS = LT_ITEM_CRT * EXTENSION_OUT = RETURN = L_TB_RETURN. COMMIT WORK AND WAIT . LOOP AT L_TB_RETURN INTO L_ST_RETURN. WRITE: / , L_DELIV_NUMB . WRITE: / , L_ST_RETURN-TYPE,' : ', L_ST_RETURN-MESSAGE. ENDLOOP.
标签:RETURN,创建,DELIVERIES,ST,ITEM,LT,交货单,TB From: https://www.cnblogs.com/icebo/p/18197438