Last reviewed · Rinexis SAP security team
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.
- It checks that the code exists in table
TSTC. - It checks that the code is not locked (
SM01, orSM01_DEVandSM01_CUSin newer releases). - It checks
S_TCODEwithTCDequal to the code. - 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
| Type | What it runs | Security notes |
|---|---|---|
| Dialog transaction | A module pool program and initial screen | Standard pattern for SAP application transactions |
| Report transaction | An executable program, optionally with a selection variant | Any report can be given a tcode; the report's own checks still apply |
| Object-oriented transaction | A class method | Same start check; method code holds the real checks |
| Variant transaction | A dialog transaction with a transaction variant (screen and field defaults) | Restricts the screens, not the authorization of the underlying code |
| Parameter transaction | Another dialog transaction with preset screen field values, often skipping the first screen | Common for table maintenance via SM30, and a common wrapper |
| Area menu | A menu of other transactions | No 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
ZME23callingME23Nwith a document type preset. - A parameter transaction on
SM30that opens one specific maintenance view. - A report transaction on a custom program that executes
CALL TRANSACTIONon a standard code, orSUBMITs 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_TCODEis checked for the wrapper code. The called transaction does not need its ownS_TCODEentry, which is exactly whySM30parameter transactions are used to give access to one table. CALL TRANSACTION ... WITH AUTHORITY-CHECK:S_TCODEis always checked for the called code.- Plain
CALL TRANSACTION: the check depends on the caller/called pair maintained inSE97(tableTCDCOUPLES) and on profile parameterauth/check/calltransaction. SUBMITof a report: noS_TCODEcheck at all; only the report's own checks and anyS_PROGRAMauthorization 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
- Inventory custom codes from
TSTCand classify each by type, joiningTSTCPto see what each parameter or variant transaction calls. - Scan custom programs behind report and dialog transactions for
CALL TRANSACTIONandSUBMITof standard objects. - 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.
- Maintain SU24 for each custom tcode so PFCG proposes the objects of the underlying transaction rather than relying on manual authorizations.
- Replace
Z*and other wildcardS_TCODEvalues 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.
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.