sapdev logo background
sapdev logo sapdev logo

Convert currency value from internal(SAP) to external(display)

Values stored in fields of type CURR can have different values than those displayed on screen. To ensure the correct value is displayed on screen or used in calculations the value in the field must be accosiated to its currency unit. This can be done using a number of standard ABAP statements like WRITE/ *Write TO and also with the FM CURRENCY_AMOUNT_SAP_TO_DISPLAY. Once you have done this you may want to convert the value to another currency.

* Convert Internal SAP value to Currency value 
  data:      p_intval like wmto_s-amount.   "Internal Amount
  data:      gd_disval  like wmto_s-amount. "Display Amount

            currency        = po_tab-waers
            amount_internal = p_intval
            amount_display  = gd_disval
            internal_error  = 1
            others          = 2.

comments powered by Disqus