2009 Jul 06 10:02 AM
Hii Friends,
I want to fetch data from "tcurr" table from date taken from an internal table. As my Date in internal is in the format 20080501 i want to take data for that date from tcurr table.
Please can anyone help me how to get the values.
Regards,
SANY...
Hii Friends,
I want to fetch data from "tcurr" table from date taken from an internal table. As my Date in internal is in the format 20080501 i want to take data for that date from tcurr table.
Please can anyone help me how to get the values.
Regards,
SANY...
2009 Jul 06 10:06 AM
Hi Santosh,
use Fm CONVERSION_EXIT_INVDT_INPUT
for changing date format.
This is conversion Routine.
Regards,
Vijay
2009 Jul 06 10:09 AM
Use these fm.
CONVERSION_EXIT_INVDT_INPUT
CONVERSION_EXIT_INVDT_OUTPUT.
2009 Jul 06 10:18 AM
hi Santosh ,
u cannot fetch data from 'tcurr' table based on date as there is no date field available in the table.
Regards.
2009 Jul 06 10:28 AM
@ Deeba , There is date field in the TCURR table .
Hi ,
gv_date1 = 'yyyymmdd'
CALL FUNCTION 'CONVERSION_EXIT_INVDT_INPUT'
EXPORTING
INPUT = gv_date1
IMPORTING
OUTPUT = gv_date1
.
*To fetch the exchange rate
if IS_BIL_INVOICE-HD_GEN-BIL_WAERK = 'USD' .
select UKURS GDATU from tcurr
into CORRESPONDING FIELDS OF TABLE gi_tcurr
where FCURR = 'USD' "from currency
and TCURR = 'ARS' " to currency
and gdatu <= gv_date1 . "effective date
Hope this will help you .
Thanks and Regards,
2009 Jul 06 11:09 AM
i got the result but i dont want to use less tha equal to operator.
i want the data for the particular date. i tried removing less than operator. But then sy-subrc turns to be 4.
2009 Jul 07 7:17 AM
Hi ,
If you are trying to use 'eq' to then the selection migth fail cuz there may not be an entry in the tcurr table for that particular date . If you are trying to fetch the exchange rate , use lesser or equal to .
sort the internal table after fetching in descending order of the date . and take the first record . It will give you the latest exchange rate for that particular date .
Regards,
Ragesh
2010 Nov 30 9:13 AM
2009 Jul 06 10:40 AM
use this FM:-
CONVERSION_EXIT_INVDT_INPUT
This will convert your date to internal format as found in TCURR table. You just have to pass ur date in exporting and u will get the inverted date in impotring.
You can then use this date to fetch the data from TCURR
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |