Application Development 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: 

How to set System Date as variant?

Former Member
0 Kudos

Hi all,

I am running a report in which the selection screen consists of date as parameter. The user wants to set the system date as variant. How to set the system date as variant to the selection screen?

Note: I should not intialize the sy-datum as default in the report.

3 REPLIES 3

former_member186741
Active Contributor
0 Kudos

within save variant the system gives you options to choose variables which will represent things like for example 'today's date'.

For the variable you are trying to assign tick the 4th check box(selection variable). Then push the selection variable button.

Then click the dropdown to see what's avaiable to be assigned., eg 1st_of_month. Hit the save button to Choose it.

0 Kudos

You can do this in the dynamic variant itself.

Please follow these steps

1. Enter the values in the selection screen

2. Save the variant using the SAVE button

3. In the next screen for the date variable select the 'Selection variable' checkbox (L) and click on the button 'Selection variable' in the toolbar.

4. Now you will see this variable in the next screen with 3 types of buttons. Click on the middle button (ie. D - Dynamic date calculation).

5. Click on the down arrow button and select the option 'Current Date'.

6. Save the variant.

Former Member
0 Kudos

Hi,

You can do it as follows:

After executing create the variant

Step1: Click on save

Step2: Enter variant name

Step3: In 'Field attributes' select/Click 'Selection variable (i.e 'L') related checkbox.

Step4: Click on 'Selection Variable' button

Step5: Then select 'Selection criterion' as 'D' (the middle one)

Step6: Click on down arrow and select 'Current Date'.

This will set system date variant.I think this will solve your problem.

Kindly reward if helpful.

Regards,

Shakuntala