‎2009 Dec 30 6:59 AM
Hi experts,
i need to create dynamic variant for date range (so_date-low, so_date-high): sy-datum-1.
that will bring the data in the report for yesterday.
How can i do this?
i know how can i make variant for so_date-low
i dont know how can i do that on so_date-high.
thanks,
Michal.
‎2009 Dec 30 8:20 AM
thanks for reply.
i dont know how can i create dynamic variant for the variable so_date-high.
to the variable so_date-low i succeed.
thanks in advanced,
Michal.
‎2009 Dec 30 7:23 AM
What do you mean by a dynamic variant ?
Just initializing the values to the screen fields will satisfy your requirement.
In at selection-screen output,
so_dat-low = sy-datum - 1.
so_dat-high = so_dat-low.
append so_dat.
‎2009 Dec 30 7:37 AM
Hi,
In the initialization event you can put your code like this
so_dat-low = sy-datum - 1.
so_dat-high = so_dat-low.
append so_dat.
Regards,
Nagaraj
‎2009 Dec 30 7:55 AM
‎2009 Dec 30 7:41 AM
Hi,
Befor Saving the variant go into change Mode : "Copy Screen Assign ment" then click on cloumn "Selection Variable" against that date field (F4 help) select Dynamic Date Caliculation.
Then Select the Value "Name of the variable" to Select the date .
regards.
Venu Madhav
‎2009 Dec 30 8:06 AM
1. Execute the report and you will get your selection screen then press save
2. system will take u to variant screen , select the line of your date select-options field from the list and scroll right
3. double clik on "selection variable " column and select "D"
4. double clik on "Name of variable" last column and select "Current date - xxx,current date + yyy" system will provide you popup with "Enter a value xxx" and "Enter a value for yyy" and enter value 1 in xxx and 0 in yyy
and save the variant . now your S_DATE_LOW will be system date - 1 ie yesterdays date
a®
‎2009 Dec 30 8:20 AM
thanks for reply.
i dont know how can i create dynamic variant for the variable so_date-high.
to the variable so_date-low i succeed.
thanks in advanced,
Michal.
‎2009 Dec 30 8:26 AM
As said in my earlier reply select
"Current date - xxx,current date + yyy" system will provide you popup with "Enter a value xxx" and "Enter a value for yyy"
and here XXX is S_DATE-LOW and YYY is for S_DATE-HIGH . and enter values in these will provide you dynamic variant.
a®
‎2009 Dec 30 8:21 AM
i guess date questions are no more allowed.. any ways please search.. you will find your answer ...
[search link|http://forumsa.sdn.sap.com/search.jspa?threadID=&q=dynamicdatevariantinselection+screen&objID=f50&dateRange=all&numResults=30&rankBy=10001]
BTW for high value you can write the code in initialization event of your report.