Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

BAPI_SALESORDER_CHANGE update conditions doesn't modify pricing

$
0
0

Hello Experts,

 

I've trying to use BAPI_SALESORDER_CHANGE to update pricing information on sales orders. However, I keep getting the following error.

 

I V1               739 Field 'FAKSK' cannot be changed, VBAKKOM 7370429265  ready for input
E V4               219 Sales document 7370429265 was not changed

 

For reference here is the data I'm passing to BAPI.

--------------------------------------------------------------------------------------------------------------------------------------

*Fill headers

  lv_vbeln = '7370429265'.

  order_header-bill_block = 'Y3'.

  order_header-ref_doc_l = '7370429265'.

  order_header-currency  = 'CAD'.

    append order_header.

  order_header_idx-updateflag = 'U'.

  order_header_idx-bill_block = 'X'.

    append order_header_idx.

 

*Fill Item

  order_item-itm_number = '000001'.

  order_item-po_itm_no = '1'

  order_item-material   =  '202'.

  append order_item.

 

*Fill Partners

  order_partners-partn_role = 'SP'.

  order_partners-partn_numb = '6402174'.

  order_partners-itm_number = '000001'

    append order_partners.  

 

*Fill Conditions. 

  order_pricing_condition-itm_number = '000001'.

  order_pricing_condition-cond_type  = 'JRC5'.   "

  order_pricing_condition-cond_value = '20.00'.

  order_pricing_condition-currency   = 'CAD'.

    append order_pricing_condition.

  order_pricing_condition_idx-itm_number = '000001'.

  order_pricing_condition_idx-cond_type  = 'JRC5'.

  order_pricing_condition_idx-updateflg = 'U'

  order_pricing_condition_idx-cond_value = 'X'.

  order_pricing_condition_idx-currency   = 'X'.

    append order_pricing_condition_idx.

 

  call function 'BAPI_SALESORDER_CHANGE'

    exporting

      salesdocument              = lv_vbeln

      order_header_in             = order_header

      order_header_inx           = order_header_idx

      SIMULATION                 = 'X'

*     BEHAVE_WHEN_ERROR           = ' '

*     INT_NUMBER_ASSIGNMENT       = ' '

*     LOGIC_SWITCH                =

*     NO_STATUS_BUF_INIT          = ' '

    tables

      return                      = it_return

      order_item_             = order_item

*     ORDER_ITEM_INX              =

     partners                    =  order_partners

*     PARTNERCHANGES              =

*     PARTNERADDRESSES            =

*     ORDER_CFGS_REF              =

*     ORDER_CFGS_INST             =

*     ORDER_CFGS_PART_OF          =

*     ORDER_CFGS_VALUE            =

*     ORDER_CFGS_BLOB             =

*     ORDER_CFGS_VK               =

*     ORDER_CFGS_REFINST          =

*     SCHEDULE_LINES              =

*     SCHEDULE_LINESX             =

*     ORDER_TEXT                  =

*     ORDER_KEYS                  =

     condition_in               = order_pricing_condition

     conditions_inx           = order_pricing_condition_idx

*     EXTENSIONIN                 =.

-------------------------------------------------------------------------------------------------------------------------------------------------

 

Can anybody see If I'm making any mistake or something is missing and rectify it, please?

 

Many thanks in advance.


Viewing all articles
Browse latest Browse all 8332

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>