2006 Feb 03 1:54 PM
Hi all,
i need to select data based on date from 20000101 to sy-datum - 61. it cant be hard coded and is said that i have to use tvarv. i tried to input all the other values using tvarv. but i dont know how to input this dynamic range into variant....can u help me with this please.
thanks,
kiran
2006 Feb 03 2:15 PM
Hi kiran,
1. U can use like this
(the to_date will be dynamic, ie.
61 days from today)
2. Just copy paste
3.
REPORT abc.
DATA : ekko LIKE TABLE OF ekko WITH HEADER LINE.
DATA : todate TYPE sy-datum.
todate = sy-datum - 61.
SELECT * FROM ekko
INTO TABLE ekko
WHERE aedat >= '20000101'
AND aedat <= todate.
BREAK-POINT.
regards,
amit m.
2006 Feb 03 2:02 PM
Hi,
1. Create the entry in TVARV.
2. Create a schedull job to update the value (all the night)
3. Use in variant :
Execute the report -> set value -> press save (F11)
When you set the name of the variant name, select the checkbox "Selection variable" for the parameters you would like to update with the TVARV values.
Press the Selection Variable button
Select the name of the field in TVARV.
Press save ...
Rgd
Frédéric
2006 Feb 03 2:09 PM
thanks fred..
do it need such a complex procedure mate..is there any other alternative for that... is there any way that a dynamic range be created in tvarv...
2006 Feb 03 2:11 PM
I don't understand, you have to create only one time the variant.
After this, all the time the value will be update when you call the program.
maybe you have to modify your parameters with default value searching in the TVARV values.
Rgd
2006 Feb 03 2:11 PM
Hi kiran,
1. What is ur exact requirement ?
2. Ur critera for dynamic date !
Is it entered on selection screen ?
3. Or u have to check while getting
from dbtable.
4.
20000101 = fixed ?
sy-datum = current date (no problem)
61 = fixed ?
regards,
amit m.
2006 Feb 03 2:15 PM
Hi kiran,
1. U can use like this
(the to_date will be dynamic, ie.
61 days from today)
2. Just copy paste
3.
REPORT abc.
DATA : ekko LIKE TABLE OF ekko WITH HEADER LINE.
DATA : todate TYPE sy-datum.
todate = sy-datum - 61.
SELECT * FROM ekko
INTO TABLE ekko
WHERE aedat >= '20000101'
AND aedat <= todate.
BREAK-POINT.
regards,
amit m.
2006 Feb 03 2:22 PM
amit,
20000101 is fixed
then when i run the program it should get data from range
20000101 to sy-datum - 61. I cant hard code the thing u provided me. all should be dealt in tvarv as i am instructed like that.. how am i gonna replicate the same in tvarv.....am i clear..
fred i cant get u ..u said for filling in the variant i have to run a batch job..am i right...just to get the date range have i to det a batch job....makes it compliacted mate..
2006 Feb 03 2:26 PM
Hi!
Instead of having one select-option for the date, make two parameters (for start / end).
First parameter can be maintained in job variant as constant (not hard-coded, not dynamic).
Second parameter can be maintained as normal variable 'sy-datum +/- n days' with -61 as dynamic option.
Then no TVARV handling is needed.
Regards,
Christian