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

Currency date

Former Member
0 Likes
1,388

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...

8 REPLIES 8
Read only

Former Member
0 Likes
1,292

Hi Santosh,

use Fm CONVERSION_EXIT_INVDT_INPUT

for changing date format.

This is conversion Routine.

Regards,

Vijay

Read only

GauthamV
Active Contributor
0 Likes
1,292

Use these fm.

CONVERSION_EXIT_INVDT_INPUT

CONVERSION_EXIT_INVDT_OUTPUT.

Read only

Former Member
0 Likes
1,292

hi Santosh ,

u cannot fetch data from 'tcurr' table based on date as there is no date field available in the table.

Regards.

Read only

0 Likes
1,292

@ 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,

Read only

0 Likes
1,292

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.

Read only

0 Likes
1,292

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

Read only

0 Likes
1,292

thanks.

Read only

Former Member
0 Likes
1,292

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