Symptom
When try to create Purchase Order (PO) by BAPI_PO_CREATE1, the number entered in POITEM-PO_ITEM is not taken into the created PO.
创建采购订单行项目需要按照自定义参数设置的需求
Steps
- Run T-code SE37 and input Function Module BAPI_PO_CREATE1.
- Go to menu and select "Function Module" -> "Test" -> "Test sequences".
- Input BAPI_PO_CREATE1 and BAPI_TRANSACTION_COMMIT, then press [execute] button.
- Fill the import parameters including following fields:
POITEM-PO_ITEM 1
POITEMX-PO_ITEM 1
PO_ITEMX X - Execute BAPI_PO_CREATE1 and BAPI_TRANSACTION_COMMIT and check the PO created.
- Run T-code ME23N to display the PO which created in step 5.
- Item number is 10 which is (taken from customizing) not taken from BAPI.
Cause
POHEADER-ITEM_INTVL and POHEADERX-ITEM_INTVL are not maintained in the input data of BAPI_PO_CREATE1.
Resolution
Fill POHEADER-ITEM_INTVL and POHEADERX-ITEM_INTVL as following:
POHEADER-ITEM_INTVL 0000 <<<<<< (initial)
POHEADERX-ITEM_INTVL X