Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Set Current Date as Default date for Background Job Scheduling in SM36/ SM37

former_member311223
Participant
0 Kudos
2,943

Dear Experts,

I have a program that will generate and Update Serial Numbers based on Date as Input Field. And This program is supposed  to execute everyday at a scheduled time. I have two Issues.

1) Since this program has to execute everyday and the Input value should be the current system date. How can i set my input value as current system date in my input field using Variants?

   I have set a variant but the variant is taking the value which have provided in the begining. for ex. while saving the variant the value was '18.06.2012' but when i checked it today(19.06.2012) in SM37 it gaves error as 'No Record found for the Current Date'. Kindly hepl me to solve this issue.

2) Second issue is how to check the Output if the program has got executed successfully in SM37 ?

Since yesterday(18.06.2012) the prgram got executed and the Status is displaying as "Finished" in green in SM37. And in the Spool field we are getting the Spool symbol . When I click on that Spool symbol it is moving ti a List Display and there it is not showing any type field i.e. I am not able to see the output.

I have searched the SDN ahere I found that once the if the job is exeuted successfully then we will get the Spool symbol in the spool filed and if we click on that it will display a List Output where if we click on type it will diplay the Output. But In my case I am anot getting any such type file.

I even check the Log and it is showing Job Started & Job finished for the ate 18.06.2012.

Kindly suggest

1 ACCEPTED SOLUTION

davis_raja
Active Participant
0 Kudos
461

1) Use the DEFAULT option in SELECT-OPTION to set the value of Date to SY-DATUM

2) Give * in Job name and give your ID in username in SM37 screen. It will display the list of background jobs in your ID. There is a option called Status which will give you the status of the job.

2 REPLIES 2

davis_raja
Active Participant
0 Kudos
462

1) Use the DEFAULT option in SELECT-OPTION to set the value of Date to SY-DATUM

2) Give * in Job name and give your ID in username in SM37 screen. It will display the list of background jobs in your ID. There is a option called Status which will give you the status of the job.

Former Member
0 Kudos
461

Hi,

1) You need to use a dynamic variant for this.

    Enter the values you want in the slection screen and press save.

    This will open the variant window.

    Say your field for date is P_DATE, then for that field, click Selection Variable and in the F4 help, select Dynamic date and in Name of variable set it as Current date.

Just do a search in SCN on dynamic variants and you can see the step by step approach.

2) After selecting Spool, Click on spool and press display.

Thanks,

Shambu