Sometimes you need to hide some buttons or set a static value in a specific field of a transaction screen but find that this isn’t supported by authorizations. In such cases, you can create a new transaction by redesigning the screen without writing ABAP code. This solution in easy to implement and won’t generate effort in future upgrades.

How to Create SAP Transaction Variant

There are two main steps to create a transaction variant:
1. Create a new screen layout using Transaction SHD0 (Transaction and Screen
2. Create a new custom transaction code using Transaction SE93, which will use
the original ABAP code but with the new layout.

Suppose you want to lock the value in the Payt Terms field in the header data of Transaction ME22 (Change Purchase Order). This activity is not supported using the standard authorization concept.
Start Transaction SHD0, and specify the original Transaction Code (ME22) and a name for the new layer (Z001) in the Transaction Variant field. Click on the Create icon to use the transaction.


After you click create icon you will be redirected to ME22 Screen, input any purchase order number, and pop-up screen will appeared.


Every screen this pop-up will show asking you to customize the screen entries, if you don’t need to customize a screen you need to deactivate or uncheck COPY SETTINGS, then confirm pop-up with green check icon to go to next screen.

Click green check icon until you get your screen which you need to customize it.

On this sample you meet requirement that you need to disable Payt Terms field. so you need to tick COPY SETTINGS and on Payt Terms you need to tick Output Only and save your settings.



Then the final step to create customized transaction code using SE93, click on Create Button and enter a short text description, enter ZME22 for this example and choose Transaction with Variant ( variant transaction ) for Start Object.


click green tick, you will redirect to new screen, on this screen you must enter transaction text, SAP standard transaction and your transaction variant which you’ve created earlier, then click icon save to create your customized SAP transaction.


I hope this simple article useful for your and please share to your friend or colleague and don’t forget to give your comments or feedback.

Incoming search terms: