What is BAPI_PO_CREATE1
BAPI_PO_CREATE1 is the function module that is allowed you to create purchase orders, this BAPI use the technology behind the enjoy purchase order transaction ( ME21N).
In this article i would share you the solution when you cannot input net price ( net price always 0 ) when using BAPI_PO_CREATE1 to create Purchase Orders although you have inputted net price.
I have posted how to use this BAPI in another article with ABAP Full source code, you can read it on this link ,
What the solution when you cannot input net price
I have searched and gather those result, Actually there are two solutions that applicable ( i think ) for this problem.
- Populate Condition and input your net price into condition value.
- Input value PO_ITEM-PO_PRICE field with ‘2’.
I try to implemented those solutions, but still cannot input net price. but at last i found the solution, this is very simple solution. You must populate Invoice Receipt Indicator field ( PO_ITEM-IR_IND ) with ‘X’ value, input PO_ITEMX-IR_IND with ‘X’ and populate NO_PRICE_FROM_PO field with ‘X’ value.
i_poitems-ir_ind = 'X'.
i_poitemsx-ir_ind = 'X'.
append : i_poitems, i_poitemsx.
CALL FUNCTION 'BAPI_PO_CREATE1'
poheader = wa_poheader
poheaderx = wa_poheaderx
testrun = cb_test
no_price_from_po = 'X'
Voila you success create purchase orders with you own net price.