Skip to Content

HI, expert:

Can you help me take a look at the folloiwng code.

I want to PASS condition type ZS07 and amount 20.00 dollars to FM  ‘BAPI_QUOTATION_CREATEFROMDATA2’,

After call it. The condition type ZS07 amount has been changed to 5.85.  I want to keep 20.00.

Can help me figure out. Thanks in advance!

  data:

        wa_condition type BAPICOND,
        p_lit_condition TYPE tt_condition,
        wa_conditionx type BAPICONDX,
        p_lit_conditionx TYPE tt_conditionx,
        LOGIC_SWITCH type  BAPISDLS.

*1        ZS07=10.0
        wa_conditionITM_NUMBER = ‘000001’.
        wa_conditionCOND_TYPE = ‘ZS07’.
        wa_conditionCOND_VALUE = ’20’.
        wa_conditionCURRENCY = ‘CAD’.
        wa_conditionCURR_ISO = ‘CAD’.
        append wa_condition to p_lit_condition.

        wa_conditionxITM_NUMBER = ‘000001’.
        wa_conditionxCOND_TYPE = ‘ZS07’.
        wa_conditionxUPDATEFLAG = ‘U’.
        wa_conditionxCOND_VALUE = ‘X’.
        wa_conditionxCURRENCY = ‘X’.
        append wa_conditionx to p_lit_conditionx.

        LOGIC_SWITCHCOND_HANDL = ‘X’.

  CALL FUNCTION ‘BAPI_QUOTATION_CREATEFROMDATA2’
    EXPORTING
      quotation_header_in    = p_lwa_header_in
      behave_when_error      = lc_p
      logic_switch = logic_switch
    IMPORTING
      salesdocument          = lv_sales_doc
    TABLES
      return                 = lit_return
      quotation_keys         = lt_quotkeys
      quotation_items_in     = p_lit_items_in
      quotation_partners     = p_lit_partners_in
      quotation_schedules_in = p_lit_schedule_in
      quotation_cfgs_ref     = p_lit_cfg_ref
      quotation_cfgs_inst    = p_lit_cfg_inst
      quotation_cfgs_value   = p_lit_cfg_vals
      QUOTATION_CONDITIONS_IN = p_lit_condition. “for testing
*      QUOTATION_CONDITIONS_INx = p_lit_conditionx . “for testing

Daniel

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply