‎2007 Dec 17 3:55 PM
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
‎2007 Dec 17 4:40 PM
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.
‎2007 Dec 17 4:05 PM
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
‎2007 Dec 18 8:38 PM
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
‎2008 Jan 18 7:38 PM
You can use FM CURRENCY_AMOUNT_SAP_TO_DISPLAY if you know the currency.
‎2007 Dec 17 4:40 PM
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.