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

regarding fm

Former Member
0 Likes
815

Please help me in finding a FM for curency conversion

regards,

kushagra

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
775

HI kushagra,

for currency conversion we can use 'CONVERT_TO_LOCAL_CURRENCY' fm.i m giving u a simple ex to understand it better.

CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'

       EXPORTING

            date              = sy-datum

            foreign_amount    = x_booking-forcuram

            foreign_currency  = x_booking-forcurkey

            local_currency    = local_currency

*         RATE              = 0

*         TYPE_OF_RATE      = 'M'

      IMPORTING

*         exchange_rate     =

*         foreign_factor    = fremdkurs

          local_amount      = local_amount

*         local_factor      =

*         exchange_ratex    = faktorsum

*         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.

thnks.

6 REPLIES 6
Read only

Former Member
0 Likes
775

Hi,

You can use the two FM for currency conversion.

CONVERT_TO_LOCAL_CURRENCY .

CONVERT_TO_FOREIGN_CURRENCY.

Thanks & Regards,

Ramana

Read only

Former Member
0 Likes
775

Hi Kush.

These are some currency function modules:

BAPI_CURRENCY_CONV_TO_EXTERNAL

Conversion of Currency Amounts into External Data Format

BAPI_CURRENCY_CONV_TO_INTERNAL

Conversion of Currency Amounts into Internal Data Format

CONVERT_TO_FOREIGN_CURRENCY and

CONVERT_TO_LOCAL_CURRENCY.

CONVERT_CURRENCY_BY_RATE : Converts currency using given rate.

Other FModules:

CONVERT_FOREIGN_TO_FOREIGN_CUR: All conversions

CONVERT_COUNTRY_CURRENCY

CONVERT_AMOUNT_TO_CURRENCY

You can research more in SE37.

Reward points if usefull.

Regards

Harsh

Edited by: Harsh Dave on Jul 3, 2008 5:59 PM

Read only

Former Member
0 Likes
775

Hi Kush,

Try The Following function modules:

READ_EXCHANGE_RATE

Y_EXCHANGE_RATE_SAP_UPDATE

BAPI_CURRENCY_CONV_TO_EXTERNAL

CONVERT_TO_LOCAL_CURRENCY .

CONVERT_TO_FOREIGN_CURRENCY.

Hope this helps you.

Regards,

Chandra Sekhar

Read only

Former Member
0 Likes
776

HI kushagra,

for currency conversion we can use 'CONVERT_TO_LOCAL_CURRENCY' fm.i m giving u a simple ex to understand it better.

CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'

       EXPORTING

            date              = sy-datum

            foreign_amount    = x_booking-forcuram

            foreign_currency  = x_booking-forcurkey

            local_currency    = local_currency

*         RATE              = 0

*         TYPE_OF_RATE      = 'M'

      IMPORTING

*         exchange_rate     =

*         foreign_factor    = fremdkurs

          local_amount      = local_amount

*         local_factor      =

*         exchange_ratex    = faktorsum

*         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.

thnks.

Read only

Former Member
0 Likes
775

Apart from sharing a last name, i do not see anything special in that answer that solved your question.

All the others have pointed the same function module isn't it?

Please be fair.

Regards,

Ravi Kanth Talagana

Read only

0 Likes
775

I actually tick the check box by mistake,

so its not about being unfair rather its about a mistake which cannot be corrected

Regards,

Kushagra