SHOW_JOBSTATE: Display Job Status
Use this function module to return the status of a job in the background processing system. The statuses are those that you can display in the management transaction for background processing (transaction SM37).
For a programming example, please see
Displaying Job Status: SHOW_JOBSTATE.