Skip to content
Cette page existe aussi en français. Voir en français
SAP Tutorials

SAP SHD0: transaction and screen variants

SHD0 (Transaction and Screen Variants) lets you customize standard transactions in SAP without development: hide fields, pre-fill values, simplify screens for specific user profiles. This guide shows how to create a transaction variant step by step, with a concrete case (hiding the “Movement allowed” field in MB21) and the pitfalls to avoid.

Out of 100 business requests received by an SAP consultant, roughly a third does not require a single line of ABAP. Hide a useless field. Pre-fill another. Make a third one mandatory. For these cases, SHD0 does the job. And many consultants do not know it exists.

This transaction is used to create transaction variants and screen variants: customized versions of a standard SAP transaction, without specific development. The SAP code stays intact, the screen adapts to the business. A concrete case is shown below, on an industrial automotive project, with screenshots at each step.

30 min First working screen variant
0 ABAP Not a single line of code to write
8 years Of industrial S/4HANA projects led by the KUT founders

Why SHD0 rather than a custom ABAP development?

Many projects start with a precise business request (for example, “we want to hide this checkbox in MB21“) and end up going through the front door of Z development. Three months later, the ABAP consultant delivers a ZMB21 transaction that does the same as the standard one, plus a hidden checkbox. Cost: 8 days of development. SHD0 solves the need in 30 minutes, without a line of code, and survives SAP updates.

SHD0 (transaction variant)

  • 0 line of ABAP
  • 30 min of configuration
  • Survives SAP upgrades
  • Maintainable by any functional consultant
  • Average cost: 0.5 person-day

Z development (Z-transaction)

  • 200 to 500 lines of ABAP
  • 5 to 10 days of dev + testing
  • Risk of breakage at every version upgrade
  • Maintenance by an ABAP consultant only
  • Average cost: 8 to 15 person-days

Concrete case: MB21 on an automotive project

On an S/4HANA project at an automotive supplier, the maintenance team used the MB21 transaction to reserve material. The “Movement Allowed” checkbox authorizes immediate goods issues as soon as the reservation is made. On the process side, this is risky: an operator can issue the material before validation by the supervisor, which creates a systematic stock discrepancy. We saw it several times during go-live.

Standard SAP selection screen of the MB21 transaction
MB21: standard SAP entry screen
Full MB21 reservation screen
MB21: the full screen with all the fields
Movement Allowed checkbox visible by default
The “Movement Allowed” checkbox, accessible by default to all users

The business request was precise: “Hide this checkbox from the maintenance operators, leave it visible only to the supervisor.” In standard SAP, impossible. With SHD0, 30 minutes of configuration and it is done.

SHD0 configuration step by step

Open the SHD0 transaction. The workflow fits in 5 steps, with the exact SAP buttons to click.

  1. 1
    Choose the transaction to modify

    Enter the transaction code (MB21 in our case) in the “Transaction Code” field at the top of the SHD0 screen.

  2. 2
    Create the Variant Group

    Under the “Standard Variants / Variant Groups” tab, enter a Group Name. SAP concatenates it with the transaction code to form the variant name (for example ZMB21_NO_MVT). Click “Create”.

  3. 3
    Create the Transaction Variant

    Go to the “Transaction Variants” tab. Click the create button. SAP launches the standard transaction in “recording” mode.

  4. 4
    Configure the Screen Variant

    Enter the desired default values on the screen that opens. Confirm with Enter. SAP displays a summary and asks you to name the screen variant. On the next screen, tick “Hide” on the fields to mask (for example “Movement Allowed”).

  5. 5
    Save into a transport request

    Click “Exit and Save”. SAP displays a final summary then asks for a transport request. Reuse the project TR or create a new one. The configuration is now versioned and ready for transport to QA then prod.

SHD0 choosing the transaction code
Step 1: entering the MB21 transaction code
SHD0 creating the Group Name
Step 2: creating the Variant Group under “Standard Variants / Variant Groups”
SHD0 creating the transaction variant
Step 3: creating the transaction variant via the dedicated tab
SHD0 entering the MB21 default values
Step 4: entering the default values on the MB21 screen
SHD0 naming the screen variant
Step 4 (continued): naming the screen variant
SHD0 field properties with the Hide checkbox
Step 4 (end): for each field: Hide / Output only / Required / Invisible
SHD0 summary screen of the actions performed
Step 5: summary screen before saving
SHD0 entering the transport request
Step 5 (end): entering the project transport request

Assigning screen variants to users

The screen variant now exists in the system, but it is not yet applied automatically to users. SAP lets you assign a screen variant to specific users (individually named or via groups). This is the mechanism that makes SHD0 more granular than an SAP role system.

