Skip to Content

Get job status

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?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Aug 26, 2009 at 03: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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 26, 2009 at 02: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.
    

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.