‎2005 Nov 24 2:18 PM
Hi,
I create quotations by using the function module BAPI_QUOTATION_CREATEFROMDATA2. So far I was able to create and overwrite price conditions on the item level. I am using the following code:
wa_cond-itm_number = wa_data-linenumber.
wa_cond-cond_type = 'PR00'.
wa_cond-cond_value = 10.
insert wa_cond into table tab_cond.So far my codition values were never zero but now I have to add a condition with the value = zero:
wa_cond-itm_number = wa_data-linenumber.
wa_cond-cond_type = 'ZPN0'.
wa_cond-cond_value = 0.
insert wa_cond into table tab_cond.Unfortunately this code does not work. When I call the bapi I get the message "000001 : Condition rate does not agree with init. indicator for condition ZPN0".
When I create a quotation manually I can add the condition with an initial value which in the GUI is not zero but "".
Is there a special flag which I have to set when I want to create a condition with an initial value?
regards
Thomas
‎2005 Nov 24 4:36 PM
Hi Thomas!
Which release you are using? I found note 593246:
"This note describes the new functions developed for Release 4.7 for the maintenance of conditions in SD-BAPIs.
Using BAPIs designed for creating and changing sales and distribution documents in order to add individual condition items in an existing result of pricing was up to now subject to restrictions. Deletions or creations with condition rate '0' were not possible either.
As of Release 4.70, most of these restrictions are eliminated."
So before 4.70 - bad luck.
Regards,
Christian
‎2005 Nov 24 4:36 PM
Hi Thomas!
Which release you are using? I found note 593246:
"This note describes the new functions developed for Release 4.7 for the maintenance of conditions in SD-BAPIs.
Using BAPIs designed for creating and changing sales and distribution documents in order to add individual condition items in an existing result of pricing was up to now subject to restrictions. Deletions or creations with condition rate '0' were not possible either.
As of Release 4.70, most of these restrictions are eliminated."
So before 4.70 - bad luck.
Regards,
Christian
‎2005 Nov 25 8:10 AM
Hello Christian,
we are using a 620 system so it should be fine.
regards
Thomas
‎2005 Nov 25 9:26 AM
Hi Thomas!
Then we can go further in note 593246:
you should
1. Switch for activating the new condition item handling:
Import parameter LOGIC_SWITCH-COND_HANDLE = 'X'.
6. Addition of a condition with amount '0.00':
ORDER_CONDITIONS_IN-ITM_MUMBER = '000010'
ORDER_CONDITIONS_IN-COND_TYPE = 'PR00'
ORDER_CONDITIONS_IN-COND_VALUE = '0,0000'
ORDER_CONDITIONS_IN-CURRENCY = 'EUR'
ORDER_CONDITIONS_INX-ITM_MUMBER = '000010'
ORDER_CONDITIONS_INX-COND_TYPE = 'PR00'
ORDER_CONDITIONS_INX-UPDATEFLAG = 'I'
ORDER_CONDITIONS_INX-COND_VALUE = 'X'
ORDER_CONDITIONS_INX-CURRENCY = 'X'
Result: The condition is created with amount '0.00'.
Regards,
Christian
‎2005 Nov 26 3:03 PM
Hi Christian,
sorry for the late reply but it's quite hectic at work, at the moment
You are right the note was exactly what I needed. Thanks for the hint.
regards
Thomas
‎2005 Nov 24 5:51 PM
Hi,
HAve you populated this structure:
<b> QUOTATION_CONDITIONS_INX LIKE BAPICONDX Communication Fields for Maintaining Conditions in the Order</b>
Check the above given structure in this BAPI and popualte it accordingly.
Basically this is the Change structure.
In this some fields are to be checked with 'X' for those fields which you are going to update in the DB tables.
Hope it works...
‎2005 Nov 25 8:14 AM
Hi,
no i did not have populated it because the other conditions are working fine without this structure. Furthermore when I try to add the condition with a value other than zero it works perfectly!
Why do I have to fill this structure? I do not update a quotation I <b>create</b> one. How should I fill it?
regards
Thomas