cancel
Showing results for 
Search instead for 
Did you mean: 

Dyanmic date maintenance for running a report

Former Member
0 Kudos

Hi

My technical team has developed a custom report which deletes some orders. While running the report it asks for 'date of last change' and asks for 'from date' and 'to date'. So that I can schedule the report to be run everyday, I wish to maintain a dynamic date in both the fields. When I try to save the variant and in 'Selection Varaibles' I can set the a dyanmic variable for only for 1 field 'from date' and selection variable does not give an option of storing a selection variable for the second date field 'to date'.

I want the report to run everyday with the date range changing everyday.

Is it possible or I will have run the report manually everyday changing the date range manually?

Thanks

Sandeep

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Using this maintained variant you execute your report online or schedule it background.

Former Member
0 Kudos

Hello,

Create a variant for the Program/Report which you are running.

While creating a variant maintain following...

e.g.

For Variable From Date, Maintain the Selection Variable as D for Dynamic Date Calculation, Name of Variable as Current Date (select it from the list which you will get after pressing F4).

For Variable To Date ... maintain selection variable as for Dynamic Date Calculation, Name of Variable as Current Date (select it from the list which you will get after pressing F4).

While Maintaining the selection Variable you get 2 options

1) T for Table Variable from TVARVC

2) D for Dynamic date calculation

Select as per your requirement.

While Maintaing the Variant for the program, following column names appear, as per your requirement set the values for it.

Selection Scrns

Field name

Type

Protect field

Hide field

Hide field 'BIS'

Save field without values

Switch GPA off

Required field

<b>Selection variable</b>

Option

<b>Name of Variable (Input Only Using F4)</b>

In your case you will require to maintain the Selection variable and Name of the varianle for the field name( e.g. from Date , To Date etc.)

Regards

Former Member
0 Kudos

HI Anjali,

The selection variable gives an option for 1 of the fields for the date, ie ' current date'. It allows me to maintain an entry for only 1 field dynamically. For the other fields, it does not give me an option of maitaining it dynamically or through the TVARVC table.

Regards

Sandeep

Former Member
0 Kudos

Hello,

Using the TVARVC variable you will able to maintain it, for that you will require to maintain a TVARVC variable values also in the range.

if you wnat this values to be maintain automatically as per the logic then write a program by which this variables will get updated as per the requirement.

Former Member
0 Kudos

Hi

I was supposing that I would be able to do this selection without development of any program. Is there any way to configure dynamic selection for both the fields of the date?

Regards

Sandeep

Former Member
0 Kudos

in the dynamic date maintainance, after doing the F4, if you scroll down, you can choose the option <b>date -xxxand date +xxx (workdays)</b> cant you? this will autiomatically move everyday.

does this not meet your requirement?

Former Member
0 Kudos

Hello,

dynamic variable date -xxxand date +xxx (workdays) will set the data only for one field.

e.g. If My field Start Date is having type as S (Range) and selection variable as D, Selection variable description as current date +20 days

then on my selection screen I will see the default value as Start Date : 17.7.2007.

and To : Blank (No values)

Start date = Current date 27.06.2007 + 20 Days = 17.7.2007

In your case Date is Selection range - i.e. Type S.

In the Type S Field Selection variable is technically one. Hence you will not able to set it for TO values. Here you will require to use <b>TVARVC variable which will have Selection type <b>S</b>.</b>

Thanks and regards,

Anjali

Former Member
0 Kudos

if you go to say /sapapo/rlcdelete

and if for period, you set D and if you choose the date-XXX and Date +xxx days then you get the popup in which you can enter 10 and 20 and if you save and get back to the program (get out of the transaction and back) you will see the dates automatically filled with 18.06.2007 and 17.07.2007

Former Member
0 Kudos

Hi Harish,

You are right.... I found these...

Variable name is <b>Current date - xxx,current date + yyy</b>,

<b>Date - xxx, Date + yyy (work days)</b>

Here you have to sepcify the XXX and YYY value.

When I selected variable as Current date - xxx,current date + yyy

and XXX value as 10, Y Value as 20.

My Selection variable looks like Date - 10, Date + 20.

Then on selection screen I got the value as Start Date : <b>18.06.2007 To 18.07.2007</b>

Thanks ...