Lesson 4 of 5
Logs and dumps
10 min
Listen to this lesson
When something goes wrong, two places tell you most of the story: the system log and the short dumps. First-level diagnosis means reading both quickly, connecting them by time, and deciding who owns the problem: Basis, the application team, development or SAP.
The system log: SM21
Each application server instance writes a system log of events and problems: database connection errors, work process terminations, failed logons, communication errors. Transaction SM21 shows it; by default it shows recent entries for the current instance, and you can select other instances to read them together. The log is a file of limited size, so old entries are overwritten silently. If you need entries from last week, read them before they are gone, or rely on central monitoring: Integration & Exception Monitoring in SAP Cloud ALM can collect ABAP runtime errors and system log entries from connected systems such as CMQ and CMP and keep them beyond the local file.
Short dumps: ST22
When an ABAP program hits a runtime error it cannot handle, the system terminates it and writes a short dump. Transaction ST22 lists dumps by date, user and program. Each dump states the runtime error name, a short text, what happened, where it happened (program, include, line), and the values of key variables. SAP training notes that dumps are kept for 28 days by default; mark an important one with Keep so housekeeping does not delete it.
| Dump category | Example | Usually owned by |
|---|---|---|
| Application program error | Division by zero in a custom pricing routine | Development (Kenji's team) or the SAP application component |
| Resource or installation error | Database unavailable, memory exhausted, timeout in dialog | Basis (Sam's team), sometimes the infrastructure provider |
| Internal kernel error | An error detected inside the kernel itself | Report to SAP through an incident |
Reading a dump in five minutes
- Runtime error name, for example
TIME_OUTorDBSQL_SQL_ERROR. Search SAP Notes with it. - What happened and error analysis: the plain-language description of the cause.
- Information on where terminated: program, include and line. Custom programs start with Y or Z.
- User and transaction: who ran what, in which client.
- Time: then open SM21 for the same minute on the same instance to see what else happened.
- SymptomA tester in CMQ client 100 gets "runtime error" when saving a sales order
- ST22Dump DBSQL_SQL_ERROR in a standard program at 10:42, user TEST_MARIA
- SM21At 10:42 the same instance logged database connection errors
- ClassifyResource or environment issue, not the sales order logic
- RouteBasis investigates the database connection; the tester re-runs after the fix
When the dump and the log are not enough
Some problems leave no dump: a work process restarts, a connection hangs, a program behaves strangely without terminating. Then the developer traces help. Each work process writes technical trace files in the instance work directory (named dev_*), readable with ST11 or from the work process overview. They are verbose and technical, so read them around the time of the problem and look for errors. SAP also offers self-service tools such as Guided Answers and a support log assistant that analyzes uploaded logs and traces; use them before opening an incident, and attach the dump, the log extract and the traces when you do.
What would you do?
Every morning since the weekend, a custom report used by Dan's team dumps with TIME_OUT in CMP. SM21 shows nothing unusual. What is the most useful first step?
- SM21: system log per instance, overwritten silently when full.
- ST22: short dumps with error name, cause, location, user and variables; kept 28 days by default unless marked Keep.
- Connect dumps and system log entries by time and instance.
- Classify: application error, resource or environment error, or kernel error, and route accordingly.
Check your understanding · not graded
Lesson check
1. Which transaction shows ABAP short dumps?
2. What happens when the system log file is full?
3. How long are short dumps kept by default, per SAP training?
4. A dump coincides with database connection errors in SM21. How should it be classified first?