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: 

Error in updating pricing using BAPI_QUOTATION_CREATEFROMDATA2

Former Member
0 Kudos

Hi,

I am using the BAPI function module BAPI_QUOTATION_CREATEFROMDATA2. I am calling BAPI_TRANSACTION_COMMIT subsequently

I need to change an existing pricing condition ZMLT which is

automatically determined by the config while creating a sales quotation

Also I need to add ZFR1 and ZFR2 which are 2 freight condition types

(Condition Class = 'F')

Case 1

-


If I set the LOGIC-SWITCH-COND_HANDL = 'X', then I can correctly update

ZMLT using CONDITIONS_IN parameter, but I can't update ZFR1 and ZFR2

since they are freight condition types (as per Note 593246)

Case 2

-


If I set LOGIC-SWITCH-COND_HANDL = ' ', then I can correctly update

ZFR1 and ZFR2 freight condition types using the parameters

CONDITIONS_IN and CONDITIONS_INX. But when I try to update ZMLT, it

deactivates the existing line in the pricing and adds a new line with

same condition type ZMLT. Why does it do this...?

Here are the parameters that I am using as per Note 593246, Point 4

CONDITIONS_IN-ITM_NUMBER = '000010'

CONDITIONS_IN-COND_COUNT = '01'

CONDITIONS_IN-COND_TYPE = 'ZMLT'

CONDITIONS_IN-COND_VALUE = 12.00

CONDITIONS_IN-CURRENCY = ' ' (This is a percentage)

CONDITIONS_INX-ITM_NUMBER = '000010'

CONDITIONS_INX-COND_COUNT = '01'

CONDITIONS_INX-COND_TYPE = 'ZMLT'

CONDITIONS_INX-UPDATEFLAG = 'U'

CONDITIONS_INX-COND_VALUE = 'X'

CONDITIONS_INX-CURRENCY = 'X'

Please advise on this. Although the Total Value in the pricing is

correctly updated, why does it deactivate one line and insert a new one

for the same condition type.

Please note that my requirement is to add condition types ZFR1, ZFR2

and update ZMLT

Thanks and Regards,

Aditya Palekar

1 ACCEPTED SOLUTION

christian_wohlfahrt
Active Contributor
0 Kudos

Hi!

You have very well prepared this example!

...and you analyzed it completely, this behavior is just the restriction you have to live with.

Old style condition handling couldn't change values, so workaround with adding new line and inactive existing line was done. New condition handling has restrictions, too - so no freights.

Why does it do this... it's a buggy feature or whatever you would like to call it. At least it was done by purpose, what internal reasons lead to this, I can't say.

One workaround would be possible for you: create quotation with cond_handl = A, change afterwards with cond_handl = B.

If you start with A = X and B = space or A = space and B = X should be the same in the end.

Regards,

Christian

1 REPLY 1

christian_wohlfahrt
Active Contributor
0 Kudos

Hi!

You have very well prepared this example!

...and you analyzed it completely, this behavior is just the restriction you have to live with.

Old style condition handling couldn't change values, so workaround with adding new line and inactive existing line was done. New condition handling has restrictions, too - so no freights.

Why does it do this... it's a buggy feature or whatever you would like to call it. At least it was done by purpose, what internal reasons lead to this, I can't say.

One workaround would be possible for you: create quotation with cond_handl = A, change afterwards with cond_handl = B.

If you start with A = X and B = space or A = space and B = X should be the same in the end.

Regards,

Christian