08-26-2009 3:52 PM
Hi gurus does any one knows if there is a way to know the status of a job? or is there is a funtion module to know if a job is still runnnig?
08-26-2009 4:15 PM
Hello,
You can use BP_JOB_STATUS_GET to get the status of particular job.
CALL FUNCTION 'BP_JOB_STATUS_GET'
EXPORTING
jobcount = ---> provide job number here
jobname = ---> provide job name here
* IMPORTING
* STATUS =
* HAS_CHILD =
* EXCEPTIONS
* JOB_DOESNT_EXIST = 1
* UNKNOWN_ERROR = 2
* PARENT_CHILD_INCONSISTENCY = 3
* OTHERS = 4
.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Hope this helps!
Thanks,
Augustin.
Edited by: Augustarian on Aug 26, 2009 8:46 PM
08-26-2009 3:58 PM
Check this
call function 'SHOW_JOBSTATE'
exporting
jobcount = p_jobc
jobname = p_jobn
importing
aborted = v_aborted
finished = v_finished
ready = v_ready
running = v_running
scheduled = v_scheduled
exceptions
jobcount_missing = 1
jobname_missing = 2
job_notex = 3
others = 4.
a®
08-26-2009 4:15 PM
Hello,
You can use BP_JOB_STATUS_GET to get the status of particular job.
CALL FUNCTION 'BP_JOB_STATUS_GET'
EXPORTING
jobcount = ---> provide job number here
jobname = ---> provide job name here
* IMPORTING
* STATUS =
* HAS_CHILD =
* EXCEPTIONS
* JOB_DOESNT_EXIST = 1
* UNKNOWN_ERROR = 2
* PARENT_CHILD_INCONSISTENCY = 3
* OTHERS = 4
.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Hope this helps!
Thanks,
Augustin.
Edited by: Augustarian on Aug 26, 2009 8:46 PM