Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Dynamic Selection of 'To' date


I have Planned Order Start date 'From' and 'To' option in our selection screen of a customized program. I want 'From' fiield to be blank and 'To' field mandatory. The calcuation of 'To' date should be dyanamic in nature (depending upon Selection variable and Name of Variable maintained in the Variant)

If I use the variant option for the same then the system proposes the date in 'From' field and not 'To' field after calculating it dynamically.

This is required so that the system should fetch all the past Planned Orders plus the Orders coming within 'To' date option in the selection screen.

Thanks in Advance.



In the 'variable name' select the indicator (first column) as 'I' (Select specified values) and select 'LE' (less or equal) from 'option' (second column). After selecting the said options upon hitting enter you'll get a new pop up where you need to enter the number of days further into the future that you want the dynamic date should be calculated (a positive means future, a negative means in the past). Once you save the variant, you'll see the setting appearing in the 'from'. Do not worry about the setting that appears in the 'from' instead of 'to'. When you select this variant or execute this program via this variant the date will be calculated based on the current date + future number of days and all past dates from that future date. Again do not worry about the setting in the 'from' - this is how it is set up.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question