‎2013 Aug 29 5:07 AM
Hi,
I need to print an amount in an smartform this way:
Which would be the best way to do this?
I think I could use something like this http://help.sap.com/erp2005_ehp_04/helpdata/en/1c/f40c6fddf311d3b574006094192fe3/content.htm
What do you think? I have not found to much about this..
Thanks in advance,
Regards,
Karina Hurtado
‎2013 Aug 29 2:06 PM
Thanks to all, I already have the amount in that format, what I want is to put one number in each column of tha grid.. the , $ and . already is gonna be there in the table, I think I should try with offset, right?
‎2013 Aug 29 5:18 AM
Preceding dollar sign should not be an issue. To set separators you can use either user profile (SU01) or transaction OY01. Hope i understood it well.
Rgds
‎2013 Aug 29 5:18 AM
Hi,
Do u want to display the amount value as 123,456,78.345 ?
In that case , use SET COUNTRY XYZ (Choose country XYZ which has a decimal notation as mentioned above) in the initialization part of smartforms.
U can find country specific decimal notations in OY01 tcode.
‎2013 Aug 29 5:52 AM
Hi Karina,
I have tried with this code and it works,
DATA l_netpr type char20.
DATA: a TYPE i VALUE '100000.00'.
WRITE a TO l_netpr
CURRENCY z02sflight-CURRENCY--> (Table Field).
CONDENSE l_netpr.
WRITE l_netpr .
You can also refer the following ,
http://scn.sap.com/thread/1091638
Regards,
Sivaganesh
‎2013 Aug 29 5:57 AM
Hi Karina,
Go through the link below , i hope it would solve your problem.
once you done that , you can just attach a '$' sign in the text element of the same.
eg: $ &GV_QUANTITY&
regards,
Francy.
‎2013 Aug 29 6:11 AM
Hey,
Dollar sign you can put normally whereas setting the decimal notation as above depends on the requirement. If you want to set it for a particular user, you can use su01 but better would be to use oy01 and change the decimal notation there. Hope it solves your issue. Please do let us know if have further.
Regards
Purnand
‎2013 Aug 29 6:47 AM
Hi,
You will have to convert the amount with statement like:
WRITE v_cash_tot TO v_output CURRENCY 'USD'. "v_output is teh variable used for printing in form
This would take the currency format for comma separators. Best is to get the currency as per the currency maintained for the amount. The symbols are not available and you might want to maintain a separate look-up table to get the same.
Cheers,
Arindam
‎2013 Aug 29 6:56 AM
Well Karina,
The help link you suggested is for output option for value already ready.
here you will need to prepare the value for country specific and currency specific format please check
the below link of SAP Help.
http://help.sap.com/erp2005_ehp_04/helpdata/en/9f/dba1ef35c111d1829f0000e829fbfe/content.htm
Regards
‎2013 Aug 29 2:06 PM
Thanks to all, I already have the amount in that format, what I want is to put one number in each column of tha grid.. the , $ and . already is gonna be there in the table, I think I should try with offset, right?
‎2013 Aug 29 2:14 PM
Yes,
Do a length check of the char field you are moving the value in.
Then use offset with length minus 1 each time till you reach 0.
Put the digits in the boxes from right to left.
Regards
‎2013 Aug 29 3:07 PM
if this going to be in a table then you can have each digit of amount along with dollar symbol in different cells of table. this table would have one row with multiple columns. of course each digit will be identify by using offset only.
Rgds