cancel
Showing results for 
Search instead for 
Did you mean: 

Variant does not show current date despite having Current Date in its attribute as a variable!

reza_ahoui2
Participant
0 Kudos

Hi

I am using a RFC from system A to execute ABAP report with variant on system B on daily basis. I created a new variant in the system B on day 12th, using Current Date (as shown below).

But as you can see in the second screenshot (which is the spool content) it still refers to day 12th despite today being day 14th.

The thirds and fourth screenshot are from SM37. Not too sure why the parameter name (the third screenshot) is not as same as the variant name (first screenshot).

Please note that I have even tried D instead of X as well as checked the box of "Only for Background Processing" and "Save field without values", but to no avail.

Any suggestion why the current date is not picked up with this variant?

Thanks

Reza

Accepted Solutions (0)

Answers (2)

Answers (2)

reza_ahoui2
Participant
0 Kudos

Hi Jelovčan, hope you are well and many thanks for your help.

Regards

Reza

rjelovcan
Discoverer
0 Kudos

Greetings Reza,

I believe this problem arises if you decide to create a job directly from the currently used transaction.

Creating a job directly from a transaction using path: Menu -> Program -> Background job, leaves you with limited settings. Saving a job like that, the system instead saving a job with your preffered (and possibly allready created) variant, saves your job with its own SCREEN variant, named something like &000000000.....XYZ, which field values are based on date the variant was last saved. All of your preffered variant's customizations (dynamic date settings, save field without values tickbox, etc.) are not taken into consideration.

A solution for this is:
1. Create a variant with a dynamic date setting (e.g. D = actual date) for fields needed,

2. Create a job for your program using SM36 transaction. Settings there are more abundant and most IMPORTANTLY, you can select your own variant for the job after selecting a pushbutton "Define Step 1" among other settings.

Prntscr is in Slovene but worry not, it's all standard :).

Hope that helps!

Best regards,

Jelovčan Rok