Application Development and Automation 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: 
Read only

Convert String to Currency

Former Member
0 Likes
2,199

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
Read only

Former Member
0 Likes
1,103

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

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!

3 REPLIES 3
Read only

Former Member
0 Likes
1,104

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

Read only

Former Member
0 Likes
1,103

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

Read only

former_member386202
Active Contributor
0 Likes
1,103

Hi,

Change the datatype of internal table field as character type.

Regards,

Prashant