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: 

Convert String to Currency

Former Member
0 Kudos

Hi Experts,

I read from text file to an internal table.

My text file contains data (eg. 1,799.01).

When i try to store into internal table, i couldn't do so cos the string cant store the value as currency (internal table field is currency).

How do i do so?

I tried removing ',' and the condense the string no gaps such that data becomes 1799.01 but still the internal table does not accept the string (as i'm forcing it to store into a currency).

Please help!

1 ACCEPTED SOLUTION

Former Member
0 Kudos

no need to store , in internal table but while output just make change in field catelog with datatype = 'CURR' .

3 REPLIES 3

Former Member
0 Kudos

no need to store , in internal table but while output just make change in field catelog with datatype = 'CURR' .

Former Member
0 Kudos

Hi

Have u tried using Currency format with Write Statement ..

Write field( from file) TO varaible(defined by you) Currency CURR(like JPY etc) .

This will wite string as per the currency format given by you .

Hope this may help.

Praveen

former_member386202
Active Contributor
0 Kudos

Hi,

Change the datatype of internal table field as character type.

Regards,

Prashant