In SAP ABAP reports have a mechanism for entering values for database selection or for performing different calculations through SELECTION SCREENS.
Selection screen provides a user an option to execute the reports or transactions as per his requirements and thus provide a range of values as an input.
Whenever there is a requirement to execute a report with the same set of input values again and again, for large selection screens entering the same values can be a tiresome and boring task. Thus SAP has provided a functionality to save these values in a set called as VARIANTS.
In order to save a variant just key in the values on selection screen and click on save button.
Variants can prove to be useful in various ways:
TYPES OF VARIANTS:
Variants values can be Static or Dynamic.
STATIC: Static values are fixed values and do not change over the course of time.
Example: Let us suppose there is an organization with 10,000 employees and the HR executes a monthly report having the personnel number as input ,each month. Then in this case we can use the static value giving the range as 1 to 10,000 for this.
DYNAMIC: Dynamic values in a variant can change over time.
Example: The HR wants to execute the report daily and gives the current date as the input. The requirement is that next day when the report is executed the date should be changed to current date.
In such case we can use dynamic values. If the dynamic value is a date , we can use the different date calculation options provided by SAP.
In other cases we can use the values stored in table TVARVC.
PROTECTION OF VARIANTS:
Variants can be saved as protected variants so that only the creator has the authority to change the variant at a later point of time. This can be done by selecting the checkbox for variant protection at the time time of saving variant attributes.
Variants are client dependent.
VARIANT VALUES: The variant values are stored in a table named VARI.
VARIANT DIRECTORY: The table VARID is a directory of variants present in system.
This table stores values such as : Variant Name , Report name for which variant is created , Information about when and by whom the variant was created ,version of variant , protected , transport and environment information.
How to change protected variants? : To change protected variants we need to remove the protected flag from VARID table for a given variant. SAP has provided a standard program for this purpose.
Program : RSVARENT can be used to unprotect the variants. It takes report and variant name as input. This report is used to cancel variant protection.
Next Blog: The next blog focuses on variant attributes and their usage.
Selection Screen Variants - Part II
Suggestions and Comments Welcomed
~Tanmay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
6 | |
5 | |
5 | |
5 | |
4 | |
3 | |
2 | |
2 | |
2 | |
2 |