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: 

currency type

former_member198275
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi,

DATA: AMOUNT TYPE WRBTR VALUE '33329.00',

AMOUNT_C(20) TYPE C.

WRITE AMOUNT CURRENCY 'EUR' TO AMOUNT_C.

Thanks.

Former Member
0 Kudos

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 !!

former_member198275
Active Contributor
0 Kudos

thanks

Former Member
0 Kudos

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