SAP transaction codeObjectSM31ModuleABAP

SM31 — Direct table maintenance transaction

SM31 opens the generated table maintenance dialog for a specific table or view directly, without the customizing view selection screen that SM30 shows first. It requires that a maintenance dialog already exists for the object; if none does, SM31 offers to generate one on the spot, which is a developer action with transport consequences, not a simple data fix.

SM31 is the direct-entry sibling of SM30, used to maintain a table or view once its exact technical name is known, typically when SM30's selection logic is being bypassed or has failed. This page covers the entry sequence, what a save actually writes, and the diagnostic categories behind the most common SM31 failures: missing maintenance dialogs, authorization group mismatches, and logging gaps.

Reviewed by an ERPClimb SAP consultant on 15 Sept 2026· 1,145 words

Purpose

SM31 calls the same underlying generated maintenance dialog mechanism as SM30, but goes straight to the table or view once its name is typed in, skipping the customizing overview screen SM30 presents. The structural fact that explains most confusion: SM31 does not create the maintenance logic itself, it only invokes it. If the table or view has never had a table maintenance generator run against it, SM31 will either refuse entry or prompt to generate a maintenance dialog on the fly, which is a development action, not a configuration one, and it can pull the table into a transport request unexpectedly. SM31 also does not enforce the same view-based field validation that a properly built maintenance view does, since it can be pointed straight at a base table.

When it is used

Consultants reach for SM31 when SM30 throws an error such as the table not being found in the view catalog, when the object needed is a plain table rather than a registered customizing view, or when a quick technical fix is needed on a table that has no IMG node or Fiori app exposing it. It also gets used during data corrections in test or development systems where the exact table name is already known from debugging, and there is no interest in navigating SM30's selection dialog. For business users and standard customizing work, SM30 or the relevant IMG activity or Fiori app is the correct entry point; SM31 is a technical shortcut, not a replacement for those.

How to use it in practice

  • Call SM31 and enter the exact table or view name.
  • Choose the maintenance function (display or change).
  • If no maintenance dialog exists, the system offers to generate one; this requires a developer key and creates a function group, so confirm this is intended before proceeding.
  • If prompted for authorization, check whether the S_TABU_DIS authorization group and S_TABU_NAM object cover the table.
  • Add, change, or delete entries directly in the resulting screen.
  • Save; if the table is client-independent or cross-client, a transport request prompt appears and the change is captured there.

Key data objects

  • DD02L - table definition and delivery class, determines whether the table can even be maintained this way.
  • The target customizing table itself - where the actual row-level data lands on save.
  • DBTABLOG - table logging entries if change logging is switched on for that table's technical settings.
  • CDHDR and CDPOS - change document header and detail records, only populated if the table has change documents configured rather than raw table logging.
  • TSTC - not written by SM31 itself, but relevant when checking whether the table maintenance transaction was ever formally registered.

How to prove it in the data

Use SE16 on DBTABLOG, filter by table name and the date and time window of the suspected change, to see who changed what and when if table logging is active for that table. If the table instead uses formal change documents, filter CDHDR by object class and date, then join to CDPOS on the change document number to see field-level old and new values. If neither logging mechanism is active, there is no audit trail for the SM31 change, and the only proof available is comparing the current table content against a transport or backup.

ECC vs S/4HANA

SM31 continues to exist on S/4HANA as the same direct-entry technical transaction; nothing about its mechanics changed. SM30 remains the recommended entry point for anything with a proper view or IMG activity behind it. There is no dedicated Fiori app for SM31 itself, since it is generic technical tooling rather than a business process; some customizing content has migrated to self-service configuration apps, but the underlying table maintenance generator mechanism SM31 relies on is unchanged.

Common pitfalls and how to diagnose them

  • Missing maintenance dialog: SM31 offers to generate one automatically. This silently creates a function group and screen objects and can pull them into a transport request. Check with the developer or Basis team whether this generation was intentional before letting it proceed in anything other than a sandbox.
  • Authorization group mismatch: users with a table maintenance role still get an authorization error because the table's S_TABU_DIS group differs from what the role grants, or the table uses S_TABU_NAM instead of a group. Check the table's authorization group in its technical settings against the user's role first, not the role assignment itself.
  • Bypassing view-level validation: pointing SM31 straight at a base table skips checks that a proper maintenance view would enforce across related tables, producing internally inconsistent customizing that only surfaces later as a runtime error in the business process. If the table is part of a view cluster, use SM30 against the cluster instead.
  • Silent transport capture: saving a change to a cross-client table triggers a transport request prompt that is easy to click through without noticing, sending a technical fix to systems downstream that were never meant to receive it.
  • No change history: if table logging or change documents were never activated for the table, there is no way to answer 'who changed this and when' after the fact. This is discovered only when someone goes looking, which is too late; check logging status before relying on SM31 for any change that might need to be audited.
  • Locked entries: concurrent maintenance sessions on the same table produce an enqueue lock; check SM12 for a stale lock before assuming the table itself is corrupted.

Whose problem this is

Ownership depends on who owns the table: functional consultants own customizing content, ABAP developers own the maintenance dialog generation and any custom logic behind it, and Basis owns transport routing and authorization object assignment. A clean handover names the exact table, the entries changed, whether a transport request was involved, and whether the maintenance dialog was generated fresh or already existed.

Related SAP objects

Reviewed pages this object connects to in the ERPClimb knowledge graph.

Source: ERPClimb — https://erpclimb.com/sap-tcodes/sm31ERPClimb is an independent platform and is not affiliated with SAP SE. Reference pages are written and reviewed by SAP consultants for learning and troubleshooting.