How to Create Variant in SAP
Variant in SAP
Variants allow you to save your selection parameters in the input screen.
It minimizes the need to enter selection parameters each time you run a SAP report.
Note: Many a transactions may be protected due to security reasons by your administrator and save button may not be available
Step 1) Enter values.
Enter the values for selection criteria while you are in any SAP report.
Step 2) Click on save button.
Once all selection criteria are populated, Click the Save button.
Step 3) Entet Variant name.
Retrieve a Variant
Click the Get Variant Button
- Highlight the Variant you wish to use
- Click the Check Mark
The report will be populated with the Selection Criteria.
Delete a Variant
While in ANY SAP Report Select GoTO > Variants > Delete
- Highlight the Variant you want to delete
In the next SAP pop-up
- Select the “only in current client” radio button. (All Clients option will delete the variant across ALL clients)
- Click Continue
Variant is deleted.
- What is SAP Security? Complete Tutorial
- 26 SAP Security Interview Questions & Answers (2023)
- Top 17 Crystal Reports Interview Questions & Answers (2023)
- SAP Certification Quiz for Beginner: SAP Online Mock Test
- 9 Best SAP ERP Training and Online Courses (2023)
We will contact you in the near future.
Thanks for your interest, we will get back to you shortly
How to Create Variant in SAP
If you want tailor any SAP transaction or report, then you should know how to create variant in SAP.
Variants, which are used to customize SAP standard transactions in order to ensure the transaction fits the business needs of your company, are known as transaction variants. You can use variants of that nature to hide screens, menu functions, and fields among other things. On the other hand, variants that are used for saving selection field values in reports are known as report variants.
You should learn how to create a variant in SAP regardless of whether you want to utilize report variants or transaction variants. The best approach would be to learn how to do both so that you can use whichever you prefer when the necessity arises.
Before you start the process of creating a transaction variant, you need to define the selection screen for the program in which the variant will be created. All types except S are allowed for the program you intend to use.
You can use the transaction code SHD0 to create the transaction variant.
1. You need to access the Initial Screen of the ABAP Editor. You can then create the name of program in which the variant is to be created.
2. Once you select the program, select the Variants option, and then select Change.
3. The Variant Maintenance Initial Screen will then come up. You can then input the name of the variant that you intend to create. There is a convention for naming variants, which you must follow. First, you can use a name that has up to 14 alphanumeric characters. You should never use % as one of the characters though. The only time you can use & within the characters is when you want to create a system variant. This variant allows for automatic transportation of the program and the variant.
4. Once you input the variant name, you should select the Create option.
5. If the program in which you want to create a variant has only one selection screen, then that screen will appear. However, if a program has more than one screen of this kind, a screen assignment dialog box will appear with a list of the available selection screens.
6. You then need to select one or more selection screens in which the variant will be created.
7. After screen selection, you need to select the Continue option. This option appears on the last selection screen in a program where you have multiple selection screens.
8. After that, you need to input the selection values that you desire. These values can include dynamic and multiple selections.
9. After inputting the required values, select the Continue option.
10. The ABAP: Save Variant overview screen will then appear. You will be required to save the attributes of your variants before saving them.
Variant attributes: what are they?
Many variant attributes exist. You need to ensure that you select the right ones when creating variants because they will help define their characteristics.
- You will need to input a short Description of the variant. It needs to be meaningful.
- If you want your variant to be ready to use for background processing but not in a dialog mode, select the Only for Background Processing field.
- If you do not want other users of the system to change your variant, then select the Protect Variant field.
- If you want the name of your variant to be displayed on the variant catalog, select the Only Display in Catalog. However, this option will prevent the users from seeing the name displayed if they use the F4 help value, so bear that in mind.
- On the Type section, you can indicate whether a field is a Selection Option (S) or Parameter (P) type.
- In order for you to write protect certain fields on the selection screen; you need to select the Protected column for individual selections that you want to make. After that, no user can make any inputs or changes to your protected variant.
- If you select the Invisible column, then the selected fields on the selection screen will be hidden by the system.
- The Selection Variable attribute allows the selection value at runtime to be set in a dynamic way.
There are other variant attributes. However, the above listed are important and may be selected or not during the creation of a variant. After they have been set, the variant can then be saved, and used later on.
Creating Report Variants
When learning how to create variant in SAP, bear in mind that report variants can be created even before a report has been created. You can choose to use a transaction code: /nzstm, or follow the right navigation path
1. You need to use the following navigation path: User menu>Role ZMIT>Reports
2. When you select Reports, you need to select the type of report for which you are making a variant.
3. Once you select the report, you need to input the values that should go into the various fields of the report.
4. Select the Save as Variant option. An ABAP window will appear.
5. On the ABAP window that appears input the variant name that you desire. The name must follow all the necessary conventions.
6. You need to input a Description attribute. The description should make it easy for other users to identify the variant that you have created.
7. Accept the default option in the field: Created for Selection Screens.
8. You can also select the Protect Variant attribute option if you want to prevent unauthorized users from being able to change your report variant.
9. Click on the Save option and the variant will be saved.
The process of creating variants is not very difficult provided you follow all the instruction. You must however, take care to follow the naming conventions. You should also select the right attributes. The attributes that you select for the variants that you create, will affect those variants and any data that comes after the creation process. When you learn how to create variant in SAP, you will be able to tailor some standard reports and transactions to suit your business needs properly.
Create a Report Variant for ABAP Program
Instead of entering the same values in selection criteria fields each time you execute a report, you can create a variant. Using variants reduces both data entry time and system processing time.
1. Execute transaction code SE38. Fill in the Program (Report) name which you wanted to execute with the newly created variant. Choose Variants under the Subobjects directory.
2. On the next screen, put the variant name and choose Create.
4. At here, you need to maintain what does the report will execute which is based on the variant that you are created. As an example, for report RSBTCDEL2, you may choose to delete 14 days or 20 days and what types of jobs need to deleted (released, scheduled, finished or canceled). Save after you have done your changes. Next, click on Attributes.
5. On the Attributes screen, fill in the Meaning (description) and select the appropriate settings for the attributes.
• Only for background processing: To print the list using background processing. You should always print large lists in the background. • Protect variant: To protect the entire variant. Only the person who created the variant can change or delete it. • Only display in catalog: To reduce the number of variants displayed when using possible entries help. • System variant (automatic transport): To make the variant a system variant.
You May Also Like
Could not initialize RFC group 562 (Message no. TSGEN207)
How to forward sap transport request.
How to Get the List of SAP Activated Business Function
SM37 Job canceled: Output Device not defined
Leave a reply cancel reply.
- Request Media Kit
- Digital Issues
- Print/Digital Magazine
- White Papers
- Training Programs
- Reliability Products 360°
SAP Tips and Tricks: Put Variants and Layouts to Work
Maintenance Technology | August 14, 2017
This month we answer the question: What variants and layouts does SAP offer and how can they help users?
SAP contains search screens on almost every transaction. This allows the user to establish variants by entering a set of criteria that can be saved and displayed each time the transaction is run, without reentering the criteria. This could be a group of work orders, functional locations, materials, or all objects in a date range.
There are ways that a dynamic date range can be entered. With this option, each time the transaction is run, it can start with the current day and go backward or forward by a prescribed number of days or you may want to look at the previous month or future dates. Regardless of the criteria, the dynamic date range can be set so your criteria run on that range each time you execute the transaction, without reentering the dates.
It is possible to create several different variants for the same transaction, based on the information you want to see. Variants are at the heart of effective use of dashboards. They are time saving and accurate, helping eliminate human error.
Layouts help, too
Layouts are a component of the variant that defines the information that will be displayed on the report, once executed. The layout controls the columns, sort order, format, and filtering options.
Layouts help control the look of your report, based on the selection criteria in your variant. Just like variants, you can create multiple layouts for the same transaction, depending on the audience and how you want your information to be viewed.
To create a variant, open a transaction and enter the search criteria you would like to see every time you execute. Select Goto from the menu, then select variants, then save the variant. If the system default variant comes up, make sure to change the name and not overwrite it.
In the variant name field, enter a name for your variant. You have two options for saving your variant. The user-specific option will be a personal variant, only seen by you as the creator. To implement this, you must enter the name of the variant in the format of U_SAP USER NAME. For example, U_EG8931.
The screen grabs above show the steps involved in setting up a user-specific variant.
The second option is a global variant that everyone can view. To create a global variant, you must start the variant name with a / then the description. If you check the box “protect variant,” only the creator will be able to change the variant.
Next, you can save your variant variables by selecting an object to create a dynamic range. In the example below right, due date was selected. Click on the selection variables button on the tool bar, then choose the value you want to save in your variant. MT
Kristina Gordon is SAP Program Consultant at the DuPont, Sabine River Works plant in West Orange, TX. If you have SAP questions, send them to email@example.com , and we’ll forward them to Kristina.
- Products 1,219
- Management 443
- Maintenance 680
Show More Videos
SHOW MORE VIDEOS
Brent Nelson is the Director of Product Development for Industrial Services for Donaldson, Bloomington, MN (donaldson.com), a global manufacturer of filtration products and solutions, is our guest for this […]
ABOUT THE AUTHOR
Bridge The IT/OT Gap
Young Engineers Evaluate Reliability
Assess Your R&M Status
Motor Misalignment Is Costly
Analyze Your Thermal Fluids
Plan For CMMS Success
View comments, sign up for insights, trends, & developments in.
Creating a dynamic variant for a report
Step1. Go to Tx- STVARV
Step2. Click Selection Options tab.
Step3. Choose the Change button.
Step4. To create a new one, select the Create button.
Step5. The below screen appears.
Step6. Provide a selection options name and then click on the arrow button.
Step7. The below screen appears, to maintain the range select second tab.
Step8. Provide the lower limit value and upper limit value and then F8 button.
Step9. Save it.
Step10. The below screen appears.
Step11. Create a report and create a select-option parameter. Execute it.
Step12. If we don’t provide any value and execute it. It displays all the records.
Step13. Here the report output. Go back.
Step14. Now click on the Save button to create a variant.
Step15. The below screen appears, Provide the variant name, description and press F4 button of the selection variable.
Step16. Select type of variable as T.
Step17. Click F4 against the name of the variable field.
Step18. Select the pre created variable name.
Step19. Save it.
Step20. Click on the variant button.
Step21. Select the newly created variant name.
Step22. The values are mapped to the select-option field. To see the values click on Right Arrow.
Step23. Choose select ranges tab.
Step24. So here we have the values. Click on F8 button.
Step25. Execute the report.
Step26. So here we have the report output.
Without going to the Tx- STVARV we can create variants.
Step27. Execute the report.
Step28. Click on save to create a variant.
Step29. Go to Environment and select Maint. Sel.Variables
Step30. This will open the Tx- STVARV screen. here we can maintain the names and values and can create a report variant using that STVARV value.
- Click to share on Twitter (Opens in new window)
- Click to share on Facebook (Opens in new window)
- Click to share on LinkedIn (Opens in new window)
- Click to share on WhatsApp (Opens in new window)
Leave a Reply Cancel reply
Fill in your details below or click an icon to log in:
You are commenting using your WordPress.com account. ( Log Out / Change )
You are commenting using your Facebook account. ( Log Out / Change )
Connecting to %s
Notify me of new comments via email.
Notify me of new posts via email.
- Already have a WordPress.com account? Log in now.
- Follow Following
- Copy shortlink
- Report this content
- View post in Reader
- Manage subscriptions
- Collapse this bar