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 date variant in selection screen

former_member125661
Contributor
0 Likes
2,755

I have a selection option s_date in my program where I want to use the dyanmic variant with.

it is a date range and for the lower range, I would like to have a static value of 04/01/2010 and for the higher range I want to have last date of the prev month.

I see last date of the prev month in the drop down (F4) Dynamic table, but selecting that is overwriting the s-date-low instead of s_date-high. How can I use the dynamic variant for this ? Can i create my own custom drop downs for these dates?

S_DATE FROM (_04/01/2010_) TO (LAST DATE OF PREV MONTH)

Thanks in advance..

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,039

Hi,

Is there any reason you couldn't code the selection as 2 parameter fields (date format) P_FROMDT as your fixed date and P_TODT as your variable date and then save as separate values in the variant, coding the select accordingly?

Regards, Andy

Hi,

Is there any reason you couldn't code the selection as 2 parameter fields (date format) P_FROMDT as your fixed date and P_TODT as your variable date and then save as separate values in the variant, coding the select accordingly?

Regards, Andy

6 REPLIES 6
Read only

Former Member
0 Likes
2,040

Hi,

Is there any reason you couldn't code the selection as 2 parameter fields (date format) P_FROMDT as your fixed date and P_TODT as your variable date and then save as separate values in the variant, coding the select accordingly?

Regards, Andy

Read only

brad_bohn
Active Contributor
0 Likes
2,039

Or, why can't you use TVARVC with a custom variable instead of the dynamic date calculation or just use the program initialization code and the 'save field w/o values' option in the variant?

Read only

0 Likes
2,039

I cannot change the program..coz this is a std program and is in production. Also here there is not practice of using TVARVC tables..

Read only

brad_bohn
Active Contributor
0 Likes
2,039

Also here there is not practice of using TVARVC tables..

Then discuss it with your team lead and implement one - that's a bad reason for not using a provided solution.

Read only

Former Member
0 Likes
2,039

In variant you can specify dates dynamically.

When you save a variant, system ask you enter variant name and Meaning. On the same screen you can specify these dynamic values.

For the parameter/select-option where you want to specify dynamic value, press F4 on 'Selection Variable' column.

Choose type of variable as 'D' (Dynamic date calculation).

Press F4 on 'Name of Variable(Input only using F4) column and select 'Current date +/- ??? days' on next screen.

On input screen enter -1.

Repeat same for To Date' field.

Prabhudas

Read only

0 Likes
2,039

Prabhudas -

that would be nice, except the TO is NOT in the list of fields. You really should try out your solution.

Shareen -

did you ever find a work around? I am facing the same issue, as each user would like to have their own pre-defined Range.

Thank you, Masha