Skip to Content
author's profile photo Former Member
Former Member

currency convertion

currency convertion

i want to convert currency from sap internal currency to deffrent courency (local as per the country)

please can any body help me

Moderator message: FAQ, please search for available information before posting.

Message was edited by: Thomas Zloch

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on May 02, 2012 at 06:10 AM

    (FAQ) look for information on FM CONVERT_TO_LOCAL_CURRENCY (and CONVERT_TO_FOREIGN_CURRENCY)

    Regards,

    Raymond

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 02, 2012 at 06:13 AM

    Check the following code:

    DATA: CHANGE_DATE LIKE SYST-DATUM,
    FOREIGN_CURRENCY TYPE WAERS,
    LOCAL_CURRENCY TYPE WAERS,
    LOCAL_AMOUNT TYPE WRBTR,
    FOREIGN_AMOUNT TYPE WRBTR.


    * Set the date for the change

    CHANGE_DATE = SY-DATUM.


    LOCAL_CURRENCY = 'USD'.
    FOREIGN_CURRENCY = 'BRL'.

    MOVE 20000 TO LOCAL_AMOUNT.

    CALL FUNCTION 'CONVERT_TO_FOREIGN_CURRENCY'
    EXPORTING
    DATE = CHANGE_DATE
    FOREIGN_CURRENCY = FOREIGN_CURRENCY
    LOCAL_AMOUNT = LOCAL_AMOUNT
    LOCAL_CURRENCY = LOCAL_CURRENCY
    IMPORTING
    FOREIGN_AMOUNT = FOREIGN_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 ne 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ELSE.
    WRITE: 'Local amount :', LOCAL_AMOUNT CURRENCY LOCAL_CURRENCY,
    LOCAL_CURRENCY,
    /'Foreign amount:', FOREIGN_AMOUNT CURRENCY FOREIGN_CURRENCY,
    FOREIGN_CURRENCY.
    ENDIF.

    SKIP 2.


    FOREIGN_CURRENCY = 'BRL'.
    LOCAL_CURRENCY = 'USD'.


    MOVE 1000 TO FOREIGN_AMOUNT.

    CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
    EXPORTING
    DATE = CHANGE_DATE
    FOREIGN_AMOUNT = FOREIGN_AMOUNT
    FOREIGN_CURRENCY = FOREIGN_CURRENCY
    LOCAL_CURRENCY = LOCAL_CURRENCY
    IMPORTING
    LOCAL_AMOUNT = LOCAL_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 ne 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ELSE.
    WRITE: 'Foreign amount:', FOREIGN_AMOUNT CURRENCY FOREIGN_CURRENCY,
    FOREIGN_CURRENCY,
    /'Local amount :', LOCAL_AMOUNT CURRENCY LOCAL_CURRENCY,
    LOCAL_CURRENCY.
    ENDIF.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 02, 2012 at 06:21 AM

    Hi,

    You can use the FM 'CONVERT_TO_LOCAL_CURRENCY'.

    regards,

    tania.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 02, 2012 at 06:31 AM

    Hi,

    FM used is

    CONVERT_TO_FOREIGN_CURRENCY Convert local currency to foreign currency.

    Pls go through the below link for conversion using BAPI

    http://help.sap.com/saphelp_nw04/helpdata/en/a5/3ec9ea4ac011d1894e0000e829fbbd/content.htm

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.