Application Development and Automation 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: 
Read only

Program is not working during Background Schedule

rajkumarnarasimman
Active Contributor
0 Likes
3,339

Hi All,

We written one program, which is working fine when we run manually. The same program is scheduled in background at 9.00am everyday. But It is not working during background schedule.

Program Logic:

Send email to the trainees who are all suppose to attend the training


Note:

There is no Error message is handled in the program.

Regards

Rajkumar Narasimman

1 ACCEPTED SOLUTION
Read only

FredericGirod
Active Contributor
0 Likes
2,260

Hi,

did you use functions, class ... use something in the sapgui ?  OLE ... file ... 

regards

Fred

12 REPLIES 12
Read only

FredericGirod
Active Contributor
0 Likes
2,261

Hi,

did you use functions, class ... use something in the sapgui ?  OLE ... file ... 

regards

Fred

Read only

0 Likes
2,260

Hi Frederic,

Only Two functions are used,

  •    READ_TEXT- To read the standard text
  •    SO_NEW_DOCUMENT_SEND_API1 - To send email

Even here also the error message is not handled.

Regards

Rajkumar Narasimman

Read only

0 Likes
2,260

check the email queue SOST if the emails are pending there ..

Read only

0 Likes
2,260

Did you put a COMMIT WORK AND WAIT after the call of the function ?

regards

Fred

Read only

Former Member
0 Likes
2,260

what kind of user are you using for the background job ? Is it the same user who runs the program in foreground ..

Check in su01 if the background user email id is maintained...

Regards,

Tashi

Read only

former_member202818
Active Contributor
0 Likes
2,260

Hi Raj,

Try se38->program->execute->background

Read only

0 Likes
2,260

Hi Sreekanth,

Thanks for your reply. When executing in background from SE38, it is working fine. Email is triggering in SOST. But the scheduling done in SM36,  I am facing the problem, Email is not receiving in SOST.

Regards

Rajkumar Narasimman

Read only

0 Likes
2,260

Hi Sreekanth,

what it is showing in job log and the job is finished?

Thanks & Regards,

Polu

Read only

0 Likes
2,260


Hi ,

when you create the job in SM36, what if you set the job as "immediate execution". Does it work ?

when you set it as a periodic job, what is the status of the job which was suppose to be executed ?

I am assuming the start condition of the job wasnt proper, if the user is proper (same or similar user as the foreground user).

Please have a look closely at the date and time of the job (its sap system date and time).

Regards,

Tashi

Read only

0 Likes
2,260

Hi Sreekanth,

Please check the job log then definitely you will get some idea what you are missing. If the job is finished and no issues in job log then delete all the mails in SOST and run the program in Background.

Thanks & Regars,

Polu

Read only

former_member202818
Active Contributor
0 Likes
2,260

Can you try with this addition..

CALL FUNCTION 'SO_DOCUMENT_SEND_API1' IN BACKGROUND TASK

Read only

Former Member
0 Likes
2,260

Hi Raj,

Try to configure the background user..usually Basisbatch/<>remote user also assigned in su01d for batch user.Ensure the SCOT settings are covered.

Check in spo2 whether the spools are created.As it a batch job i am not sure it will appear in your outbox.

Regards,

Kannan