Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos
849

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_condition-ITM_NUMBER = '000001'.
        wa_condition-COND_TYPE = 'ZS07'.
        wa_condition-COND_VALUE = '20'.
        wa_condition-CURRENCY = 'CAD'.
        wa_condition-CURR_ISO = 'CAD'.
        append wa_condition to p_lit_condition.

        wa_conditionx-ITM_NUMBER = '000001'.
        wa_conditionx-COND_TYPE = 'ZS07'.
        wa_conditionx-UPDATEFLAG = 'U'.
        wa_conditionx-COND_VALUE = 'X'.
        wa_conditionx-CURRENCY = 'X'.
        append wa_conditionx to p_lit_conditionx.

        LOGIC_SWITCH-COND_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

Labels in this area