02-25-2011 6:22 AM
HI,
I have a report with a date field, which is hard coded where from date = 1st day of month and todate = system date -1,
How do i create a variant with the date field set as above.
I need to create a variant, so that i can schedule the report daily.
Rgds
Norman
02-25-2011 6:31 AM
You can use FM "RS_CREATE_VARIANT" inside the report and then use this variant for execution.
Other FM to check out for RS_VARIANT_EXISTS .
02-25-2011 6:31 AM
You can use FM "RS_CREATE_VARIANT" inside the report and then use this variant for execution.
Other FM to check out for RS_VARIANT_EXISTS .
02-25-2011 7:14 AM
Please search in SDN before posting your issues.
You need to create dynamic variant
Try below link for its detail:
http://wiki.sdn.sap.com/wiki/display/ABAP/Creatingdynamicvariantusingtable+TVARV
Regards,
Prasoon Sahay
02-25-2011 7:55 AM
While saving the variant.....
1. Select selection variable as D for TO date
2. Select Current date - XXX days as give it as -1 so it will show as currentday- 1 days....
1. Select selection variable as D for FROM date
2. Select First day of current month.....
You can set these values in ALV options bar displayed in variant maintenance....
Don't go for TVARVC or manually changing the variant through code...it's the easiest option available...
02-25-2011 8:02 AM
Hi,
You can achieve this by creating a namic variant. Checkout below blog on how to create.
[http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/17257] [original link is broken] [original link is broken] [original link is broken];
Thanks,
Vinod.