• 金额货币转换函数


     
    
     IF gs_disave-waers <> 'CNY'.
          CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
            EXPORTING
    *         CLIENT                  = SY-MANDT
              date                    = l_date    "当前日期
              foreign_amount          = gs_disave-netpr  “外币金额
              foreign_currency        = gs_disave-waers  ”外币如:USD
              local_currency          = 'CNY'            “本币:人民币
    *         RATE                    = 0
              type_of_rate             = 'M'             ”平均
    *         READ_TCURR              = 'X'
            IMPORTING
    *         EXCHANGE_RATE           =
    *         FOREIGN_FACTOR          =
              local_amount            = l_netpr          “转化后得到的本币金额:人民币金额
    *         LOCAL_FACTOR            =
    *         EXCHANGE_RATEX          =
    *         FIXED_RATE              =
    *         DERIVED_RATE_TYPE       =
           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 sy-msgty NUMBER sy-msgno
                    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
  • 相关阅读:
    java 如何判断邮箱是否正确
    Android SDK Manager无法更新的解决
    洛谷P1162
    真 随笔
    初始化结构体
    Linux mkdir -p 后出现permission denied问题
    校赛F
    HDU1022
    UVa156
    HDU1060
  • 原文地址:https://www.cnblogs.com/caizjian/p/3566176.html
Copyright © 2020-2023  润新知