ESP Workload Automation

 View Only

 Can SAP Job Logs be retrieved using the ESP scheduler engine public rest APIs?

Jump to  Best Answer
dharwood's profile image
dharwood posted May 14, 2026 12:20 PM
In ESP, when an SAP job fails, the WOBSF spool does not contain much information, other that what was run. 
We would like to save job failure information in our failure tickets, and would like to use the API. 

===============================================================================
Output messages of R/3 workload object FS000077.SAP/FIHOUR2.164776/MAIN
Start date: Thu May 14 12:07:11 EDT 2026
===============================================================================
20260514 12071107+0400 SAP_PRD JavaAgent#tcpip@PRD_ESPM FS000077.SAP/FIHOUR2.164776/MAIN RUN RFC Data(JOBDEFINE(StartMode=A,Jobname="FS000077.SAP",RfcDest=PRD) ABSTEP(ABAPname=RKCOR,Variant=MDG_CCH,PPDest=R4,PPNumLines=60,PPNumColumns=255)) WOBRequestID(A6CD8CCB697D28FF703A583950FAB6045878E66D17787748310890)
STATE SUBMIT Jobno(12071100) Status(Job Open: Defined and Released) SetStart
STATE FAILED Cmpc(1) Status(Terminated) SetEnd


Instead, using W then 2 provide the SAP job log with the pertinent details.  

┌───────────────────────────────┐
│                 ROW 1 OF 27   │
│    1. Cancel job              │
│    2. Read job log            │
│    3. Get job status          │
│    4. Check job status        │
│    5. Start job ASAP          │
│    6. Start job immediately   │
│    7. Get variant list        │
│    8. Read job definition     │
│    9. Edit job definition     │
│   10. Get global audit level  │
│   11. Set global audit level  │
│   12. Select jobs             │
│   13. Delete job              │
│   14. Get job spool list      │
│   15. Get job count           │
│   16. Get job classes         │
│   17. Set job class           │
│   18. Get ABAP list           │
│   19. Get printer list        │
│   20. Get dump                │
└───────────────────────────────┘

--------------------------------------------------     Read Job Log: Completed
COMMAND ===>
---------------------------------- TOP OF DATA---------------------------------
----------------------------------------
ENTERTIME=12:07:11
ENTERDATE=2026-05-14
MSGID=00
MSGNO=516
TEXT=Job started
RABAXKEYLN=0
MSGV1=FS000077.SAP
MSGV2=12071100
----------------------------------------
ENTERTIME=12:07:11
ENTERDATE=2026-05-14
MSGID=00
MSGNO=550
TEXT=Step 001 started (program RKCOR, variant MDG_CCH, user ID ESPOPER)
RABAXKEYLN=0
MSGV1=001
MSGV2=RKCORRH1
MSGV3=MDG_CCH_REPAIR
MSGV4=ESPOPER
----------------------------------------
ENTERTIME=12:07:11
ENTERDATE=2026-05-14
MSGID=OH
MSGNO=026
TEXT=Collective processing not possible due to processing by user abcd123
RABAXKEYLN=0
MSGV1=T198843
----------------------------------------
ENTERTIME=12:07:11
ENTERDATE=2026-05-14
MSGID=00
MSGNO=564
TEXT=Job cancelled after system exception ERROR_MESSAGE
RABAXKEYLN=0
Jonas Dusil's profile image
Broadcom Employee Jonas Dusil  Best Answer

Hi David,

Thanks for reaching out. 

The current REST APIs do not directly support retrieving this output. The generic get spool file command retrieves the agent spool files (or JES spools), but not specialized Agent plugins listings such as this one from SAP_JOB. 
Long term we are planning to add this, but it is not on the immediate roadmap for the next release.

There may be some workarounds though.
Off the top of my head, the complicated workaround would be to run the command in batch and retrieve the output of that JCL, which would then reside in the JES spool. But that is not an elegant solution as it would contain too many pieces and would depend on JES delay.
We'll try to find a better way and get back to you directly if we find something.

And of course eventually there would be a dedicated endpoint for this.