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

currency type

Former Member
0 Likes
715

I have a field cointaining value of type C. Now i want that value in currency type. Example: C = 31507.

output = 31,570.

Is there any function module???

plz help

I have a field cointaining value of type C. Now i want that value in currency type. Example: C = 31507.

output = 31,570.

Is there any function module???

plz help

4 REPLIES 4
Read only

Former Member
0 Likes
673

Hi,

DATA: AMOUNT TYPE WRBTR VALUE '33329.00',

AMOUNT_C(20) TYPE C.

WRITE AMOUNT CURRENCY 'EUR' TO AMOUNT_C.

Thanks.

Read only

Former Member
0 Likes
673

Hi Kaushik

Move that field value to a currency data element field and display, you should the output in the req. format.

~Ranganath

Reward points for all useful answer !!

Read only

Former Member
0 Likes
673

thanks

Read only

Former Member
0 Likes
673

Hi Kaushik,

Try using the Fm's "HRCM_STRING_TO_AMOUNT_CONVERT" or "HRCM_AMOUNT_TO_STRING_CONVERT"

CALL FUNCTION 'HRCM_STRING_TO_AMOUNT_CONVERT'

EXPORTING

string = " value to be seperated"

DECIMAL_SEPARATOR = "."

THOUSANDS_SEPARATOR =","

WAERS = ' ' ( Currency type)

IMPORTING

BETRG = (result value)

EXCEPTIONS

CONVERT_ERROR = 1

OTHERS = 2

Reward if Useful.

Regards,

Chitra