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: 

conversion of currency from USD to SGD

Former Member
0 Kudos

Hi,

I want to conver the amount in USD to singapore doller SGD. I want to take the currency rate valid for today from TCURR table. what are the parameters required to be passed to the table to get current conversion rate.

regards

Gaurav.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

Pleease use these FM

MS_CONVERT_TO_OTHER_CURRENCY

'CONVERT_TO_FOREIGN_CURRENCY'

DATA: w_amount TYPE P DECIMALS 2.

CALL FUNCTION 'CONVERT_TO_FOREIGN_CURRENCY'

EXPORTING

date = sy-datum

foreign_currency = 'SGD'

local_amount = '1.00'

local_currency = 'USD'

IMPORTING

foreign_amount = W_amount

EXCEPTIONS

no_rate_found = 1

overflow = 2

no_factors_found = 3

no_spread_found = 4

derived_2_times = 5

OTHERS = 6.

IF sy-subrc = 0.

WRITE: / 'USD to SGD - ', w_amount.

ENDIF.

Thanks & Regards,

Chandralekha.

3 REPLIES 3

Former Member
0 Kudos

Hi

Pleease use these FM

MS_CONVERT_TO_OTHER_CURRENCY

'CONVERT_TO_FOREIGN_CURRENCY'

DATA: w_amount TYPE P DECIMALS 2.

CALL FUNCTION 'CONVERT_TO_FOREIGN_CURRENCY'

EXPORTING

date = sy-datum

foreign_currency = 'SGD'

local_amount = '1.00'

local_currency = 'USD'

IMPORTING

foreign_amount = W_amount

EXCEPTIONS

no_rate_found = 1

overflow = 2

no_factors_found = 3

no_spread_found = 4

derived_2_times = 5

OTHERS = 6.

IF sy-subrc = 0.

WRITE: / 'USD to SGD - ', w_amount.

ENDIF.

Thanks & Regards,

Chandralekha.

bpawanchand
Active Contributor
0 Kudos

Hi

CONVERT_TO_FOREIGN_CURRENCY

Regards

Pavan

Former Member
0 Kudos

Hi ,

Use this function module ..

CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'

EXPORTING

CLIENT = SY-MANDT

date = SY-DATUM

foreign_amount = VBAK-NETWR

foreign_currency = 'SGD'

local_currency = 'USD'

RATE = 0

TYPE_OF_RATE = 'M'

READ_TCURR = 'X'

IMPORTING

LOCAL_AMOUNT = W_NETVALUE.

Regards.

Eshwar.