Sap Sm37 Lookup
sap_sm37_lookupList SAP background jobs from SM37 by job name, user, status, and date range, returning structured details and optional logs without navigating the transaction manually.
Instructions
List background jobs from SM37 (Job Overview). USE THIS instead of sap_transaction('SM37') - faster and returns structured data.
Filters: job name (wildcards like BILLING), username, status (scheduled/released/ready/active/finished/canceled), date range.
Note: status=None keeps SAP defaults (all checked except 'Scheduled'). Pass status=['scheduled'] explicitly to include only scheduled jobs.
When include_log=True and exactly one job matches, the job log is included.
Returns job list with name, status, start time, duration, user, and SAP client (mandant).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "sap_sm37_lookup"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | No | Status filter list (default: None = all statuses). | |
| session | No | Session ID (e.g., "s1", "s2"). None uses primary session. | |
| to_date | No | End date filter in ISO format (YYYY-MM-DD) | |
| agent_id | No | Agent identifier for binding check. Optional. | |
| job_name | No | Job name filter (supports * wildcard, default: *) | * |
| username | No | User filter (default: * for all users, None to keep SAP default) | * |
| from_date | No | Start date filter in ISO format (YYYY-MM-DD) | |
| include_log | No | Fetch job log when exactly one job matches (default: False) | |
| output_file | No | If provided, write full results to this JSON file |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| jobs | No | List of matching jobs | |
| error | No | Error message if success=False | |
| popup | No | Present when a popup dialog is active on screen | |
| job_log | No | Job log (only populated when include_log=True and exactly one job matches) | |
| success | No | Whether the operation succeeded | |
| job_count | No | Number of jobs returned | |
| retrieved_at | Yes | When the data was retrieved | |
| active_window | No | Which window was operated on (e.g., 'wnd[0]', 'wnd[1]'). If 'wnd[1]' or higher, a modal dialog is open. | |
| jobs_truncated | No | True if more jobs match than were returned (the lookup returns a limited number) | |
| filters_applied | No | Summary of filters that were applied |