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 amount

Former Member
0 Kudos

Hello,

I have to write (in a form) an amount in the format : 1,000,000.00

The currency and the initial format of the amount is variable.

Do you know a function module to convert an amount to this format?

Thanks in advance,

Bertrand

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello,

Do like this:

Data: LV_amount(16).
write: amount to lv_amount

Regards,

Vasanth

9 REPLIES 9

Former Member
0 Kudos

HI,

Use Function module :

BAPI_CURRENCY_CONV_TO_INTERNAL

call function 'BAPI_CURRENCY_CONV_TO_INTERNAL'

exporting

currency = 'USD'

amount_external = input

max_number_of_digits = 20

importing

amount_internal = output

  • RETURN =

.

Regards

Sudheer

Message was edited by:

Sudheer Junnuthula

0 Kudos

Hello,

This method doesn't fil the ',' for thousand separators.

Any other solution ?

Thanks in advance,

Bertrand

0 Kudos

did u try my solution ???

Regards,

Santosh

Former Member
0 Kudos

Hello,

Do like this:

Data: LV_amount(16).
write: amount to lv_amount

Regards,

Vasanth

0 Kudos

Hello,

This method doesn't work if I have not the right parameters in SU3.

Maybe, you know how to always obtain the good format.

Best regards,

Bertrand.

0 Kudos

hi,

Check out this way ..

data : v_temp like coep-wkgbtr value '10000.00'.
     
data: v_result(18).

 write : v_temp to v_result.

Regards,

Santosh

0 Kudos

Use

SET COUNTRY f. 

to insure the output format.

Regards.

0 Kudos

ur trying to format the amount ...

try this...

write: amt USING EDIT MASK 'RR___,___,___.__'.

LL for left justified.

Hope this helps..

Rgds.

0 Kudos

Hello,

Try with the FM

<b>SD_CONVERT_CURRENCY_FORMAT</b>

REgards,

Vasanth