Skip to content
Learn · SAP access risk

S_TCODE and wrapper transactions in SAP

How the S_TCODE start check works, what SE93 transaction types do, and why custom wrapper transactions hide access from SoD rules.

Last reviewed · Rinexis SAP security team

Definition

S_TCODE is the SAP authorization object checked when a user starts a transaction code; its single field, TCD, lists the transactions a role may start. A wrapper transaction is a custom transaction, usually a Z code, that runs a standard transaction or its program underneath, so the user gets standard functionality through a code that rulesets often do not list.

The transaction start check

When a user enters a transaction code, the kernel runs a fixed sequence before the program starts.

  1. It checks that the code exists in table TSTC.
  2. It checks that the code is not locked (SM01, or SM01_DEV and SM01_CUS in newer releases).
  3. It checks S_TCODE with TCD equal to the code.
  4. If SE93 assigns an extra authorization object to the transaction (stored in TSTCA), it checks that object with the values defined there.

Passing S_TCODE only opens the door. What the user can actually read or change is decided by the AUTHORITY-CHECK statements inside the program, against objects such as M_BEST_EKO or F_LFA1_BUK. That split between start check and in-program checks is the root of the wrapper problem.

SE93 transaction types

Transaction types created in SE93 and what each one runs.
TypeWhat it runsSecurity notes
Dialog transactionA module pool program and initial screenStandard pattern for SAP application transactions
Report transactionAn executable program, optionally with a selection variantAny report can be given a tcode; the report's own checks still apply
Object-oriented transactionA class methodSame start check; method code holds the real checks
Variant transactionA dialog transaction with a transaction variant (screen and field defaults)Restricts the screens, not the authorization of the underlying code
Parameter transactionAnother dialog transaction with preset screen field values, often skipping the first screenCommon for table maintenance via SM30, and a common wrapper
Area menuA menu of other transactionsNo program of its own

The definitions live in a small set of tables: TSTC (code, program, screen), TSTCT (texts), TSTCA (start-check object values) and TSTCP (the parameter string for parameter and variant transactions, which names the called transaction).

What a wrapper transaction is

A wrapper is any custom transaction whose real work is done by a standard transaction or program. Typical forms:

  • A parameter transaction, for example ZME23 calling ME23N with a document type preset.
  • A parameter transaction on SM30 that opens one specific maintenance view.
  • A report transaction on a custom program that executes CALL TRANSACTION on a standard code, or SUBMITs a standard report.
  • A Z copy of a standard program, attached to a new tcode, with the original authority checks altered or removed.

Wrappers are usually created for good reasons, such as presetting values or simplifying a screen. The risk is that the user can now do standard work without holding the standard transaction code.

When S_TCODE is checked for the called transaction

Whether the user also needs S_TCODE for the transaction underneath depends on how it is called:

  • Parameter and variant transactions: S_TCODE is checked for the wrapper code. The called transaction does not need its own S_TCODE entry, which is exactly why SM30 parameter transactions are used to give access to one table.
  • CALL TRANSACTION ... WITH AUTHORITY-CHECK: S_TCODE is always checked for the called code.
  • Plain CALL TRANSACTION: the check depends on the caller/called pair maintained in SE97 (table TCDCOUPLES) and on profile parameter auth/check/calltransaction.
  • SUBMIT of a report: no S_TCODE check at all; only the report's own checks and any S_PROGRAM authorization group apply.

In every case the in-program checks of the called code still run. A wrapper does not bypass M_BEST_EKO inside ME23N; it bypasses the need to hold ME23N in S_TCODE.

Why SoD rulesets miss wrappers

An SoD ruleset, including SAP GRC Access Control's, defines functions as lists of actions (transaction codes) with permissions attached to each action. Permissions are evaluated only for the actions listed. If ZME23 is not listed as an action, a user who holds it is never flagged, even though they hold the same in-program authorizations a rule would look for under ME23N.

The same gap affects critical access rules. An SM30 parameter transaction on a sensitive view, or a Z report that calls SU01, can grant critical access without the critical code ever appearing in a role.

Wildcards make it worse. S_TCODE with TCD = Z* grants every current and future custom transaction, wrappers included.

Finding and fixing wrappers

  1. Inventory custom codes from TSTC and classify each by type, joining TSTCP to see what each parameter or variant transaction calls.
  2. Scan custom programs behind report and dialog transactions for CALL TRANSACTION and SUBMIT of standard objects.
  3. For each wrapper of a ruleset-relevant transaction, add it as an action to the same functions as the transaction it calls, with matching permissions.
  4. Maintain SU24 for each custom tcode so PFCG proposes the objects of the underlying transaction rather than relying on manual authorizations.
  5. Replace Z* and other wildcard S_TCODE values in PFCG roles with explicit codes.

Frequently asked questions

What is S_TCODE in SAP?

S_TCODE is the authorization object checked when a user starts a transaction. Its only field, TCD, holds the transaction codes the user may start. It controls entry to a transaction, not what the user can do inside it, which is governed by other authorization objects checked in the program.

What is a parameter transaction in SAP?

A parameter transaction is created in SE93 and calls another dialog transaction with predefined screen field values, often skipping the initial screen. A common example is a custom code that calls SM30 for one specific table view, so users can maintain that table without holding SM30 itself.

What is a wrapper transaction in SAP?

A wrapper transaction is a custom transaction code that runs a standard transaction or program underneath, through a parameter transaction, CALL TRANSACTION or SUBMIT. Users get standard functionality without holding the standard code, so rulesets that only list standard codes miss the access.

Does CALL TRANSACTION check S_TCODE?

With the WITH AUTHORITY-CHECK addition it always checks S_TCODE for the called transaction. Without it, the check depends on the entries maintained in SE97 for the calling and called transaction pair and on system configuration. SUBMIT of a report never checks S_TCODE.

Which table stores SAP transaction codes?

Table TSTC stores each transaction code with its program and screen. TSTCT holds the texts, TSTCA the authorization object values for the start check, and TSTCP the parameters of parameter and variant transactions, including the transaction they call.

How Rinexis handles this

Tcodex classifies every transaction by SE93 type and what it runs, flags custom wrapper transactions such as ZME23 calling ME23N that bypass GRC transaction-level checks, and shows how many production roles grant each wrapper.

Coverage Scanner scores how much of your custom Z transactions the SoD ruleset covers, weighted by usage and risk, and proposes ruleset additions for the gaps. Sodly then analyses users and roles against the extended ruleset.

See your own SAP access risk, not a textbook example

Talk to an SAP security specialist about your roles, ruleset and audit timeline, or explore the platform modules that analyse and fix access risk.