SAP SHD0 : transaction and screen variants

SAP SHD0 : transaction and screen variants



SAP is a rich software in depth. It has a multitude of transactions, whether they are useful for daily business, for reporting, etc. However, the richness of companies in their work leads to so many possibilities, so many different flows that SAP has not been able to take into account all the existing needs. It happens that some transactions, in their conception, their design, or even the fields made available, do not correspond perfectly to the business needs. Of course, it is possible to create your own transactions and reports using ABAP code. But for simple cases, there is a practical solution that every consultant should know. Let's use the SAP SHD0 transaction together: transaction and screen variants.

SAP SHD0 : transaction to be modified

To fully understand the usefulness of this transaction, let's first choose a concrete example together. The operators of company A need equipment for some of their operations. To do so, they use the MB21 transaction to make reservations. Let's start by looking together at what this transaction looks like in standard :

SHD0 : transaction and screen variantsMB21 - selection screen
MB21 – selection screen
SHD0 : transaction and screen variantsMB21 - reservation screen
MB21 - reservation screen

In this transaction, it is possible to enter the desired materials. To be able to consume the material, the box "Movement Allowed" must be checked. If not, this may cause a problem in the flow.

SHD0 : transaction and screen variantsMB21 - Movement Allowed
MB21 – Movement Allowed

To avoid human error, it would be more practical to hide this box from the user, but this is not possible as standard. Let's go back to the SHD0 transaction.

SAP SHD0 : configuration

Here we are in the transaction configuration and the first thing to do is to choose the transaction to modify :

SHD0 : transaction and screen variantsSHD0 - Transaction Code
SHD0 – Transaction Code

In the first tab "Standard Variants" / "Variant Groups", indicate a Group Name that will define the Variant transaction. Its name will be the concatenation of the Group Name and the original transaction. Then press the "Create" button.

SHD0 : transaction and screen variantsSHD0 - Group Name
SHD0 – Group Name

Screen variant configuration

The rest is done in the "Transaction Variants" tab. It is necessary to create it via the dedicated button :

SHD0 : transaction and screen variantsSHD0 - Creation of the Transaction Variant
SHD0 - Creation of the Transaction Variant

The standard transaction is then launched, as we have seen previously. It is also possible, via this screen, to enter "default" values that will be entered in the variant.

SHD0 : transaction and screen variantsSHD0 - MB21 selection screen
SHD0 – MB21 selection screen

Once OK, press the Enter key and a screen will appear. This screen will allow you to create the variant screen, with the values previously entered, but also allows you to hide fields, or make them mandatory.

Enter a name for your screen variant and continue :

SHD0 : transaction and screen variantsSHD0 - Screen Variant selection screen
SHD0 – Screen Variant selection screen

The second screen of the standard transaction appears, allowing you to access these fields. Pressing the Enter key again will take you to the "screen variant" view of the second screen. In our example, we want to hide the checkbox for the good movement.

To do this, let's look for it in the list. Once found, check the "Hide" box so that it disappears. Now we have performed the desired operation, we just need to validate by pressing the "Exit and Save" button.

SHD0 : transaction and screen variantsSHD0 - Screen Variant for reservations
SHD0 - Screen Variant for reservations

A last window appears, summarizing all the actions performed. To finish, you just have to save.

SHD0 : transaction and screen variantsSHD0 - summary screen
SHD0 - summary screen

SAP then asks you for a transport request, allowing you to pass on your action to the different systems. You have to make one for each screen variant.

SHD0 : transaction and screen variantsSHD - transport request
SHD0 - transport request

Assigning screen variants to the user

Once finished, the last step is to allocate this to users. Indeed, the strength of this transaction is that it is possible to assign certain screen variants to specific users, allowing you to play with the standard transactions according to your needs, thus allowing total transparency for the user.

To do this, let's go back to the "Standard Variants / Variant Groups" section.

Enter the user of the person(s) to be assigned and click on the "Assign" button and "Set Proposal".

SHD0 : transaction and screen variantsSHD0 - User Assignment
SHD0 - User Assignment

That's it, this step closes the configuration. Let's check what it looks like when applied to my username.

Result

Direction of the standard MB21 transaction :

SHD0 : transaction and screen variantsMB21 - modified screen
MB21 - modified screen

The second screen is the one created via the SHD0 transaction. Indeed, the checkbox "mvt allow" is then invisible for me, avoiding any manipulation error.

Would you like unlimited access to our entire SAP training library? Test our training platform free of charge for a 7-day trial period.

3 Responses

  1. Gonzalo Rojas
    | Reply

    Hola! by assigning the variant only to one user, the original transacción remains available for the rest of users?

  2. Wave
    | Reply

    Is there a change logs for the screen variant? Example assignment of the user was removed. is there a change log for this?

Leave a Reply

Your email address will not be published. Required fields are marked *