SM21 — System Log Display
SM21 displays the kernel-level system log, which records work process starts and terminations, database connection errors, security audit events, and ABAP runtime failures at the operating system layer. It is a read-only viewer, not a database table browser. The underlying log is a rolling file per application server instance, so old entries age out and disappear once the buffer wraps.
SM21 is the transaction for reading the SAP system log, the low-level record of kernel, work process, and security events kept per application server. This page covers how to filter it correctly during an incident, where the entries actually live, and the retention and central-collection traps that cause consultants to conclude wrongly that 'nothing happened' when something clearly did.
Reviewed by an ERPClimb SAP consultant on 15 Sept 2026· 1,122 words
What it does
SM21 is the display transaction for the SAP system log, a kernel-generated record of events that sit below the ABAP application layer: work process restarts and terminations, database logon and connection failures, RFC and gateway errors, security audit events, and short dump triggers. It is a viewer, not a maintenance transaction; there is nothing to configure or save from the screen itself. The one structural fact that causes most confusion is that the log is not a permanent database table. Each application server instance keeps its own log as a rolling file at the operating system level, sized and rotated by profile parameters, so entries from several days ago may simply no longer exist by the time someone goes looking for them.
When it is used
SM21 is reached for whenever something failed at a level below what the ABAP stack trace can explain: a work process died mid-transaction, a batch job hung with no dump, a user got kicked out with a generic connection error, or an RFC destination started failing intermittently. It is also the first stop for correlating timing across multiple dialog or background work processes during an outage, and for checking whether a security-relevant event (failed logons, authorization check overrides, password resets) was logged at the kernel level. Functional consultants rarely open it directly; it is Basis's first diagnostic step, usually opened within minutes of a P1 ticket, before ST22 dump analysis or SM50 process inspection.
How to use it
- Open SM21 and set the date and time range first; default is usually a few hours or the current day, which is too narrow for most incidents.
- Choose whether to view the local instance log or the log for all servers in the system; the all-servers view is essential when the failure could have occurred on any application server.
- Execute and scan the list for red or yellow severity markers rather than reading every line sequentially.
- Double-click a suspicious entry to see its long text, which usually includes the work process number, user, and a message class that can be cross-checked elsewhere.
- Note the exact timestamp and server name of the relevant entry before moving to SM50, ST22, or the OS-level trace files, since the log entry alone rarely tells the whole story.
Key fields
- Local system log file - a rolling ring-buffer file maintained per application server instance at the operating system level, holding kernel and work process messages; not a transparent database table, so it cannot be queried with SE16.
- Central system log file - if central log collection is configured, each instance forwards its entries by RFC to a designated central instance, giving one consolidated view instead of one per server.
- Kernel trace and work process trace files - closely related OS-level files referenced by some system log entries, holding lower-level detail than what SM21 itself shows.
How to prove it in the data
There is no table to query directly for raw system log content, so SM21 is itself the proof tool: filter on the exact date and time window of the incident, the specific application server, and if needed the message class or user shown in the ticket, then export the filtered list rather than relying on memory of what was seen. To corroborate volume or recurrence, run the same filter across a wider window and count repeated identical messages, which often exposes a background job or interface looping rather than a one-off fault.
ECC vs S/4HANA
SM21 works the same way on S/4HANA as on ECC; the transaction, its filtering logic, and the underlying rolling log-file architecture are unchanged. Central log collection and retention are still governed by the same kernel-level profile settings rather than anything HANA-specific. There is no dedicated Fiori app that replaces it for ad hoc diagnostic use; Basis teams continue to open SM21 directly during incidents on both ECC and S/4HANA.
Common pitfalls
- Log rotation destroyed the evidence: the file wraps based on size or retention settings, so an entry from several days back may already be gone. Check timestamps of the oldest visible entry before assuming the incident simply did not log anything.
- Wrong scope selected: viewing only the local instance log misses events that occurred on a different application server in a multi-server landscape. Always check whether central logging is active before concluding an event never happened.
- Time zone or server clock mismatch: the log timestamp is server time, not the user's local time or the ticket's reported time, leading to false negatives when searching a narrow window.
- Severity misread: a yellow entry is informational noise most of the time, but during high load the same benign message can repeat hundreds of times and bury the one red entry that matters. Sort or scan for color before reading sequentially.
- Reflex fix that destroys evidence: restarting the application server or clearing the log to 'get a clean view' erases exactly the entries needed for root cause. Capture and export the relevant window first.
- Confusing system log with application log: SM21 only shows kernel and work process events, not custom ABAP application messages, which live in SLG1. Looking in the wrong log wastes the early minutes of an incident.
Whose problem this is
System log analysis is Basis territory from start to finish; functional and ABAP teams are consulted only to interpret what a specific message means for their process. A clean handover includes the exported filtered list, the exact server and time window checked, and a note on whether central logging was in scope, so the receiving team is not re-running the same filter from scratch.
Related SAP objects
Reviewed pages this object connects to in the ERPClimb knowledge graph.
Source: ERPClimb — https://erpclimb.com/sap-tcodes/sm21ERPClimb is an independent platform and is not affiliated with SAP SE. Reference pages are written and reviewed by SAP consultants for learning and troubleshooting.