Screen Variant in Sap SD
Screen Variant in Sap SD
Select the required Industry sector and Material Type and press ENTER. Following
popup would appear:
Now enter the transaction variant name and click on Change button as shown below:
Enter the name of the screen variant created earlier or use F4 help to select the
value:
Enter the values as shown above. Click on Enter. The following SE93 transaction
would appear:
The name of the Transaction Variant is automatically proposed. Save your entries.
Now go to Transaction ZMM01 and check your transaction variant:
You can observe that the field Industry sector and Material type default to the value
we have given earlier and are output enabled only.
This i have copied from my Documents in which i have screen shots for the images
also...Unfortunately it did not copied above
---------------------------------------------------------------------------------------------------------------
Using transaction variant, you can tailor screens to meet your required business
process, and it can be used to accomplish security task, not directly supported by
SAPu2019s security concepts.
--------------------------------------------------------------------------------------------------------------
Screen variant
You can have many screens for one Trxn code like MM01, there will be many view &
each view is a screen .
So that by SHD0 trxn you can define screen variant by choosing the Screen for the
Trxn code.
Transaction variant
Here you can define variant for Trxn like ME2N , MIRO etc..
---------------------------------------------------------------------------------------------------------------
SAP best practices: Creating Transaction Variants to hide unwanted screens and fields
in SAP programs
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. This tip offers two ways to
perform this task.
Case one for creating Transaction Variants
Step 1:
Execute transaction SHD0 and create a Transaction Variant against the original
transaction.
Step 2:
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.
Step 3:
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.
Step 4:
Now execute the transaction you create through create Transaction Variant and
enjoy the results.
Step 1:
Create a dialogue transaction through SE93 and enter the program name and screen
number of the original transaction you want to make a variant on (e.g., PFCG). Press
the save button and check whether the replica transaction (PFCG) has been created
successfully by executing it on a new session.
Step 2:
Execute transaction SHD0 to create a Transaction Variant. Specify the transaction
name (replica of PFCG) which you have just created and create a Transaction Variant
against the replica transaction.
Step 3:
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.
Step 4:
When you are back on the main screen of the SHDO (Transaction Variant) click the
edit option on the menu tab and activate Standard Variant. Through this a Standard
Variant will be assigned to the transaction specified (replica transaction).
Note: Make sure you activate the Standard Variant against a replica transaction and
not on the original one.
--------------------------------------------------------------------------------------------------------------
When you want to execute a transaction in SAP, then there are certain fields present
in the screen that comes after running the transaction. The sample data that you fill
in the screen fields can be saved for future use. The saved data on a screen is called
variant. ... The saved data on a screen is called variant.
Whenever you start a program in which selection screens are defined, the system
displays a set of input fields for database-specific and program-specific selections. To
select a certain set of data, you enter an appropriate range of values.
If you often run the same program with the same set of selections (for example, to
create a monthly statistical report), you can save the values in a selection set called a
variant.
Variants are the only method for passing values to a report program in a background
job. Therefore, when you run a program in the background, you must use a variant.
I would like to share a document with you all which is related to my recent work using SHD0.
This is a very familiar Tcode used by both Technical and Functional Consultants but if its used
correctly and appropriately am sure it can avoid many Enhancement and Modification
developments.
I was not able to find any related documents about this here when I needed that’s why I would
like to take this opportunity to provide an informative content to our own SCN so that its helpful
for all others.
Lets take a very general example of CO11N ( I was to work over this only ).
This tcode is used to confirm Production Order , Production Order indeed contains all BOM
related materials required for a Particular Production. Now what happens sometimes end users
use to delete or alter these BOM materials and in our company the requirement was to stop this
at user ID level.
Usually while using SHD0 everyone use to create a ZTcode for using it , but we can do it without
creating a Ztcode which I am going to explain.
Steps :
1. Tcode SHD0
Give the Transaction code for which you want to Create Transaction and Screen Variants
eg . CO11N here
And Select the Standard Variants tab and Further Select Variant Groups tab.
You can see that within the Press of Enter System automatically generates the Transaction
Variant ZSIJINCO11N ( System Concatenates Group Name + Transaction Code ).
Transaction Variant can contain many Screen Variants inside it.
With the Press of Create Button (F5) it will start simulating CO11N and with each
processing , system will propose for Screen Variants to be created for each screen
elements such as Buttons , Tool Bars , Menu functions , Sub Screens with fields.
You can see the above proposal gives whole description about that Screen element like
Program name with screen number , if you have any confusion you can simulate the same
using SE51 and confirm.
Here comes the ToolBar and you can see that I have set DELETE option to Output only.
And Here I have removed the change in Quantity option.
Now press Exit and Save ( when you get your things done ) option .
2. Assigning Users
Now with the Variant Group created initially ( ZSIJIN in this case ) we can collect the
Users for whom the Above Transaction and Screen Variant need to be applied.
Here we are now going to assign Users. And for this Users Transaction variant will come
into action.
Summary
Transaction variant is a very efficient method to create some tailored version of
standard SAP transaction without any actual modification. This article explains
in a stepwise manner how to do that. The transaction chosen is CO01 - Create
Production order.
Introduction
Transaction variants are created to personalize any standard SAP transaction.
A transaction variant simplifies the usage of a transaction by tailoring some of
the features as per the business need. It can be used to hide fields, menu
functions, screens, to supply individual fields with default values or to change
the ready for input status of one or more fields.
This document describes the step by step process to create a transaction
variant for standard SAP transaction CO01 - create production order. The
transaction variant should have the following restriction:
Order type is not visible in the initial screen.
Menu path Order -> Create from Planned Order is deactivated
There are two steps, first create the transaction variant and then attach the
transaction variant to a transaction.
5. The menu item will be deactivated (it will be highlighted in yellow). Click "Enter" to come back to the original
screen entries pop-up.
6. Click "Exit and Save" button to save the Transaction variant. System will
pop-up for a transport request. We can save it as a local transport or save it in
some transport request.
7. We can test the transaction variant by clicking the "Test" button in the initial
screen.
Assigning Transaction Variant to Transaction Code
After creating the transaction variant we need to assign it to a transaction. The
transaction can be used by the user to get the required tailored version of the
original transaction. The steps are as follows:
1. Go to transaction SE93. Enter the name of the transaction code (say
YCO01_TCODE ) to be created and click the button "Create".
2. In the next pop-up screen enter the short text, select the radio button variant
transaction and click enter.
3. In the next screen enter the transaction (CO01) and transaction variant
(YCO01) created in the previous step. Click the "save" button to save the
variant transaction.
The variant transaction (YCO01_TCODE) is now ready and it can be used to
get the tailored version of the original production order creation (CO01)
transaction code.Result:
Initial Screen: Field "Order type" is not visible
Menu: Menu item "Create from planned order" is disabled