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

variant

former_member240483
Contributor
0 Likes
734

Hi there,

In one of my secheduled program i am using a date in variant ..at the moment i have to change the variant manually...is there any possibility that we can puit that date in variant as current date ...

so that when that report runs it considered date as current date..

Thanks in advance ..

Regards

Rao

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
716

Hi,

You can do this in the 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.

Kindly assign points if this is helpful.

thanks

Vasanth

5 REPLIES 5
Read only

Former Member
0 Likes
716

HI,

You cant put the current date as a variant but what you can do it , intialize the date field in the program with the default value of sy-datum.

Reward if helpful.

Regards.

Read only

Former Member
0 Likes
716

If you are declaring date as a parameter, Do this.

Data: variable type sy-datum.

variable = sy-datum.

Parameter p_date type <whatever you have given> default variable.

If you are declaring date as a select option.

Select-options s_date for < whatever you have given> default variable.

Reward if helpful.

Read only

Former Member
0 Likes
717

Hi,

You can do this in the 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.

Kindly assign points if this is helpful.

thanks

Vasanth

Read only

Former Member
0 Likes
716

HI,

Fill your selection-screen fields, then after press SAVE button, then choose(check) save without values check box in the bottom for the corresponding date field. Then click on Maintain Selection Variable button in the application tool bar there you can select the date. Every time the if you select the variant this field value has filled with the value what you have assigned through that push button.

If you are not able to view that button on application tool bar then you go to Environment->Main. Sel. Variables.

Rgds,

Bujji

Read only

0 Likes
716

Thanks everyone,

i followed the Vasanth way its working fine..

Thanks for you time and inputs..

Regards

Rao