Go back to “Standard Variants / Variant Groups”, under the “User Assignment” tab. Enter the SAP username in the “User” field. Click “Assign”. Then click “Set Proposal”. This is the critical step: without it, the screen variant is not applied automatically the next time the user logs in.

SHD0 assigning the screen variant to a user
“User Assignment” tab: enter the username, click “Assign” then “Set Proposal”

Expected result

The assigned user launches MB21 normally, with their usual transaction code, without any special procedure. The “Movement Allowed” checkbox is invisible. No possible confusion. The supervisor, on the other hand, does not have the screen variant assigned. They see the standard checkbox and can authorize the validated goods issues.

MB21 with the Movement Allowed checkbox hidden by the screen variant
Result: MB21 as seen by the maintenance operator, the checkbox has disappeared

In 8 years of S/4HANA projects, I have never seen a standard SAP feature so underused. SHD0 easily saves 50 days of Z development per large-scale project.

Michael Antoine, founder of Key User Training, SAP EWM/Supply Chain consultant

FAQ: SHD0 transactions and screen variants

Does SHD0 work on S/4HANA?

Yes, SHD0 is fully supported on S/4HANA (all versions, on-premise and Cloud Private Edition). The transaction has not changed since ECC 6.0. It is a durable skill for any SAP consultant.

Can you make a field mandatory with SHD0?

Yes. When configuring the screen variant properties (step 4), tick “Required” on the relevant field. SAP will refuse to validate the transaction until the user enters a value in that field.

What happens if the user launches the transaction without their assigned screen variant?

If “Set Proposal” was done correctly during the assignment, the screen variant applies automatically each time the transaction is launched. Without “Set Proposal”, the user sees the standard transaction and has to select the screen variant manually from the menu, which defeats the purpose of SHD0.

SHD0 vs SE93 or SE51: what is the difference?

SE93 is used to create a new transaction (with a new Z* code). SE51 is the ABAP editor for screens (dynpros), which requires development skills. SHD0 creates neither a transaction nor a screen. It configures variants of an existing standard transaction, without touching the code.

Do screen variants survive an SAP version upgrade?

Yes in the vast majority of cases. If SAP modifies a standard screen (adding or removing a field), the screen variant keeps working for the fields that are still present. Removed fields are silently ignored. A post-upgrade check is still recommended on critical transactions.

How do you delete or modify an existing screen variant?

Go back into SHD0, enter the transaction code and the variant name. Deletion and modification are done via the dedicated buttons at the top of the screen. Any modification generates a transport request to propagate to the higher environments.

Going further with SHD0

SHD0 is the tool for pure cosmetic customization in SAP: it touches neither the application code nor the authorizations. To go further:

  • If you need to change the business logic (calculation, validation, conditional default), look at transaction variants via BAdI, field exits or customization via classification.
  • To assign a variant to a user role, the combination is done via PFCG (see our guide on SAP roles and authorizations) plus user parameters (transaction SU3 or OOSP).
  • SHD0 also works in S/4HANA Fiori, but for transactional Fiori apps, look instead at the UI adaptations via the Fiori RTA (Run-Time Adaptation).

SHD0 is one of the standard SAP transactions that a functional consultant should master from their very first projects. There is no need to go through ABAP to adapt a transaction to the business, and that is exactly what project managers are looking for.

Share

Keep reading

SAP Tutorials

SAP Background Jobs: SM36, SM37 and the Job Lifecycle Explained

The sales report has to be ready every morning before the teams arrive. Transfer orders need to be processed every five minutes, weekends included. Nobody runs these programs by hand:...

Michael Antoine Michael A. 8 min read
SAP Tutorials

ABAP Debugger Tutorial: Debug an SAP Transaction with /h, Breakpoints and Watchpoints

A dump just landed on your transaction, or a field shows an amount nobody can explain. How do you see what the program is actually doing, without being a developer?...

Michael Antoine Michael A. 10 min read
SAP Tutorials

SAP Batch Input: SM35 guide and 7 production pitfalls

On recent S/4HANA projects, you still regularly hear that batch input "is a thing of the past, we only use LTMC now". The claim is convenient, it makes life easier...

Michael Antoine Michael A. 11 min read
SAP Tutorials

SAP SHDB Transaction Recorder: Session vs Call Transaction

You hear it everywhere: SHDB belongs to the past, replaced by BAPIs, the Migration Cockpit and OData services. That is a convenient simplification for project managers who want to lock...

Pierre Balbinot Pierre B. 10 min read