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_CUSTOMERQUOTATION_CHANGE - error while changing a condition value

Former Member
0 Likes
1,604

Hallo Gurus,

I am trying to use tshi BAPI BAPI_CUSTOMERQUOTATION_CHANGE to change a condition value of a condition record of a quotation.

Every time I execute the BAPI, instead of the condition tyoe being changed, a new record is added to the list of conditions!

Can someone please help!

Thsi is my piece of code::

itab_BAPISDH1X-UPDATEFLAG = 'U'.

append itab_BAPISDH1X.

itab_BAPICOND-ITM_NUMBER = '10'.

itab_BAPICOND-COND_ST_NO = '31'.

itab_BAPICOND-COND_COUNT = '00'.

itab_BAPICOND-COND_TYPE = 'ZST3'.

itab_BAPICOND-COND_VALUE = '15.00'.

itab_BAPICOND-COND_UPDAT = 'X'.

append itab_BAPICOND.

itab_BAPICONDX-ITM_NUMBER = '10'.

itab_BAPICOND-COND_ST_NO = '31'.

itab_BAPICOND-COND_COUNT = '00'.

itab_BAPICONDX-COND_TYPE = 'ZST3'.

itab_BAPICONDX-UPDATEFLAG = 'X'.

itab_BAPICONDX-COND_VALUE = 'X'.

append itab_BAPICONDX.

CALL FUNCTION 'BAPI_CUSTOMERQUOTATION_CHANGE'

EXPORTING

salesdocument = p_vbeln

  • QUOTATION_HEADER_IN =

quotation_header_inx = itab_BAPISDH1X

tables

return = itab_BAPIRET2

CONDITIONS_IN = itab_BAPICOND

CONDITIONS_INX = itab_BAPICONDX

.

Thanks!

Mukta

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,001

Should the update flag in CONDITIONS_INX be set up as 'U' rather than 'X'?

2 REPLIES 2
Read only

Former Member
0 Likes
1,001

Hmm...

Change the following....and check..


itab_BAPICONDX-ITM_NUMBER = '10'.
itab_BAPICOND-COND_ST_NO = '31'.
itab_BAPICOND-COND_COUNT = '00'.
itab_BAPICONDX-COND_TYPE = 'ZST3'.
itab_BAPICONDX-UPDATEFLAG = 'X'.
itab_BAPICONDX-COND_VALUE = 'X'.
append itab_BAPICONDX.

"change the above to.....
ab_BAPICONDX-COND_TYPE = 'X'.
append itab_BAPICONDX.

The BAPICONDX.. should contain only X.. in the fields which you want to update.. try this change..and let us know if it works.

Also have a look at the FUNCTION MODULE DOCUMENTATION for this bapi in SM37.

Cheers...

Read only

Former Member
0 Likes
1,002

Should the update flag in CONDITIONS_INX be set up as 'U' rather than 'X'?