Application Development 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: 

'Net price must be greater than 0' error in BAPI_PO_CHANGE

Former Member
0 Kudos

Hi ,

When I call BAPI  BAPI_PO_CHANGE getting error Net price must be greater than 0.

I have passed net price value and po_itemx- = x also for price.

But still getting this error.please find the attachment.

Please suggest me, how to proceed.

Thank you.

Regards,

Shivajiraju.

21 REPLIES 21

JL23
Active Contributor
0 Kudos

Can you describe what change you are actually doing?

Do you add a new item or do you change an existing item?

Former Member
0 Kudos

Hi Jurgen,

Thank you for your response.

Yes I am creating new item with this BAPI.

Please suggest me that what are the mandatory values should i need to pass to the bapi sturctures

Thank you.

Regards,

Shivajiraju.

JL23
Active Contributor
0 Kudos

do you have the currency in the POHEADER?

Former Member
0 Kudos

Yes .and also passing  ls_poheaderx-currency = 'X'.

JL23
Active Contributor
0 Kudos

What value do you have in POITEM-CALCTYPE ?

Did you already try this scenario in ME22N, if you get the same error then it has not much to do with the BAPI, then you there are probably conditions missing

Former Member
0 Kudos

I have not passed POITEM-CALCTYPE.


Could you please tell me what is the significance of this field?


Thank you.


Regards,

Shivajiraju.

JL23
Active Contributor
0 Kudos

It defines whether a price determination is carried out.

Please check OSS note for further details: 580225 - Purchasing BAPIs: Conditions and pricing

Former Member
0 Kudos

Hi Jurgen,

I am creating new item with BAPI_PO_CHANGE with new quantity and price .

So please tell me what is the possible value which i need to pass to POITEM-CALCTYPE.

Thank you.

Regards,

Shivajiraju.

Former Member
0 Kudos

Hi Jurgen,


Condition tables POCOND and POCONDHEADER are mandatory to create the PO item using this BAPI.


Thank you.


Regards,

Shivajiraju.

JL23
Active Contributor
0 Kudos

No condition tables are not mandatory, but you really should read the OSS note that I gave you earlier. If you do not have access then ask a colleague in your company to download it for you, or talk to your Basis team to grant you access to the SAP Marketplace.

The note exactly explains what settings you need to do. You should also sit together with your functional colleague who (should) know how the price determination works.

You can get prices determined from existing conditions, but you can as well define conditions in the PO itself, and if it the most easy version of a PO then you just need the net price.

But all these decisions are based on indicators that you have to pass in your call.

Read the note.

Former Member
0 Kudos

Hi Shivaji,

Please check if you are passing the values in tables POCONDHEADER and POCONDHEADERX , and other condition related tables.

Regards

Rohit

0 Kudos

Hi Rohit,

Thank you fro your response.

Yes I have passed values to POCONDHEADER and POCONDHEADERX.

Could you tell me what are the condition related tables..

What are the mandatory values which i need to pass to POCONDHEADER and POCONDHEADERX. and condition tables.

Thank you.

Regards,

Shivajiraju.

thanga_prakash
Active Contributor
0 Kudos

Hello Shivajiraju,

Did you pass PRICE_UNIT value also to the BAPI. If not, pass the price unit field and check.

Regards,

Thanga

0 Kudos

Hi Prakash,

Thank you for your response.

I have  not [passed PRICE_UNIT .

Could you please suggest me to which structure need to pass.

Thank you.

Regards,

Shivajiraju.

0 Kudos

Hi Shivajiraju,

Pass them to the tables parameter POITEM-PRICE_UNIT and also pass 'X' to POITEMX-PRICE_UNIT.

Regards,

Thanga

raymond_giuseppi
Active Contributor
0 Kudos

How did you (if you did) fill following parameter and subfields

  • NO_PRICE_FROM_PO
  • POITEM-PO_PRICE (correct value '2' suggested from your post)
  • POITEM-CALCTYPE
  • POCOND-CHANGE_ID
  • POCONDHEADER-CHANGE_ID

Regards,

Raymond

0 Kudos

Hi Raymond,

Thank you for your response.

I have not passed the values which you mentioned above.

Could you please tell me What could be the possible values for

  • POITEM-CALCTYPE.

and

  • NO_PRICE_FROM_PO belongs to  which structure and what could be the possible value.

Thank you.

Regards,

Shivajiraju.

0 Kudos

Hello Shivajiraju,

Did you try the below option.

Pass them to the tables parameter POITEM-PRICE_UNIT and also pass 'X' to POITEMX-PRICE_UNIT.

Regards,

Thanga

0 Kudos

Hi Prakash,

I have not yet passed the PRICE_UNIT VALUE.

I will do this step and please tell what could be the possible value for  PRICE_UNIT.

I am creating new item with this BAPI.

Thank you.

Regards,

Shivajiraju.

0 Kudos

Hello Shivajiraju,

Refer to the field PEINH in EKPO table for the possible values.

Regards,

Thanga

0 Kudos

Hi Prakash,

I have passed the field PRICE_UNIT value  and also passed 'X' to the PO-ITEM,PO-ITEMX.

But no luck,please clarify one thing, condition tables are mandatory to create new item using this BAPI. I am not passing values of condition tables as of now. if mandatory please give me some

inputs that what are the values which I need to pass to the Condition tables.

Thank you.

Regards,

Shivajiraju.