cancel
Showing results for 
Search instead for 
Did you mean: 

Background job schedule and mail triggering

former_member195427
Active Contributor
0 Kudos

Hi Experts,

I schedule a background job to run a custom program for project closure.The job is running successfully. But,the mail I am getting from this job run is same all the time (means it's showing same project closure again and again though I am running job for different projects). Is it some bug in our custom program or any parameters required to be check in job schedule?

Kindly suggest.

Thanks & Regards

Saurabh

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member195427
Active Contributor
0 Kudos

Hello All,

Thanks for your help. The issue was with our custom program. During mail execution program, it was passing PSHI (internal number) of project instead of POSID (external number) of project.And, we were fetching POSID for mail triggering in our program.

We altered our program at particular space and now I am getting individual mail for projects.

Closing the thread.

Regards

Saurabh

Former Member
0 Kudos

Hi Saurabh,

Please recheck the variants used for the custom program. If the variants created are ok then you may check whether multiple variants are correctly assigned with the job in tcode SM37. If all is ok on this end, then you may execute your custom program for these variants and check what is the output coming? If the output data is same as the output data received in the mail, then you may need to alter the logic of the program.

former_member195427
Active Contributor
0 Kudos

Hi Rahul,

Thanks for your reply. What do you mean by 'variant assigned in SM36' .  I have created simple job in SM36 with custom program assignment and job schedule.

Regards

Saurabh

marianoc
Active Contributor
0 Kudos

Hi Saurabh,

Did you set up the email notification in SM36?

In this case, you should be receiving the spool message generated by the Job. You said: "the mail I am getting from this job run is same all the time", maybe this happens because the job is always running the same variant of your custom program and it is generating the same Spool message. I would review how the job was scheduled.

Regards,

Mariano

Former Member
0 Kudos

Yes you have created a job with custom program but what are the input parameters which is being passed in the program? You will need to Save different variants for different projects and then assign the variants with your job.

former_member195427
Active Contributor
0 Kudos

Yes. That is the point I am missing. Just one 'date' is checked and project is taken into account for the custom program and after its successful run the mail is sent to users.

And when the same program I am assigning in SM36,it is actually running the program accurately for project/s but sending the same mail which it send for very first project earlier.

Can you please guide me on the way to create these variants? 


You will need to Save different variants for different projects and then assign the variants with your job.

Will it be required to create variant again and again and assign different projects individually? As, we are not sure that which project is gonna be created in future. So, need guideline how these variants can help me to sort out the e-mail issue.

Regards

Saurabh

Former Member
0 Kudos

Dear

in sm36 when you specify program name then it asks for variant spevify the name of the variant for your project then it give report for that project only

Regards