June 17, 2009

SAP ABAP Decimal Places in Currency

If you wish to find the decimal places in the currency you can use the following function module.
G_DECIMAL_PLACES_GET The table that stores the Currencies in SAP system (Currency Codes) is TCURC. The code below shows the decimal places for a particular currency.
REPORT ZEX_CURRENCY .

Parameters: p_curr(10).
Data: d_decpl like TCURX-CURRDEC.
CALL FUNCTION 'G_DECIMAL_PLACES_GET'
EXPORTING
CURRENCY = p_curr
IMPORTING
DECIMAL_PLACES = d_decpl .

Write: 'Decimal Places ', d_decpl.

Source : http://abaplovers.blogspot.com/2008/06/sap-abap-decimal-places-in-currency.html

No comments:

Post a Comment