美文网首页
汇率转换

汇率转换

作者: 阿努比斯1117 | 来源:发表于2019-01-25 11:24 被阅读0次
    REPORT ztest_xk18.
    
    DATA: lv_cny TYPE wrbtr,
          lv_jpy TYPE wrbtr.
    DATA: ret TYPE bapireturn.
    
    
    CALL FUNCTION 'BAPI_CURRENCY_CONV_TO_INTERNAL'
      EXPORTING
        currency             = 'JPY'
        amount_external      = '100000'
        max_number_of_digits = 23
      IMPORTING
        amount_internal      = lv_jpy
        return               = ret.
    
    IF ret IS NOT INITIAL.
      MESSAGE ID ret-code(2) TYPE ret-type NUMBER ret-code+2(3)
      WITH ret-message_v1 ret-message_v2 ret-message_v3 ret-message_v4.
    ENDIF.
    
    CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
      EXPORTING
        date             = sy-datum
        foreign_amount   = lv_jpy
        foreign_currency = 'JPY'
        local_currency   = 'CNY'
      IMPORTING
        local_amount     = lv_cny.
    
    WRITE: lv_jpy,lv_cny.
    

    相关文章

      网友评论

          本文标题:汇率转换

          本文链接:https://www.haomeiwen.com/subject/urdmjqtx.html