Contents What is a Transaction Variant? ................................................................................
Contents What is a Transaction Variant? ................................................................................................................. 2 Creating Transaction Variants ................................................................................................................... 2 Creating transaction Code for that variant ............................................................................................... 4 Transaction Variants with GuiXT ............................................................................................................... 5 Pre-requisites ........................................................................................................................................ 6 Procedure .............................................................................................................................................. 6 Sample GuiXT codes: ............................................................................................................................. 7
What is a Transaction Variant? If you want to hide unwanted screens and fields in any standard SAP program without changing it, the use of the Transaction Variant is the best solution. Creating a Transaction Variant alters the layout of the screen.
Creating Transaction Variants Execute transaction SHD0 and create a Transaction Variant against the original transaction. Menu Path:
Eg: Transaction Code – Standard Transaction Code (MMF1) Transaction Variant – Variant Name that want to use.
Select Create New As soon as you press the create button, the original screen of the transaction will appear. After pressing any button/tab on the screen a menu variant screen will appear. Make sure to check any field or tab or any button you want to disappear from the menu functions. Press the exit and save button when you are sure that no further settings are required on sub-screens (if present). After pressing the exit and save button another menu variant screen will appear. Press the save button here and save as a local object or under any development class. If you want to hide all fields in a certain tab, click
Make necessary entries in the transaction record as follows. With Content – It’ll keep the content that you have entered when running the variant. Output only – Read only Invisible – Hidden Required - Mandatory If you want to transport it to any other system, Give a development package (eg: ZXXXX), So that you’ll get a Transport request created in the system. If not you can give $TMP as a local package, where you can’t transport it to any other system.
Creating transaction Code for that variant
When you are back on the Transaction Variant (SHD0) screen, press Shift+F6 or click the goto menu and press the create variant transaction button. Through this transaction SE93 will be executed. Enter the transaction name you want to create and any other required field and now press the save button. Tick – Cross Client.
Eg: Transaction Code – Z Transaction code that going to use in future Transaction – Standard Transaction code Transaction Variant – Variant that created.
At the point of saving get the transport request.
Now execute the transaction you create through create Transaction Variant and enjoy the results.
Transaction Variants with GuiXT While creating the transaction variant, you can use GuiXT scripts to modify the screen. Eg: I want to add an image to my transaction variant initial screen.
Pre-requisites
GuiXT should be activated.
Image should be saved as GIF, JPG & BMP. (GuiXT supports the images formats .gif, .jpg and .bmp)
Procedure
Go to SHD0
Give the Transaction Code, Transaction Variant & press button Process the Tx variant as usual. When you come to the screen that you want to add the image, click on
button in the screen
From this point onwards its GuiXT scripts. If you know GuiXT, you can do lot with this. Sample GuiXT codes:
1. Box (0,0) (5,64) "Welcome to FG Creation program" – To add a message to a screen 2. Image (0.6,1) (4.8,28) "c:\ias.gif" – To add a image to a screen 3. DEL F[Industry sector] – To hide a field from a screen Go to http://www.synactive.com/ to get more information on GuiXT.
You’ll get a screen like this.
To add a image form the local folder click on
Click on Browse for your picture.
button.
option
You’ll get a code like this.
Image ( , ) ( , ) "C:\DOCUMENTS AND SETTINGS\ALL USERS\DOCUMENTS\MY PICTURES\SAMPLE PICTURES\BLUE HILLS123.GIF"
Give the screen coordinates in those 2 brackets.
Eg: Image (0.6,40) (10,90) "C:\DOCUMENTS AND SETTINGS\ALL USERS\DOCUMENTS\MY PICTURES\SAMPLE PICTURES\Water lilies123.GIF"
Press on
button
Now you can see
Use to end. Select YES for the following popup screen
Save you Variant Run the Z transaction Code & enjoy results
ticked in the Screen Entries window.
Author: Anupa Wijesinghe E-Mail:
[email protected] /
[email protected] Website: www.learnsaptips.com View my profile in LinkedIn Follow me on Twitter
Disclaimer This article is done based on my research and readings, unless otherwise stated. The views expressed are my own and not of anyone else. Author accepts no liability for the content of the articles in this website or for the consequences of any actions taken on the basis of the information provided. Using this information is at the users own discretion and responsibility.