How To Find Decimal Places Using ABAP

Today I want to share with you how to find how many decimals used in a certain currency. The decimal place information is stored in table TCURX, this function module will query the information based on the currency value.
Here’s the ABAP Sample code to find decimal place.
REPORT  Z_GET_DECIMAL_PLACES.
Parameters: p_curr(10).
Data: d_dec like TCURX-CURRDEC.
CALL FUNCTION ‘G_DECIMAL_PLACES_GET’
EXPORTING
CURRENCY            = p_curr
IMPORTING
DECIMAL_PLACES       = d_dec .
Write: ‘Decimal Places for Currency’, p_curr, ‘:’, d_dec.
Run the program (F8) and just type in any currency, then you will see the decimal place for the given
currency.
03092010-fcp-01

Subscribe in a reader

Comments

0 Responses to "How To Find Decimal Places Using ABAP"

Post a Comment

Stay Updated