on 01-17-2009 11:24 AM
Hi Experts,
I need to put the comma in the amount field.
eg: 3000.00 as 3,000.00.
Is there any FM which can do this conversion.
Thanks In Advance
Asish
The best way is type casting.
Ex:
Data: amount(10) Type p decimals 2.
Value = '3000'.
WRITE VALUE TO amount.
Write amount. "3,000
Close the thread once your question is answered.
Regards,
SaiRam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>Name: Asish Dash
>Total Posts: 35
>Total Questions: 20 (11 unresolved)
Hi, Is ur question still unanswered after getting so many responses.
кu03B1ятu03B9к
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Asish;
You can do one thing,
Declare a field of type p.
Data: amount(8) type p DECIMALS 2.
And then assign your field to that field.
amount = your_field.
im this amount field you have respective commas.
Hope it will work.
regards,
Lokesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Asish,
The formatting for comma or dot is country specific. So you can set the country code to get the required formatting.
For example: set country 'XX'. where xx is the country key. The values of which you will get in table T005X.
Regards..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Goto System->User Profile->Own data
Defaults tab..Maintain the desired format what you want...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Declare the char field with the same length as of Curr/Quantity field.
Then use the Write statement...
Write l_curr to L_variable.
Now the l_variable will have comma's in the amount field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Declare a variable like p_curr type bkpf-waers in the global data of Global Definitions. Declare a reference field name in Currency/Quant Fields of Global Definitions.i.e your target variable.
Field Name Reference Field Data Type
w_var p_curr curr
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
what is the data type of the field.
is it char ?
write v_char to v_amt currency 'USD' "or any other currency key
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.