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

  • submit background job with date selection (0)
    As mentioned in earlier submit report versions post you can make use of SUBMIT statement from your ABAP program in order to schedule any other ABAP program in background. However recently […]
  • SUBMIT command versions (0)
    In ABAP , if you want to directly execute a report from another program ,you can use . Using submit you can also create dynamic background jobs, call a report with its selection screen […]
  • stop background job if there is an already running job with the same name (0)
    SAP does not provide a functionality to prevent dublicate background job scheduling. Therefore if you schedule a background job more frequent than the run time of background job, there […]