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

Function Module

Former Member
0 Likes
430

hI,

Can any one give me program which used 'Read_Exchange_Rate' function module.

3 REPLIES 3
Read only

Former Member
0 Likes
382

hi,

check this..

copy paste the below program in se38 and excecute

REPORT ZTEST01 .

TABLES: T001, TKA01, TKA02.

DATA: KURS LIKE TCURR-UKURS.

PARAMETERS: BUKRS LIKE T001-BUKRS.

  • Bestimmen der Buchungskreiswährung

SELECT SINGLE * FROM T001 WHERE BUKRS = BUKRS.

  • Bestimmen der Kostenrechnungskreiswährung und Vergleich mit

  • Buchungskreiswährung

SELECT * FROM TKA02

WHERE BUKRS = BUKRS.

SELECT SINGLE * FROM TKA01 WHERE KOKRS = TKA02-KOKRS.

  • if t001-waers <> tka01-waers.

  • Umrechnungskurs besstimmen

CALL FUNCTION 'READ_EXCHANGE_RATE'

EXPORTING

DATE = SY-DATUM

FOREIGN_CURRENCY = TKA01-WAERS

LOCAL_CURRENCY = T001-WAERS

TYPE_OF_RATE = 'M'

IMPORTING

EXCHANGE_RATE = KURS

  • FOREIGN_FACTOR =

  • LOCAL_FACTOR =

  • VALID_FROM_DATE =

EXCEPTIONS

NO_RATE_FOUND = 1

NO_FACTORS_FOUND = 2

NO_SPREAD_FOUND = 3

OTHERS = 4.

  • endif.

ENDSELECT.

WRITE KURS.

rewards if useful.

regards,

'Nazeer'

Read only

Former Member
0 Likes
382

hi

there many programs to know it

go to se37 give fm name and click where-usedlist(controlshiftf3) button there

regards

sandhya

Read only

Former Member
0 Likes
382

Hi

this is function doccumentation

FU READ_EXCHANGE_RATE

____________________________________________________

Short Text

Determine Exchange Rate from Table TCURR

The exchange rate valid on the specified date is read from table TCURR according to the currency key and the exchange rate type. The ratios for the currency units from table TCURF are transferred to the calling program in addition to the exchange rate determined. if exchange rate fixing is defined for the exchange rate type TYPE_OF_RATE, this information is transferred to the calling program.

Sample call-up:

CALL FUNCTION 'READ_EXCHANGE_RATE'

EXPORTING DATE = BKPF-WWERT

FOREIGN_CURRENCY = BKPF-WAERS

LOCAL_CURRENCY = T001-WAERS

TYPE_OF_RATE = 'M'

IMPORTING EXCHANGE_RATE = KURS

FOREIGN_FACTOR = FAKTOR-F

LOCAL_FACTOR = FAKTOR-L

EXCEPTIONS NO_RATE_FOUND = 4

NO_FACTORS_FOUND = 8.

Parameters

CLIENT

DATE

FOREIGN_CURRENCY

LOCAL_CURRENCY

TYPE_OF_RATE

EXACT_DATE

EXCHANGE_RATE

FOREIGN_FACTOR

LOCAL_FACTOR

VALID_FROM_DATE

DERIVED_RATE_TYPE

FIXED_RATE

OLDEST_RATE_FROM

Exceptions

NO_RATE_FOUND

NO_FACTORS_FOUND

NO_SPREAD_FOUND

DERIVED_2_TIMES

OVERFLOW

and where used program list is

reward if usefull