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: 

RSAU_SELECT_EVENTS with variable dates

Former Member
0 Kudos

Hi, I need to run report RSAU_SELECT_EVENTS monthly as a batch job. The From date has to be 1st of every month and To date has to end last day of the month, however I realised these parameters are fixed i.e. I have

to remember to change the field value every month even though I schedule it as a batch job.

Is there any way or any variant in this report that will know how to pick up the From/To date correctly for monthly report?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello Annie,

It is simple. You need a create a dynamic variant for it.

If you want is step by step here it is:

Execute the report in SE38. In the selection screen you will have the date auto populated. Ignore it. Just press the save option. You will come to the screen:

ABAP:Save as variant.

Give the variant a name and a description.

Under the section FELD NAME you will find two entries for current date. Also there will be lots of check boxes infront of the fields. For both the entries of current data select the check boxes which are under the column marked "L" (Selection variable).

After this press the pushbutton selection variables.

In the next screen you will find two tabular entries for current date .Adjacent to them you will havethe choice to have the kind of selection you want. You will notice that color under column D(Dynamic date calculation) is yellow. Click on the yellow icon to select dynamic date selection. It will turn green. However the adjacent one under column T will turn yellow.

Repeat this for second entry for Current date as well.

Now we will come to part where you cando dynamic date selection.

For the first entry for current data you will notice a downward arrow under column T(yellow light).

Click on that arrow a pop up would come which would allow you to choose the date you want. Choose first day on the current month.

Repeat the second entry the same only difference being thatthe date you will choose is the last day of the current month.

Save the changes for selction variable screen as well Abap variant screen and test your variant.

I hope it works. Please award points accordingly.

Regards.

Ruchit.

2 REPLIES 2

Former Member
0 Kudos

Hello Annie,

It is simple. You need a create a dynamic variant for it.

If you want is step by step here it is:

Execute the report in SE38. In the selection screen you will have the date auto populated. Ignore it. Just press the save option. You will come to the screen:

ABAP:Save as variant.

Give the variant a name and a description.

Under the section FELD NAME you will find two entries for current date. Also there will be lots of check boxes infront of the fields. For both the entries of current data select the check boxes which are under the column marked "L" (Selection variable).

After this press the pushbutton selection variables.

In the next screen you will find two tabular entries for current date .Adjacent to them you will havethe choice to have the kind of selection you want. You will notice that color under column D(Dynamic date calculation) is yellow. Click on the yellow icon to select dynamic date selection. It will turn green. However the adjacent one under column T will turn yellow.

Repeat this for second entry for Current date as well.

Now we will come to part where you cando dynamic date selection.

For the first entry for current data you will notice a downward arrow under column T(yellow light).

Click on that arrow a pop up would come which would allow you to choose the date you want. Choose first day on the current month.

Repeat the second entry the same only difference being thatthe date you will choose is the last day of the current month.

Save the changes for selction variable screen as well Abap variant screen and test your variant.

I hope it works. Please award points accordingly.

Regards.

Ruchit.

0 Kudos

Hi All,

i want to implement this program,

But we are on sp level SAPKB62038 .Can we implement on this sp level.If not what is the minimum sp level for 4.7 to implement this program.

Thanks

Khaiser