read SM37 logs of background jobs

Recently i had a requirement to trigger a background job from my custom program. Background job had a standard SAP report as step and report was processing a business logic. After this business process has been completed after execution of background job, system creates an application log in SM37. I needed to read this log , because some times background job was failing because of a business problem like lock situations.  I have used BP_JOBLOG_READ to achieve this requirement. You can adapt below code according to your requirement.

 

 

You may also like