货币转换

维护货币汇率

事务代码:OB08
货币转换_第1张图片

调用BAPI

    CALL FUNCTION 'BAPI_EXCHANGERATE_GETDETAIL'
      EXPORTING
        rate_type  = 'M'
        from_curr  = ls_ekko-waers
        to_currncy = 'CNY'
        date       = sy-datum
      IMPORTING
        exch_rate  = ls_exch_rate
        return     = ls_return.

    ls_zsmm043-header-rmb_price   = ls_zsmm043-header-allp * ls_exch_rate-exch_rate * ls_exch_rate-to_factor / ls_exch_rate-from_factor.
   

你可能感兴趣的:(SAP)