Hello, i am trying to create a purchase order using BAPI_PO_CREATE, everything is working fine except price modification. All positions are created with organization and warehouse, but the prices is not changed, it uses the list price.
The code i am using is as follows:
For the header:
MOVE: SY-DATUM TO PO_HEADER-DOC_DATE,
'ZREN' TO PO_HEADER-DOC_TYPE,
'F' TO PO_HEADER-DOC_CAT,
P_DIVI TO PO_HEADER-PURCH_ORG,
'10' TO PO_HEADER-PUR_GROUP,
WERKS TO PO_HEADER-SUPPL_PLNT,
'0000000001' TO PO_HEADER-VENDOR,
V_PEDIDO TO PO_HEADER-PO_NUMBER.
For the positions:
MOVE: V_PEDIDO TO PO_ITEMS-PO_NUMBER,
V_POS+4(6) TO PO_ITEMS-PO_ITEM,
I_ARCHIVO-PED_MAT TO PO_ITEMS-PUR_MAT,
WERKS TO PO_ITEMS-PLANT,
LGORT TO PO_ITEMS-STORE_LOC,
PO_ITEMS-NET_PRICE = V_PRECIO.
PO_ITEMS-DISP_QUAN = V_CANTIDAD.
APPEND PO_ITEMS.
MOVE: V_POS+4(6) TO PO_ITEM_SCHEDULES-PO_ITEM,
SY-DATUM TO PO_ITEM_SCHEDULES-DELIV_DATE.
PO_ITEM_SCHEDULES-QUANTITY = I_ARCHIVO-CANTIDAD.
APPEND PO_ITEM_SCHEDULES.
Any clues as to why the price in my table isn't used? I get no error message, it just doesn't work.
Any help would be highly appreciated.
Rgds.
-- David
Hello, i was checking the notes and found out that i need to set the following field PO_PRICE to 'X' so it reads the price from the interface. However, now i am getting the following error message:
Quantity conversion error in net price calculation
Document contains no items
Any idea what is going on?
Thanks
Add a comment