03-01-2018 5:07 AM
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?
03-01-2018 6:00 PM
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?
03-02-2018 5:35 AM
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/
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?
ReplyIn 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,
03-02-2018 5:51 AM
03-02-2018 7:52 AM
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,
03-02-2018 11:16 AM
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.
03-02-2018 12:59 PM
Remove the 'save without value', it has little meaning combined with a date calculation.