Lesson 3 of 5
Dumps, locks and updates
10 min
Listen to this lesson
Three mechanisms explain a large share of "it failed but I do not know why" reports: runtime errors that terminate a program, lock entries that block another user, and update requests that fail after the user has already seen a document number. Each has its own transaction, and each tells a story if you know how to read it.
Runtime errors: ST22
ST22 lists short dumps. For diagnosis, read the runtime error name, the "What happened" and "Error analysis" sections, the termination point (program, include, line) and the user and transaction. The name alone often classifies the problem: TIME_OUT suggests a dialog step running too long; DBSQL_* errors point to the database interface; MESSAGE_TYPE_X means a program deliberately stopped on an inconsistent state, and the message number tells you which. From the dump, a developer can jump to the termination point to see the code and variables.
| Runtime error (example) | What it usually means | First move |
|---|---|---|
| TIME_OUT | A dialog step exceeded the time limit | Find the slow part (trace) or run the program in background |
| DBSQL_SQL_ERROR | The database returned an error to an SQL statement | Read the database error text; check SM21 and database status |
| MESSAGE_TYPE_X | The program stopped deliberately on an inconsistency | Read the message ID and number; search SAP Notes; check the data |
| Errors in custom (Y/Z) code | A defect or unexpected data in custom development | Route to development with the dump and the data used |
Lock entries: SM12
SAP uses logical locks (enqueues) so that two users cannot change the same object at once. SM12 lists current lock entries with the table or object, the lock argument (which object), the owner (user and client) and the time. A lock normally disappears when the user leaves the transaction or when the update that inherited it completes. A lock that stays for hours is a symptom: a session that hung, a job still running, or an update that failed.
- Is the lock owner still logged on or running a job?Yes → contact the owner or job owner; the lock is probably legitimate · No → next question
- Is there a pending or failed update request for that user (SM13)?Yes → resolve the update first; do not delete the lock · No → next question
- Have you confirmed the owner's session is gone and no update is pending?Yes → the lock entry can be deleted, and the action recorded · No → keep investigating
Update requests: SM13
When a user saves, the dialog step commits and passes the database changes to an update request, which an update work process executes asynchronously. Time-critical (V1) updates write the core business data; less critical (V2) updates write things like statistics. If an update fails, the user may already have a document number, but the document is incomplete or missing. SM13 lists update requests and their status; a failed request shows an error, links to the dump that caused it, and can be repeated once the cause is fixed, or deleted after the business has agreed how to recreate the data.
- User savesAna posts a supplier invoice in CMQ and sees document number 5100000123
- Update failsThe update terminates with a dump in a custom field check
- SymptomThe invoice cannot be displayed; a lock on the document lingers
- DiagnoseSM13 shows the failed request; its dump points to the custom check in the update task
- ResolveKenji fixes the check; Sam repeats the update request; the invoice appears and the lock is released
What would you do?
Maria cannot change sales order 1000457 in CMQ: "locked by user TESTBOT01". TESTBOT01 is an automation user whose suite ended two hours ago. SM13 shows a failed update request for TESTBOT01. What should Sam do?
- ST22: read error name, analysis, termination point and user; the name often classifies the problem.
- SM12: lock owner, object and time; long-lived locks are symptoms of hung sessions, jobs or failed updates.
- SM13: failed updates mean a number without a complete document; fix the cause, then repeat or delete with the owner.
- Check SM13 before deleting any lock in SM12.
Check your understanding · not graded
Lesson check
1. Which transaction lists current lock entries?
2. A user has a document number, but the document cannot be displayed. Where do you look?
3. What does MESSAGE_TYPE_X usually mean?
4. Why should SM13 be checked before deleting a lock?