cancel
Showing results for 
Search instead for 
Did you mean: 

Setting a price condition through a BAPI

Former Member
0 Kudos

Hi,

I have the following problem - I am trying to set a condition on an item in a quotation using the BAPI_CUSTOMERQUOTATION_CHANGE. The error that I get back is "Requirements are not fulfilled for condition PN00".

When I try to set the condition manually through VA22, I can set it without any problems. Through the transaction V/08 I can also see that the requirement has been set to "2" (Item with pricing).

Does anyone have any idea what the problem could be? What really stumps me is that using the GUI, I can set this condition without problems. It is only through the BAPI that I run into this error.

I have also used the same code in another example to set conditions without problems. The only thing different in this case is that the Item where I am setting the condition is a lower level item - the item number 10 is the high level item for this position. Is it possible that this plays a role in this case?

Bye

Sameer

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sameer,

Don't forget that to change a value with a BAPI you must modify to table :

QUOTATION_HEADER_IN = contains the value

QUOTATION_HEADER_INX = contains a boolean : which values are modified.

Best regards,

Mathieu.

PS : reward points if helpfull

Former Member
0 Kudos

Hi Mathieu,

I am setting the flag in the HEADER_INX too, sorry I forgot to mention that

Although I am only setting the update flag to U. I could not find any field/flag that has to do anything with conditions in the header structure.

As I am setting the conditions on line items (positions), I fill in the QUOTATION_ITEM_IN and QUOTATION_ITEM_INX structures accordingly to update the positions.

Could you please tell which fields you mean when you say that I need to fill something up also in the header and header_inx structures? (Other than the Update flag of course)

Thanks,

Sameer

Former Member
0 Kudos

Hi,

for example in the QUOTATION_HEADER_IN you want to set the value SALES_ORG to "SWISS".

You need to define :

QUOTATION_HEADER_IN --> SALES_ORG = "SWISS"

QUOTATION_HEADER_INX -->SALES_ORG = "X"

Don't forget after to call the BAPI : BAPI_TRANSACTION_COMMIT or BAPI_TRANSACTION_ROLLBACK!

Best regards,

Mathieu

PS : reward points if helpfull

Former Member
0 Kudos

Hi!

The quotation exists already in the SAP R/3 system - therefore the Sales Organisation and other data are already in the quotation.

All I want to do is add new conditions to positions in the quotation. The positions are also already saved in the quotation.

Bye!

Sameer

Former Member
0 Kudos

Hi Mathieu,

the parameter for the Item number was being sent wrong - my application was trying to set conditions on a item which did not accept any and so ran into problems.

I set the item number correct and now it works

Thanks for looking into it anyways!

Sameer

Answers (0)