Skip to Content
author's profile photo Former Member
Former Member

Change Price with BAPI_PO_CREATE

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2005 at 06:52 PM

    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
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 01, 2005 at 09:39 AM

    try to refill the fields of currency and unit of measure.

    I what I do is to see that fields refill ME21N and rellanar the structures.

    Regards.

    Carlos

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.