Application Development 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: 

Problem With Conversion....?

aarif_baig
Active Participant
0 Kudos

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...?

1 ACCEPTED SOLUTION

kesavadas_thekkillath
Active Contributor
0 Kudos

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.

5 REPLIES 5

Former Member
0 Kudos

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

0 Kudos

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

0 Kudos

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

kesavadas_thekkillath
Active Contributor
0 Kudos

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.

0 Kudos

Thanks Keshu ,

Its working and i have given you the points ...