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: 

Error Using - CONVERT_TO_LOCAL_CURRENCY

Former Member
0 Kudos

Hi,

I am using this function module to convert a currency (AUD) to another (CHF) as maintained in TCURR but getting nothing as import_amount. If anybody has used this FM , please suggest possible reason?

The conversion ration and rate is maintained in both TCURF and TCURR.

Thanks,

Jai

1 ACCEPTED SOLUTION

SuhaSaha
Advisor
Advisor
0 Kudos

Hello,

Are you using the correct TYPE_OF_RATE(TCURR-KURST) param. as maintained in TCURR?

Are you executing the FM directly? Then may be you can scroll to the extreme right to see the results )

I have faced this problem when directly executing the FM.

BR,

Suhas

5 REPLIES 5

Former Member
0 Kudos

hi,

try this

CALL FUNCTION 'CONVERT_TO_FOREIGN_CURRENCY'

EXPORTING

client = sy-mandt

date = sy-datum

foreign_currency = 'SGD'

local_amount = tax_amt

local_currency = 'USD'

rate = w_ukurs

type_of_rate = 'M'

IMPORTING

exchange_rate = w_exg

foreign_amount = w_tax.

{code]

Regards,

Prabhudas

SuhaSaha
Advisor
Advisor
0 Kudos

Hello,

Are you using the correct TYPE_OF_RATE(TCURR-KURST) param. as maintained in TCURR?

Are you executing the FM directly? Then may be you can scroll to the extreme right to see the results )

I have faced this problem when directly executing the FM.

BR,

Suhas

Former Member
0 Kudos

hi try this,


CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
     EXPORTING
          DATE              = SY-DATUM
          FOREIGN_AMOUNT    = AMOUNT
          FOREIGN_CURRENCY  = CURRENCY
          LOCAL_CURRENCY    = DISPLAY_CURRENCY
     IMPORTING
          LOCAL_AMOUNT      = AMOUNT
     EXCEPTIONS
          NO_RATE_FOUND     = 1
          OVERFLOW          = 2
          NO_FACTORS_FOUND  = 3
          NO_SPREAD_FOUND   = 4
          DERIVED_2_TIMES   = 5
          OTHERS            = 6.

regards,

Prabhudas

Former Member
0 Kudos

try this way,


     CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
          EXPORTING
               DATE              = SY-DATUM
               FOREIGN_AMOUNT    = XNETWR
               FOREIGN_CURRENCY  = XVBAP-WAERK
               LOCAL_CURRENCY    = 'USD'
               RATE              = 0
               TYPE_OF_RATE      = 'M'
        IMPORTING
               EXCHANGE_RATE     =
               FOREIGN_FACTOR    =
               LOCAL_AMOUNT      = XVBAP-XNETWR
               LOCAL_FACTOR      =
               EXCHANGE_RATEX    =
               FIXED_RATE        =
               DERIVED_RATE_TYPE =
          EXCEPTIONS
               NO_RATE_FOUND     = 1
               OVERFLOW          = 2
               NO_FACTORS_FOUND  = 3
               NO_SPREAD_FOUND   = 4
               DERIVED_2_TIMES   = 5
               OTHERS            = 6.

Former Member
0 Kudos

HI,

Check this FM..

DATA amount type P DECIMALS 2.
CALL FUNCTION 'CONVERT_FOREIGN_TO_FOREIGN_CUR'
  EXPORTING
    date                   = sy-datum
    from_amount            = '1000'
    from_currency          = 'USD'
    to_currency            = 'EUR'
    local_currency         = 'INR'
 IMPORTING
   TO_AMOUNT              = amount
 EXCEPTIONS
   NO_RATE_FOUND          = 1
   OVERFLOW               = 2
   NO_FACTORS_FOUND       = 3
   NO_SPREAD_FOUND        = 4
   DERIVED_2_TIMES        = 5
   OTHERS                 = 6 .