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

Conversion from string field to currency field

Former Member
0 Likes
3,820

Hi,

I have a requirement wherein i need to convert string to currency field which is further i am passing it to FM to convert it into words.

Foe example

Data: p type string value '23115.50',

v type pc207-betrg (currency length 15.)

I need to convert p to v. What are the ways by which i can convert it ?

Thanks

Parag

1 ACCEPTED SOLUTION
Read only

sridhar_meesala
Active Contributor
0 Likes
1,857

Hi,

Use 'HRCM_STRING_TO_AMOUNT_CONVERT' function module.

Thanks,

Sri.

Hi,

I have a requirement wherein i need to convert string to currency field which is further i am passing it to FM to convert it into words.

Foe example

Data: p type string value '23115.50',

v type pc207-betrg (currency length 15.)

I need to convert p to v. What are the ways by which i can convert it ?

Thanks

Parag

4 REPLIES 4
Read only

karol_seman
Active Participant
0 Likes
1,857

Hi,

WRITE p TO v.

will do the automatic conversion.

Regards,

Karol

correction (move not write - fingers were to fast):

DATA: p TYPE string,

v TYPE pc207-betrg.

p = '23115.50'.

move p to v.

write: / v.

Read only

venkat_o
Active Contributor
0 Likes
1,857
DATA: p TYPE string VALUE '23115.50',
      v TYPE pc207-betrg." (currency length 15.)
v = p.

" or 

MOVE p TO v.
WRITE v.

Thanks

Venkat.O

Read only

sridhar_meesala
Active Contributor
0 Likes
1,858

Hi,

Use 'HRCM_STRING_TO_AMOUNT_CONVERT' function module.

Thanks,

Sri.

Read only

nitesh_jain3
Active Participant
0 Likes
1,857

v = p