在項目裡面的『條件』右下角有個『更新』

定價條件更新一般都是選『B實施新定價』來做更新

 

B: Carry out completely new pricing. 

carries out a completely new pricing (manually entered pricing elements are not copied from the reference document)
redetermines the taxes

 

在BAPI_SALESORDER_CHANGE裡面可以透過下面的方法達到同樣的結果

 


i_BAPISDLS_SW-PRICING = 'B'.  

 


CALL FUNCTION 'BAPI_SALESORDER_CHANGE' "==更新價格
   EXPORTING
      SALESDOCUMENT = VBELN
      ORDER_HEADER_INX = header_INX
      LOGIC_SWITCH = i_BAPISDLS_SW
   TABLES
      RETURN = I_RET
      ORDER_ITEM_IN = i_itm
      ORDER_ITEM_INX = i_itmx.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = RETURN.

 

ROACH 發表在 痞客邦 PIXNET 留言(0) 人氣()