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: 

Coversion of character to currency

Former Member
0 Kudos

Hi Experts,

I already trying searching for other forum threads for this query but could not find the relevant answers.

I want to convert charcters 970254 to numbers 970,254 that is with , seperated for 1000 etc.

Please suggest.

Thanks

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello,

Will this be sufficient?


data: val1(10) type c,
         val2 type p .


 val1 = '970254'.
 val2 = val1.

 write: val2.

Vikranth

6 REPLIES 6

Former Member
0 Kudos

Hi

Try with Funcation module: ISM_CONVERT_CHAR_TO_CURR

Regards,

Raghu

Former Member
0 Kudos

Hi!

The numbers cannot be formatted like this.

Numbers have a restricted format, like NNNNNNNNNNNN,DDD, where N- whole numbers and D-decimals. There can be only 1 comma which separates the whole numbers from the decimals.

However you can format the characters into an another character field, using the WRITE ... USING EDIT MASK ... statement.

Regards

Tamá

Former Member
0 Kudos

Hello,

Will this be sufficient?


data: val1(10) type c,
         val2 type p .


 val1 = '970254'.
 val2 = val1.

 write: val2.

Vikranth

0 Kudos

Thanks Vikranth,

It worked.

Former Member
0 Kudos

Hi

Try with Funcation module: ISM_CONVERT_CHAR_TO_CURR

Regards,

Raghu

Kanagaraja_L
Active Contributor
0 Kudos

Try this

data lv_string type char6 VALUE '970254'.
data netwr type netwr .

move lv_string to netwr.

write netwr.

Kanagaraja L