‎2010 Jun 10 7:06 AM
dear friends,
my requirement is to change existing quotation no.
in quotation i have to change (ZCD1) discount percentage line itemwise.
in quotation i would have many line items. so i need to change discount percentage line item wise.
currently i m using BAPI_CUSTOMERQUOTATION_CHANGE. in this bapi m passing line item and condition value and discount per line itemwise. woth updateflag = 'U'.
but as i execute bapi it doen not change previous discount bt add anothe discount for each item.
so how can i update previous discount . please assist me.
‎2010 Jun 10 7:16 AM
Hi,
Pass the values into structure LOGIC_SWITCH. Pass 'X' to the structure field LOGIC_SWITCH-PRICING.
Regards
Vinod
‎2010 Jun 10 7:28 AM
Hi Sunil,
This is because You are not filling the existing condition count Step Number and Condition Counter for the condition type (ZCD1).
This has to be filled with existing values for ZCD1 condition, else the BAPI will insert a new line for this condition.
Precisely, You will also have to fill the fields BAPICOND-COND_ST_NO', and BAPICOND-COND_COUNT'.
This You can get from KONV for the condition type 'ZCD1' for the condition record number (KNUMV) for your quotation (VBAK-KNUMV). If this is at line item level, then You also need to pass line item number to get the existing value of condition count Step Number and Condition Counter.
A sample for important fields that You need to pass is given below:
QUOTATION_HEADER_INX-UPDATEFLAG = 'U'.
CONDITIONS_INITM_NUMBER = (Value of item number)
CONDITIONS_IN-COND_ST_NO = (Value of Condition count Step Number)
CONDITIONS_IN-COND_COUNT = (Value of condition counter)
CONDITIONS_IN-COND_TYPE = 'ZCD1'.
CONDITIONS_IN-COND_VALUE = (Changed value)
CONDITIONS_IN-CURRENCY = (Currency)
CONDITIONS_IN-COND_UPDAT = 'X'.
APPEND CONDITIONS_IN.
CONDITIONS_INX-ITM_NUMBER = (Value of item number)
CONDITIONS_INX-COND_ST_NO = (Value of Condition count Step Number)
CONDITIONS_INX-COND_COUNT = (Value of condition counter)
CONDITIONS_INX-COND_TYPE = 'ZCD1'
CONDITIONS_INX-UPDATEFLAG = 'U'.
CONDITIONS_INX-COND_VALUE = 'X'.
CONDITIONS_INX-CURRENCY = 'X'.
APPEND CONDITIONS_INX TO CONDITIONS_INX.
Then You will have to call the BAPI_CUSTOMERQUOTATION_CHANGE
Regards,
Birendra
‎2010 Jun 10 8:36 AM
‎2010 Jun 10 8:38 AM
i tried even then it is not updating quotation bt appending the condition discount.
‎2010 Jun 10 8:38 AM
i tried even then it is not updating quotation bt appending the condition discount.
‎2010 Jun 10 8:38 AM
i tried even then it is not updating quotation bt appending the condition discount.
‎2010 Jun 10 8:39 AM
i tried even then it is not updating quotation bt appending the condition discount.
‎2010 Jun 10 12:17 PM
‎2010 Jun 10 7:51 AM
HI,
The BAPI does not have a database. In order that changes can be carried out on the database. The BAPI BAPI_TRANSACTION_COMMIT is available for this. Please try the same.
Thanks and Regards,
P.Bharadwaj