2009 Sep 10 7:47 AM
Hi Abapers,
I have developed a FM which is used for sending SMS
Now my Problem is that to send sms i have converted the amount field into string
But the requirement is such that where if suppose
5000 how can i insert comma there, as the values are dynamic
it can be 25000 it can be any thing and accordingly the comma has to be adjusted
Because of which i cant even define particular position where the comma has to be inserted
as the values are dynamic,
Is there any way to solve this problem...?
2009 Sep 10 8:11 AM
You will get a idea with this
DATA : value TYPE i ,
out type char255.
value = '12345'.
write value to out.
condense out.
write out.
in your case move 'out' to your string
Here the separators will be placed as of your user profile settings.
Hi Abapers,
I have developed a FM which is used for sending SMS
Now my Problem is that to send sms i have converted the amount field into string
But the requirement is such that where if suppose
5000 how can i insert comma there, as the values are dynamic
it can be 25000 it can be any thing and accordingly the comma has to be adjusted
Because of which i cant even define particular position where the comma has to be inserted
as the values are dynamic,
Is there any way to solve this problem...?
2009 Sep 10 8:07 AM
Hi,
You can use the following Function Modules
BAPI_CURRENCY_CONV_TO_EXTERNAL
Just enter the type of currency you want and the amount which is converted into string
Regards,
Harini.S
2009 Sep 10 8:08 AM
Thanks for ur reply,
But this is like coming back to where i started from as i have already mentioned that
i have converted the amount field to string
The FM u gave me will again convert the string into currency type
Edited by: Aarif Baig on Sep 10, 2009 12:39 PM
Edited by: Aarif Baig on Sep 10, 2009 12:40 PM
2009 Sep 10 8:19 AM
Hi,
You have to mention the string value in the function module,which in turn will return the value with '.' and ','.Otherwise send me your code i will help you.
Regards,
Harini.S
2009 Sep 10 8:11 AM
You will get a idea with this
DATA : value TYPE i ,
out type char255.
value = '12345'.
write value to out.
condense out.
write out.
in your case move 'out' to your string
Here the separators will be placed as of your user profile settings.
2009 Sep 10 8:25 AM
Thanks Keshu ,
Its working and i have given you the points ...
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |