Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BAPI_PO_CREATE1 with contract price problem

Former Member
0 Likes
1,785

Hi. When we manually create a PO against a value contract it is possible to change the price from that on the contract.

For example if the contract has £1 we can raise the PO for £12.

If I try and create a PO using BAPI_PO_CREATE1 then the PO always takes the price of the contract.

Are there any fields in the BAPI that I can set to make the manual price override the contract price?

I have tried various fields and conditions so far and had no luck.

I think it should be possible to do this becuase we can manually create POs in ME21N with a price different to the contract.

Thanks a lot for your help.

Dave.

2 REPLIES 2
Read only

Former Member
1,013

Hi,

to be able to get the prices manually in the PO I filled the following 4 fields at PO level:

data:

POITEM type table of BAPIMEPOITEM WITH HEADER LINE,

POITEMX type table of BAPIMEPOITEMX WITH HEADER LINE,

...

poitem-NET_PRICE = ekpo-NETPR.

poitem-PRICE_UNIT = EKPO-PEINH.

poitem-po_price = '2'

poitem-CALCTYPE = 'B'.

...

poitemx-NET_PRICE = x.

poitemx-PRICE_UNIT = x.

poitemx-PO_PRICE = x.

poitemx-CALCTYPE = x.

...

CALL FUNCTION 'BAPI_PO_CREATE1'

EXPORTING

...

TABLES

RETURN = treturn

POITEM = poitem

POITEMX = poitemx

...

Kind Regards

Read only

mvoros
Active Contributor
0 Likes
1,013

More info can be found in 580225.

Cheers