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

Dynamic current date variant with static date

Former Member
0 Likes
1,381

I have a report that I want to execute with a variant that defaults dynamically to today's current date, but I also want to select based on if that date field is initial too. In one execution. So select record if date is either today's date (dynamically calculated) or date is initial.

Anyone know how I can do that?

Thanks so much

Cathy

5 REPLIES 5
Read only

Former Member
0 Likes
1,109

Try something like this:

Select date

From ztable

Into table gt_table

Where date eq gv_dynamic_date

Or date eq space.

Read only

vijaymanikandan
Contributor
0 Likes
1,109

Hi

I hope you must have done some research on this. Post your code with the issue here.

You can default your date in initialisation event. Else have one hidden selection screen variable which date you can default to current date and another variable that you display to user which can be blank as well..

Read only

Former Member
0 Likes
1,109

I'm sorry, I should be a bit more clear. I have an SQ01 query that gets executed throughtout the day with a variant.

The variant is configured to default PGI date to todays current date. But I also want it to select all PGI dates that are initial too.

I can change the generated SQ01 code, but I was hoping there was a way to do that just through the variant set up.

Read only

0 Likes
1,109

hi

Did you try to force value in the variant in the multiple value with a value equal to space? So it will be like default date as today's date and fixed values as space.

Force value in the sense we use fixed values in the selection screen.

If this is not working then do coding in infoset

Br

Vijay V

Read only

Former Member
0 Likes
1,109

Yes, if I force the initial date in the variant, then the current date becomes static. It no longer calculated current date, the next day when it's run. Can't code the infoset, I don't think, because there's about 5 different variants and they all use different dates.