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: 

Background job goes into Cancelled state giving error : 'No authorization to execute external programs immediately'...

0 Kudos

Dear Experts,

I have a requirement in which, during the creation of notifications I need to execute a Z-program by scheduling a background job on future date and time. Now to achieve this, I have used the FMs : JOB_OPEN, JOB_SUBMIT and JOB_CLOSE.

In these FMs, I am passing the Start date/time for the job that is going to be scheduled.The job is scehduled succesfully.

But when the time comes for the job to execute, it is continously going into CANCELED state.

The error logs of the job scheduled states :-

No authorization to execute external programs immediately.

SXPG_STEP_XPG_START: xpg_final_check: rc = 503.

Failed to receive scheduling status of external program.

Job cancelled.

NOTE : When I am scheduling the same report to execute in background in SE38, it is executed successfully.

Below are the screen shots for your reference. Please help me on this.

1 ACCEPTED SOLUTION

0 Kudos

Thank you all for your help.

I have used the statement SUBMIT program AND RETURN, instead of the FM : JOB_SUBMIT.

5 REPLIES 5

michael_kozlowski
Active Contributor
0 Kudos

Caused by missing authorization object S_BTCH_JOB Jobaction RELE.

Ask basis/security team for help.

0 Kudos

Thanks for the immediate reply Michael....Couldn't reach out to Basis guys, so will check with them on Monday.

Just a small question, I have scheduled a job in SM36. It is executed successfully.

So in that case, will the system not check the Authorization for Object : S_BTCH_JOB, Job action : RELE ?

0 Kudos

Okay, in this case also check authority object S_LOG_COM for COMMAND, OPSYSTEM and HOST.

0 Kudos

This is a special case: if you choose the option to execute an external program with parameters directly and not via logical commands, then you also need authorization for object S_RZL_ADM actvt '01'. The check is very blunt and must be strict as what that external program does is completely unknown to the application scheduling it.

This authority must be present for the step user running the command and if the job is already scheduled with status released or the source job is copied, then even the scheduling user must themselves have sufficient authorization for S_RZL_ADM and not only the step user. They must have been able to run it themselves if they want to schedule it for a different user or interfere with an existing job of such a type.

Cheers,

Julius

0 Kudos

Thank you all for your help.

I have used the statement SUBMIT program AND RETURN, instead of the FM : JOB_SUBMIT.