Skip to Content
0

BAPI_QUOTATION_CREATEFROMDATA2 does not create and update custom condition value.

Jun 10, 2017 at 04:13 AM

95

avatar image
Former Member

Hi experts,

I create quotations by using the function module BAPI_QUOTATION_CREATEFROMDATA2. So far I was able to create price conditions on the item level by using the following code:

I Switch for activating the new condition item handling:
Import parameter LOGIC_SWITCH-COND_HANDLE = 'X'.
<br>
  1. wa_cond-itm_number = wa_data-linenumber.
  2. wa_cond-cond_type = 'PR00'.
  3. wa_cond-cond_value = 10.
  4. wa_cond-currency = 'CAD'
  5. insert wa_cond into table tab_cond.
  6. wa_cond_inx-itm_number = wa_data-linenumber.
  7. wa_cond_inx-cond_type = 'PR00'.
  8. wa_cond_inx-updateflag = 'U'.
  9. wa_cond_inx-cond_value = 'X'.
  10. wa_cond_inx-currency = 'X'.
  11. insert wa_cond_inx into table tab_cond_inx.

However, when I try to create with custom (ZI30) condition values, the standard BAPI doesn't work. I checked ZI30 via VK12, and I was able to see all variant details.

  1. wa_cond-itm_number = wa_data-linenumber.
  2. wa_cond-cond_type = 'ZI30'.
  3. wa_cond-cond_value = 3.
  4. wa_cond-currency = 'CAD'.
  5. insert wa_cond into table tab_cond.
  6. wa_cond_inx-itm_number = wa_data-linenumber.
  7. wa_cond_inx-cond_type = 'ZI30'.
  8. wa_cond_inx-updateflag = 'U'.
  9. wa_cond_inx-cond_value = 'X'.
  10. wa_cond_inx-currency = 'X'.
  11. insert wa_cond_inx into table tab_cond_inx.

Unfortunately the above piece of code does not work. When I call the BAPI I don't even get any error message in return table of BAPI.

When I create a quotation manually I can add the condition with an new value via GUI.

Is there a special flag which I have to set when I want to create a custom condition?

regards and many thanks in advance.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers