cancel
Showing results for 
Search instead for 
Did you mean: 

Country based currency & decimals issue

Former Member
0 Kudos

Hi All,

Can any one help me here, I need to decide the decimal places for particular currency of a country accordingly I need to add the decimal places.

Example: JPY: Japan yens dont have a decimal place

INR will have 2 decimal places. like this way.

thanks.

Kalyan.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Ustry the following code.

DATA:

lv_decimals type tcurx-currdec,

lv_amount type char30.

CALL FUNCTION 'G_DECIMAL_PLACES_GET'

EXPORTING

currency = lv_waers (currency key)

IMPORTING

decimal_places = lv_decimals.

IF NOT lv_decimals IS INITIAL.

WRITE: lv_wrbtr TO lv_amount DECIMALS lv_decimals.

endif.

thanks

kasturi

Former Member
0 Kudos

thanks all, my got problem resolved.

ThomasZloch
Active Contributor
0 Kudos

Why not just use the one liner as suggested by Andreas?

Thomas

Answers (2)

Answers (2)

andreas_mann3
Active Contributor
0 Kudos

use abap command (read F1):

write bsegr-wrbtr to xfield currency 'JPY' / resp. bkpf-waers...

hope taht helps

Andreas

satyajit_mohapatra
Active Contributor
0 Kudos

The decimals for a particular currency is maintained in OY04 transaction. Also, you can get the no of decimal places for a particular currency using BAPI_CURRENCY_GETDECIMALS.

Could you elaborate your requirement please? Are you using a smartform or sapscripts?