11-01-2007 6:24 AM
hii gurus!!
I have a problem in below query. i am trying to pick currency rate from table TCURR [OB08] the lastest entry for that currency exchange rate.
but in TCURR, date format is different for eg -
79928974 for 25.10.2007.
but i want lastest date for currency exchange rate.
as the data format is different , after sorting the table , will get latest date as these numbers are in different format.
select SINGLE * from TCURR where gdatu = (latest date on which 0B08 was upated for particular curreny)
and fcurr = vbrk-WAERK
and tcurr = 'INR'.
if sy-subrc = 0.
CURR_RATE = TCURR-UKURS.
endif.
11-01-2007 6:49 AM
Does it allow multiple entries for the same currency?
Example
FCURR = USD
there will be only one entry with
TCURR=INR
so you just read it as below
select SINGLE * from TCURR
where fcurr = vbrk-WAERK
and tcurr = 'INR'.
This should work.
Test it out.
11-01-2007 6:49 AM
Does it allow multiple entries for the same currency?
Example
FCURR = USD
there will be only one entry with
TCURR=INR
so you just read it as below
select SINGLE * from TCURR
where fcurr = vbrk-WAERK
and tcurr = 'INR'.
This should work.
Test it out.
11-01-2007 7:21 AM
hii friends,
i have solved the problem in the table tcurr , the lastest entry is at the first row. that is ascending order.