cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic date calculation error

Former Member
0 Kudos

Hi Gurus

We have a scenario where the user is giving the current date+x in the variant but when the variant runs for first day its perfect,the next day the system is taking it as current date+(x-1).Kindly let me know what may be the issue or any oss note available for this .SAP version is 4.6

Regards,

Sathya Murthy C V

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Gurus,

Thanks for your support on the issue .

I was able to find the sap article no:1917960

It states as

If a job is scheduled from the selection screen of a report using menu "Program/Execute in Background", the selection visible on the selection

screen will be saved to a temporary variable with name &xxxxxxxxxx (e.g. &0000000022), and the job will be scheduled with this temporary

variable. It can be seen in SM37: select the job -> click “Step” button and see “Parameters” column:

It does not matter, if the values shown on the selection screen were loaded from a "normal" variant using menu or button "Get variant": after the

current selection is saved into the temporary variant, the temporary variant does not have any relationship any more to the normal variant, which

was loaded using "Get variant".

This is the cause why the selection with which the job is executed, does not change dynamically.

Resolution

The job has to be scheduled in a different way:

A. Scheduling from SE38:

1. In the start screen of SE38 the report name should be entered, but "Execute" button should not be pressed to start the selection screen!

2. Instead menu "Program/Execute/Background" should be used.

3. Then the variant name should be entered and the job should be scheduled with "Schedule" button.

4. This way the job will be scheduled with the variant that contains the dynamic date calculation (instead of using a temporary variant with

name &xxxxxxxxxx).

B. Scheduling from SM36:

1. A job name should be entered in SM36.

2. "Step" button.

3. Report name and the name of the variant with dynamic date calculation should be entered.

4. Job should be scheduled with required time and periodicity.

regards,

Sathya Murthy C V

Answers (2)

Answers (2)

Former Member
0 Kudos

Attach the screen shots of your variant creation with dynamic dates.

former_member42743
Active Contributor
0 Kudos

What transaction was the variant for? 

Was the field selection variable set as "D" for dynamic date calculation?

Craig