Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Currency Conversion

Former Member
0 Likes
620

HI All,

I have one requirement and need some help. I am printing the smartform for Invoice. Invoice contains the amount field and the correspondign currency. Now for each currency the number of decimal fields are different e.g. for USD it is 2 digit, for JOD it is 3 digit.

So my requirement is to print the amount in the smartform dynamically accordign to the currency fields.

Is there any function module to do this or suggest me soem way.

Thanks

Lincon

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
563

Hi,

Please check the table TCURX. In this table you will have the currency with decimals.

Or

You can

WRITE price CURRENCY c ROUND r DECIMALS d

Thanks,

Sriram Ponna.

4 REPLIES 4
Read only

Former Member
0 Likes
563

Hi

The output format depends on the reference currency field, you can indicate a link by a dictionary structure, used to defined the import/export smartforms parameters.

U can also use a char variable where, before printing the value by smartfrom, you can write the amount using the WRITE statament:

WRITE <AMOUNT> CURRENCY <CURRENCY> TO AMOUNT_CHAR.

Max

Read only

0 Likes
563

HI Max,

This is ok for me but i have around 20 fields in the smartform , which is already developed . No i have to change all the fields like that or is there any other way like in script we have SET LOCAL CURRENCY is there. Please let me know about it.

Thanks

Lincon

Read only

0 Likes
563

You can use FM CURRENCY_AMOUNT_SAP_TO_DISPLAY if you know the currency.

Read only

Former Member
0 Likes
564

Hi,

Please check the table TCURX. In this table you will have the currency with decimals.

Or

You can

WRITE price CURRENCY c ROUND r DECIMALS d

Thanks,

Sriram Ponna.