Now accepting guest editorial from SAP, Oracle, Workday and ServiceNow practitioners.Pitch a guide
The Sign-Off Table

Lesson 3 of 5

Dumps, locks and updates

10 min

Listen to this lesson

0:00 / 8:02

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 meansFirst move
TIME_OUTA dialog step exceeded the time limitFind the slow part (trace) or run the program in background
DBSQL_SQL_ERRORThe database returned an error to an SQL statementRead the database error text; check SM21 and database status
MESSAGE_TYPE_XThe program stopped deliberately on an inconsistencyRead the message ID and number; search SAP Notes; check the data
Errors in custom (Y/Z) codeA defect or unexpected data in custom developmentRoute to development with the dump and the data used
Some common runtime errors. Always confirm with the dump's own analysis text.
The Sign-Off Table · thesignofftable.com/academy/sap-bas-202

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.

Who owns a lock over time: the dialog step sets it, the commit hands it to the update task, and it is released only when the update completes.
The Sign-Off Table · thesignofftable.com/academy/sap-bas-202
  1. 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
  2. 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
  3. 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
Deciding whether a stale lock can be deleted. Deleting a lock that protects a pending update risks inconsistent data.
The Sign-Off Table · thesignofftable.com/academy/sap-bas-202

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.

An update request's states in SM13: a failed one is repeated after the fix, or deleted only once the process owner agrees how to recreate the data.
The Sign-Off Table · thesignofftable.com/academy/sap-bas-202
  1. User savesAna posts a supplier invoice in CMQ and sees document number 5100000123
  2. Update failsThe update terminates with a dump in a custom field check
  3. SymptomThe invoice cannot be displayed; a lock on the document lingers
  4. DiagnoseSM13 shows the failed request; its dump points to the custom check in the update task
  5. ResolveKenji fixes the check; Sam repeats the update request; the invoice appears and the lock is released
A failed update and its traces in SM13, ST22 and SM12.
The Sign-Off Table · thesignofftable.com/academy/sap-bas-202

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?

Key points
  • 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. 1. Which transaction lists current lock entries?

  2. 2. A user has a document number, but the document cannot be displayed. Where do you look?

  3. 3. What does MESSAGE_TYPE_X usually mean?

  4. 4. Why should SM13 be checked before deleting a lock?