7/29/2019 Dynamic Dates in Screen Variants .pdf
http://slidepdf.com/reader/full/dynamic-dates-in-screen-variants-pdf 1/6
You probably have used screen va
values in date fields? Obviously,
However, for many of us who w
below can save you some time and
executions of programs or results t
The example below has screensho
defining the dates in the screen
transaction MDBT and click on the
In the popup window, type the na
Click “Create” and continue until y
riants in the past, but did you know that SAP ca
this is not very important if your screen does
rk with date sensitive information, the dynamic
provide more accurate results. It is especially help
hat need to have a specific date or date range.
s from a variant created for an MRP background j
variant is consistent for any selection screen.
create variant icon.
e of the variant.
u get to the screen below.
provide dynamic
ot contain dates.
ate trick I’ll show
ful for background
b, but the logic in
To get here, run
7/29/2019 Dynamic Dates in Screen Variants .pdf
http://slidepdf.com/reader/full/dynamic-dates-in-screen-variants-pdf 2/6
Above shows the variant after ent
date, but is only a static value.
dynamically change the date? Onc
Please note that the table layoutwidth of several columns to enab
there are three columns to the far
Find the appropriate field in the ta
row for Planning date, highlight th
the dropdown icon or press F4 to s
Double-click on the line “D” for “D
click the green check (or press F2) t
Note: You will notice that another
Describing the possibilities with t
that you could add custom varia
personally used this table for varia
ring all the necessary parameters. The date defa
ow we’ve reached the meat of this post – how
you click save, you’ll be shown the attributes scre
on your display may not look exactly like below.le the capture program to show the ones that I
ight hand side of the table that we’ll be working wi
ble – in this example, we are interested in the Plan
e indicated table cell in the third column from the
ow the popup menu for the selection variable.
namic date calculation”. Alternatively, click once
o continue.
line is available with the description “Table Varia
is selection is truly beyond the scope of this pos
bles that could be populated via the screen va
ts, but I have worked with developers who use it r
lts to the current
can we make SAP
n (see below).
I have shrunk theant. Specifically,
th.
ning date”. In the
right and click on
n the line “D” and
le from TVARVC”.
. Suffice it to say
riant. I have not
gularly.
7/29/2019 Dynamic Dates in Screen Variants .pdf
http://slidepdf.com/reader/full/dynamic-dates-in-screen-variants-pdf 3/6
You can now see a “D” in the third
this field to be dynamically determ
to determine the date. In the sam
either click on the dropdown icon
Above is the resulting popup wind
green check/F2). In this case, I sel
program using this variant, the syst
Looking at the other options in th
for date determination. All should
column from the right. At this point, the system k
ined. However, we are not finished. We need to t
e table row, highlight the indicated table cell in fa
r press F4 to show the popup menu for the selectio
ow. Select the desired rule from the list (double-
cted “Current Date”. It means that during the nex
em will populate the current system date into the f
rules, you’ll see that SAP provides a significant a
be self-explanatory.
ows that we want
ll the system how
right column and
n variable rule.
click or select and
t execution of this
ield.
ount of flexibility
7/29/2019 Dynamic Dates in Screen Variants .pdf
http://slidepdf.com/reader/full/dynamic-dates-in-screen-variants-pdf 4/6
You can now see that the field on
Date”.
Above is the resulting screen. Noti
determined dynamically, the field i
What about fields with from/to d
dynamic date in the actual goods
As before, identify the selection s
column from the right. Then open
Compare the screenshot above to
there are two additional columns i
applicable to the rules that we saw
column allows you to specify whet
specify an operator (e.g., equal to,
the far right contains the dynamic date rule – in
ce that the date field is grayed out? Once you’ve d
no longer available for input.
tes? Look at the example below from VL06O wh
ovement date using both fields.
creen variable as having a dynamic date by choo
he dropdown on the far right column.
he one shown in the first example and you’ll find i
n addition to the new rules available. These extra
previously. If you recall, those rules determine sin
er the date is included or excluded; the second col
less than, greater than or equal to, etc…).
this case “Current
fined a field to be
ere we’ll define a
ing D in the third
looks similar, but
columns are only
le dates. The first
umn allows you to
7/29/2019 Dynamic Dates in Screen Variants .pdf
http://slidepdf.com/reader/full/dynamic-dates-in-screen-variants-pdf 5/6
In the example above, I selected I
second column for the rule “Curre
popup window appears where you
I entered negative seven days. So
days in the past (this rule does n
greater than or equal to.
Above shows how the rule appears
Let’s look at another rule which p
with the arrow below. In this cacurrent date. If you do not enter a
date in the results.
(include) in the first column and GE (greater than
t Date +/- ??? days”. Click the green check to con
enter the number of days (positive or negative).
my expectation is that the system will return a d
t consider the factory calendar) and will have an
in the variant now. Let’s see what it looks like in th
pulates values in both the from and to fields, like
e, you will be prompted to fill in values behindvalue for either, the system assumes you mean zer
or equal to) in the
tinue and another
te seven calendar
operator showing
e transaction:
the one indicated
and ahead of theo and uses current
7/29/2019 Dynamic Dates in Screen Variants .pdf
http://slidepdf.com/reader/full/dynamic-dates-in-screen-variants-pdf 6/6
I have entered seven days in the
transaction:
As you play around with the othe
saves you time and effort. I’ve fou
that pull time-sensitive informati
determination. Obviously, it will
type. The number of rules is signif
be very useful.
ast and three days in the future. Let’s see what
r rules and options, I think you’ll find this dynam
d it particularly useful for reporting purposes and i
on. FYI – for fields with time values, there is
nly appear in the variant when you attempt to c
icantly shorter than for dates, but depending upon
it looks like in the
ic date calculation
n background jobs
a dynamic time
ange a time field
your needs could