Sunteți pe pagina 1din 11

Creation and Use of Variant

Transaction

Applies to:
SAP R3 4.6C, 4.6D, 4.7EE, ECC. For more information, visit the Security homepage.

Summary
How to use screen variant, Transaction variant and then Variant Transaction to optimize Security of the SAP
systems throughout the Landscape.

Author: Dipanjan Sanpui


Company: IBM India Pvt. Ltd.
Created on: 01 June 2009

Author Bio
Dipanjan Sanpui is working in IBM India from 2007 as a SAP Security Consultant.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


© 2009 SAP AG 1
Creation and Use of Variant Transaction

Table of Contents
Objective ............................................................................................................................................................. 3 
Scope .............................................................................................................................................................. 3 
Technical Details ................................................................................................................................................ 3 
A. Creation of Transaction Variant .................................................................................................................. 3 
B. Creation of Variant Transaction by Using Transaction Variant .................................................................. 8 
Related Content ................................................................................................................................................ 10 
Disclaimer and Liability Notice .......................................................................................................................... 11 

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


© 2009 SAP AG 2
Creation and Use of Variant Transaction

Objective
SAP Transaction comes with some default settings. Settings is a very in generic term and can be idealize as
“Mandatory Fields”, “Optional fields”, “Selection options” etc. For better implementation of Security and
control it becomes necessary to customize such “Settings” and provide users access to those modified,
Administrator defined views of TCodes. It also helps to reduce the scope of changing SAP Default programs.

Scope
Changes to SAP Defined fields is possible by using the concept of Transaction variant and then create
Variant Transaction by using that Transaction variant. For e.g. if you don’t want the users to see the “Create”
button in the TCode SE16 and provide them a modified screen for this, then the concept of Transaction
Variant is very important. A new Variant Transaction (say ZE16) can be defined and provided to the users.
Thus we managed the first possibility of misusing ACTVT = 01 for all those set of users.

Technical Details
A. Creation of Transaction Variant
• TCode in use to create Variant Transaction is SHD0.
• Give the TCode (for e.g. SE16) and Go to tabs “Standard variants” and then to “Variant Group”

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


© 2009 SAP AG 3
Creation and Use of Variant Transaction

• Give a group name and press enter. System will automatically suggest the Transaction Variant.

• Click on Create. A window will come to get the Text description from Administrator.

• After defining the Text description, save it.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


© 2009 SAP AG 4
Creation and Use of Variant Transaction

• Click on the Create (F5) button to create the screen variant for the Transaction.

• Now system will go to that particular TCode where you want to capture the screen elements and
assign them to screen variant.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


© 2009 SAP AG 5
Creation and Use of Variant Transaction

• Give the Table name and press enter. It will show the following window where you need to provide
the short text for the Screen Variant. Click on Enter to get the

• Click on “Menu Function” to maintain the Menu entries of the Variant.

• Select the Object name “ANLE: Create Entries” and click on the button “Deactivate”. Now the
Create button of SE16 will be deactivated. Deactivated rows will be highlighted in “Yellow” colour.
For more information, check the colour legends.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


© 2009 SAP AG 6
Creation and Use of Variant Transaction

• You don’t need to select each row containing ANLE. Deactivation is carried out for all entries where
ANLE is found. Please check below picture.

• Click on “Exit and Save” to leave the window. Following screen will appear. Give a short text.

• Please ensure to mark the Deactivate option for Transaction also.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


© 2009 SAP AG 7
Creation and Use of Variant Transaction

• Save the Variant. Since it is enhancement of Repository, you need to include this new into a
Package. If you have already created your own package (Y/Z namespace), then use that. Thus we
will be able to ignore using SAP default packages. Include within a Change Request.

• For successful completion of the task, you will get the confirmation as usual.

B. Creation of Variant Transaction by Using Transaction Variant


Now we need to create a “Variant Transaction” for this Transaction Variant just created.
• Go to TCode SE93 and enter the Variant Transaction Code to be created (for e.g. ZE16) and press
Create button.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


© 2009 SAP AG 8
Creation and Use of Variant Transaction

• Provide relevant Short Text description as the Transaction Attribute. Also select the option
“Transaction with Variant (Variant Transaction)”. Click on continue (or press Enter).

• In the next screen, the Mandatory Fields are “Transaction” (to be used to inherit the options if the
new TCode) and “Transaction variant” that we created in the previous section. Try not to use “Cross
Client” maintenance selection.

• Save and Exit.


• Now we can replace SE16 by ZE16 in all the roles and ensure more secure environment both from
the view of Security Administrator and Auditor.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


© 2009 SAP AG 9
Creation and Use of Variant Transaction

Related Content
SAP Note 330067
SAP Note 46625 SHD0: Different execution of variant transactions
SAP Note 574518 No authorization checks after variant transaction
SAP Note 558000 Skip first screen in variant transaction
SAP Note 161577 Variants in variant transaction maintenance
SAP Note 602304 SAP Menu: Authorization check for variant transaction
Standard Variant
SAP NetWeaver Application Server ABAP Security Guide
For more information, visit the Security homepage.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


© 2009 SAP AG 10
Creation and Use of Variant Transaction

Disclaimer and Liability Notice


This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not
supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.
SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document,
and anyone using these methods does so at his/her own risk.
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or
code sample, including any liability resulting from incompatibility between the content within this document and the materials and
services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this
document.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


© 2009 SAP AG 11

S-ar putea să vă placă și