Skip to Content
0

Not updating current date in background

Mar 01 at 05:07 AM

68

avatar image

Hi,

Good Morning.

I’ve been running background jobs using dynamic date variables – create the variant, create the variable using D and the current date. I’m running into a problem though – I’m setting it up to run on a schedule(26.02.2018), daily for example, but the current date doesn’t change like it’s supposed to. It just runs it for the same date(26.02.2018) every day. Have you ran into this problem?

Even I check the box for “Save field without values” in the variant.It is not working.

Can you please give some for this issue?

1.jpg (204.7 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

6 Answers

Thanh Dinh Mar 02 at 07:52 AM
0

Hello Mohamed,

I think the way you set D and "current date" for the parameter is correct and enough to fulfill your requirement. Flag "Save field without values" is not necessary for this case. Can you make a quick test by displaying the selection screen and loading your variant? If the parameter is displayed correctly as current date, so I think maybe the background job wasn't run with your variant.

I have one workaround but honestly I don't think it's the best. You can create a new Z* report then using command SUBMIT to run your report with current date in selection screen. The last step is schedule Z* report to run everyday.

DATA: 
wa_rsparams TYPE rsparams,       
lt_rsparams TYPE STANDARD TABLE OF rsparams.

wa_rsparams-selname = 'S_BUKRS'.
wa_rsparams-kind = 'S'.
wa_rsparams-sign = 'I'.
wa_rsparams-option = 'EQ'.
wa_rsparams-low = sy-datum.
APPEND wa_rsparams TO lt_rsparams.
CLEAR wa_rsparams.
SUBMIT your_report WITH SELECTION-TABLE lt_rsparams AND RETURN

Regards,

Share
10 |10000 characters needed characters left characters exceeded
Raymond Giuseppi
Mar 02 at 12:59 PM
0

Remove the 'save without value', it has little meaning combined with a date calculation.

Share
10 |10000 characters needed characters left characters exceeded
Jürgen L
Mar 01 at 06:00 PM
0

How can we know that this variant is used in your job?

And why did you decide to flag the indicator to save the field without value?

Share
10 |10000 characters needed characters left characters exceeded
Mohamed Ismail Mar 02 at 05:35 AM
0

Thank you jurgen.

based on below point: I did flagged this indicator. I want to run my z* program with everyday with current date in background.Is it possible?

https://saptribalknowledge.wordpress.com/2011/02/01/dynamic-dates-in-screen-variants/

  1. Eric Says:
    2011/02/16 at 05:06

    I’ve been running background jobs using dynamic date variables – exactly as shown in your screenshots, create the variant, create the variable using D and the current date. I’m running into a problem though – I’m setting it up to run on a schedule, daily for example, but the current date doesn’t change like it’s supposed to. It just runs it for the same date every day. Have you ran into this problem?

    Reply
  2. feimster Says:
    2011/02/16 at 14:04

    In the variant attributes on the line for your date field, check the box for “Save field without values”. This should force the date calculation to be used rather than the explicit value stored in your variant.

Regards,

Share
10 |10000 characters needed characters left characters exceeded
Mohamed Ismail Mar 02 at 05:51 AM
0

Thsis is input screen.


2.jpg (104.9 kB)
Share
10 |10000 characters needed characters left characters exceeded
Jürgen L
Mar 02 at 11:16 AM
0

If you look through the examples, which actually exists in several blogs here in the community too, then you can see that they all worked without having checked the box for “Save field without values” - So just try it without.

Share
10 |10000 characters needed characters left characters exceeded