04-03-2009 7:57 AM
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
04-14-2009 7:40 AM
04-14-2009 7:40 AM