币别转换函数

 

 

CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
    EXPORTING
      date             = p_date
      foreign_amount   = p_netwr
      foreign_currency = p_waerk
      local_currency   = p_waers
    IMPORTING
      local_amount     = p_netwr
    EXCEPTIONS
      no_rate_found    = 1
      overflow         = 2
      no_factors_found = 3
      no_spread_found  = 4
      derived_2_times  = 5
      OTHERS           = 6.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.

posted @ 2012-11-30 14:41  Lojamm  阅读(180)  评论(0编辑  收藏  举报