To use a selection variable for date calculation, you must have defined a date field as a selection criterion or parameter in the relevant program.
PARAMETERS DATE LIKE SY-DATUM.
To assign a date calculation variable to an existing variant:
...
1. In the initial screen for maintaining variants, choose the appropriate variant.
2. Select the Attributes field.
3.
Choose
Change.
The attributes screen
for the selected variant is displayed.
4. In the Selection Variable column, press F4 and choose a type of selection variable. The display window shows the possible types for the selected field.
5.
6. Select type D for dynamic date calculation.
7. In the Variable Name column, choose the F4 help. All possible date calculations are displayed.
8.
9. Select an entry and choose Choose.
If necessary, enter the required values. To subtract days, you must enter them in the format of a number with a minus sign in the last position (for example 10-).
Note that you cannot change the proposals in the list, nor can you add new proposals.
Here you can also specify the selection options for the date calculation.
10.
Save your
entries.
You return to the attributes screen.
11. Save the attributes.
You have assigned a variable to a variant for date calculation and saved it. Note that after choosing the selection variable, you must save the attributes again on the attributes screen.
You can choose Selection Options on the selection variable screen to make further specifications for date calculations