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: 

Issue in Job Scheduling

former_member15918
Participant
0 Kudos

Hello Experts,

I have written a Remote Fucntion module which schedules a Job .

Code for reference

  • submit via job

CALL FUNCTION 'JOB_OPEN'

EXPORTING

jobname = c_jobname

sdlstrtdt = sy-datum

sdlstrttm = sy-uzeit

IMPORTING

jobcount = w_jobcount.

move sy-uname to lw_AUTHCKNAM.

SUBMIT zpzhhr_ex_chk_user_assign_role

WITH s_uname IN r_uname

VIA JOB c_jobname NUMBER w_jobcount

AND RETURN.

  • -> GSCA09102008 - submit via job

CALL FUNCTION 'JOB_CLOSE'

EXPORTING

jobcount = w_jobcount

jobname = c_jobname

strtimmed = 'X'

EXCEPTIONS

cant_start_immediate = 1

invalid_startdate = 2

jobname_missing = 3

job_close_failed = 4

job_nosteps = 5

job_notex = 6

lock_failed = 7

OTHERS = 8.

The Concern is

When I am calling this RFC (asychronous call) from other system job just gets schedule. It doesnt go to Active status and hence has to be executed explicitly from SM37.

But when I am executing this FM independently it immediately goes to Active status.

The users in both cases are diffent. For RFC call its RFC default user and for independent its the user with which I am logged in.. Is it possible that the User for RFC call doesnt have enough authorization to Execute the job thats why it doesnt go to active status.

Not sure... Please help ...

Regards,

Hema

2 REPLIES 2

former_member15918
Participant
0 Kudos

The issue was with RFC user Authorization.

former_member15918
Participant
0 Kudos

The issue was with RFC user Authorization.