BAPI_PO_CREATE1 POITEM-PO_ITEM is not as expected

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

  1. Run T-code SE37 and input Function Module BAPI_PO_CREATE1.
  2. Go to menu and select "Function Module" -> "Test" -> "Test sequences".
  3. Input BAPI_PO_CREATE1 and BAPI_TRANSACTION_COMMIT, then press [execute] button.
  4. Fill the import parameters including following fields:
                       POITEM-PO_ITEM    1
                       POITEMX-PO_ITEM  1
                       PO_ITEMX                 X
  5. Execute BAPI_PO_CREATE1 and BAPI_TRANSACTION_COMMIT and check the PO created. 
  6. Run T-code ME23N to display the PO which created in step 5.
  7. 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

 
原文地址:https://www.cnblogs.com/springzt/p/15242506.html