Skip to Content

Need function modules for the following...

Hello experts,

Is there an function module that I can use for:

1. get the last date for a given year

2. get the exchange rate for a given document number in a span of 5 years -

for example, I need to get the exchange rate of doc. number 0000000123

for the year 2000, 2001, 2002, 2003, 2004 and 2005(maximum of 5 years)

Help would be greatly appreciated.

Again, thank you guys and take care!

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 03, 2006 at 06:36 AM

    Hi,

    Check the following, this might help,

    1.To get last date in a year - LAST_DAY_IN_YEAR_GET & FIRST_AND_LAST_DAY_IN_YEAR_GET

    2. To get the exchange rate - CALCULATE_EXCHANGE_RATE_N, to get the history of exchange rates for 5 years, you need to write a custom fm or a report, as the exchange rate would be fluctuating,

    Rgds,

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Aris Hidalgo

      Hi,

      To use CALCULATE_EXCHANGE_RATE_N, you just have to pass the required parameters like foreign amount/currency and local amount/currency, instead you can query the table TCURR for the same data, remember to convert the 'DATE' to internal format before sending it in to the fm/table, you can refer the following code, this might help,

      WRITE V_date TO LV_DATUM USING EDIT MASK '__.__.____'.

      CALL FUNCTION 'CONVERSION_EXIT_INVDT_INPUT'

      EXPORTING

      INPUT = LV_DATUM

      IMPORTING

      OUTPUT = LV_DATUM.

      • Retrieve the Exchange rate from Custom table for the Exchange

      *

      select ukurs from tcurr

      into tcurr-ukurs

      up to 1 rows

      where kurst = 'M'

      and fcurr = komk-waerk

      and tcurr = komk-HWAER

      and gdatu >= LV_DATUM.

      endselect.

      Rgds,

  • author's profile photo Former Member
    Former Member
    Posted on Aug 03, 2006 at 06:32 AM

    get the last date for a given year---> its always 31-12-'Year' u can hard code.

    check <b>BAPI_EXCHANGERATE_GETDETAIL</b>

    Regards

    prabhu

    Message was edited by: Prabhu Peram

    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.