本文主要是介绍外向交货单发货过账BAPI:WS_DELIV…,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
*&---------------------------------------------------------------------*
*&外向交货单发货过账
*&---------------------------------------------------------------------*
PARAMETERS :P_VBELN TYPE VBELN . "外向交货单
DATA :G_LIKP LIKE LIKP .
*&外向交货单发货过账
*&---------------------------------------------------------------------*
PARAMETERS :
DATA :G_LIKP
DATA : I_VBKOK TYPE VBKOK .
DATA :LT_LIPS LIKE TABLE OF LIPS WITH HEADER LINE .
DATA :I_VBPOK_TAB TYPE TABLE OF VBPOK WITH HEADER LINE .
DATAET_PROT LIKE TABLE OF PROTT WITH HEADER LINE .
START-OF-SELECTION .
“获取交货单数据
SELECT SINGLE * INTO G_LIKP FROM LIKP
WHERE VBELN = P_VBELN .
SELECT * INTO TABLE LT_LIPS FROM LIPS
WHERE VBELN = G_LIKP -VBELN .
"-----VL02N--------
I_VBKOK -VBELN_VL = P_VBELN . "<- Delivery number
I_VBKOK -WABUC = 'X' . "<- Automatic PGI
I_VBKOK -WADAT_IST = G_LIKP -BLDAT .
"填充行项目数据
LOOP AT LT_LIPS .
I_VBPOK_TAB -VBELN_VL = P_VBELN . "<- Delivery number
I_VBPOK_TAB -POSNR_VL = LT_LIPS -POSNR .
I_VBPOK_TAB -VBELN
DATA :LT_LIPS
DATA :I_VBPOK_TAB
DATA
START-OF-SELECTION .
“获取交货单数据