Application Development and Automation 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: 
Read only

bapi for quotation change

Former Member
0 Likes
5,494

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.

9 REPLIES 9
Read only

Former Member
0 Likes
2,896

Hi,

Pass the values into structure LOGIC_SWITCH. Pass 'X' to the structure field LOGIC_SWITCH-PRICING.

Regards

Vinod

Read only

birendra_chatterjee
Active Participant
0 Likes
2,896

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

Read only

0 Likes
2,896

I

Read only

0 Likes
2,896

i tried even then it is not updating quotation bt appending the condition discount.

Read only

0 Likes
2,896

i tried even then it is not updating quotation bt appending the condition discount.

Read only

0 Likes
2,896

i tried even then it is not updating quotation bt appending the condition discount.

Read only

0 Likes
2,896

i tried even then it is not updating quotation bt appending the condition discount.

Read only

0 Likes
2,896

thnx birendra

Read only

Former Member
0 Likes
2,896

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