2007 Mar 16 6:57 AM
Hi Gurus,
What is the use of variants in reports? what is the purpose of display, changing the variants in reports?
Thanks in Advance
Ravi
2007 Mar 16 6:59 AM
Hi,
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.
http://help.sap.com/saphelp_nw04/helpdata/en/c0/980374e58611d194cc00a0c94260a5/content.htm
Regards
Sudheer
2007 Mar 16 6:59 AM
Hi,
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.
http://help.sap.com/saphelp_nw04/helpdata/en/c0/980374e58611d194cc00a0c94260a5/content.htm
Regards
Sudheer
2007 Mar 16 6:59 AM
Hi Ravi,
variant program is where you create variants.
For example if you have a report instead doing the selections all the time.. you save the selection as variant.
which reduces time, errors in input.
And most important thing is you can schedule a background job only using variants.
You can create screen variants throught transaction SHD0(zero).
http://help.sap.com/saphelp_nw04/helpdata/en/67/232037ebf1cc09e10000009b38f889/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c0/980374e58611d194cc00a0c94260a5/frameset.htm
http://help.sap.com/saphelp_47x200/helpdata/en/67/232037ebf1cc09e10000009b38f889/frameset.htm
Folllow this Link in SAP help for all the info in world over Variants.:)
http://help.sap.com/saphelp_nw04/helpdata/en/c0/980374e58611d194cc00a0c94260a5/frameset.htm
If it helps Reward with Points...
Regards Rk
Message was edited by:
Rk Pasupuleti
2007 Mar 16 7:01 AM
Variants
the link is
http://help.sap.com/search/highlightContent.jsp
Variants allow you to save sets of input values for programs that you often start with the same selections. You can use them for any programs except subroutine pools (type S).
Contents
Variants: Overview
Initial Screen
Displaying a Variant Overview
Creating and Maintaining Variants
Creating Variants
Attributes of Variants
Changing Variants
Deleting Variants
Printing Variants
Variable Values in Variants
Creating Variables for Date Calculations
User-specific Selection Variables
Creating User-specific Variables
Changing Values Interactively
Changing Values from the Program
Fixed Values from Table TVARV
Creating Table Variables from TVARV
Changing TVARV entries
Running a Program with a Variant
Variants: Overview
Use
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.
For further information about selection screens, see Working with selection screens in the ABAP User's Guide.
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.
You can create any number of variants for any program in which selection screens are defined. Variants are assigned exclusively to the program for which they were created.
You can also use variants to change the appearance of the selection screen by hiding selection criteria. This is particularly useful when you are working with large selection screens on which not all of the fields are relevant.
Reports, module pools, and function groups may have several selection screens. It is therefore possible to create a variant for more than one selection screen.
Variants are an interface between the user and the selection screen. They can be used both in dialog and in background mode, although their uses are slightly different.
Variants in Dialog Mode
In dialog mode, variants make things easier for the user, since they save him or her from continually having to enter identical values. They can also make the selection screen easier to read, because you can use them to hide input fields. Running an executable program with a variant containing an optimal set of values also reduces the capacity for user error. The optimized database selections speed up the runtime of the program.
Variants in Background Mode
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 (or SUBMIT... VIA JOB). To avoid you having to create a new variant each time you run the report, ABAP contains a mechanism allowing you to pass variable values to variants. See variable values in variants.
To ensure that an executable program is always started using a variant, you can specify in the program attributes that the program may only be started in this way.
Features
Creation of variants
Display, change, copy, print, and delete variants
Use and definition of variables in variants
Variable date calculation
User-specific fixed values
Fixed values in table TVARV
You access the variant maintenance tool from the initial screen of the ABAP Editor. Enter the name of the program, select Variants in the Sub-objects group box, and then choose Display or Change.
Functions
The above screen allows you to:
Create variants
Display the variant directory
Display and change values and attributes
Copy, delete, and rename variants
Before creating a new variant for a program, you should check whether you can use or adapt an existing variant instead.
There are two ways to display variants:
Position the cursor on the Variant field on the initial screen and press F4. The following dialog box lists all of the available variants:
Choose Variants ® Directory on the initial screen:
Creating Variants
Prerequisites
You must have defined one or more selection screens for the relevant program. The program may have any type except type S.
Procedure
On the initial screen of the ABAP Editor, enter the name of the program for which you want to create a variant, select Variants in the Sub-objects group box, and choose Change.
On the variant maintenance initial screen, enter the name of the variant you want to create.
Note the naming convention for variants (see below).
Choose Create.
If the program has more than one selection screen, a dialog box appears in which you can assign the variant to one or more screens. The dialog box does not appear if the program only has one selection screen. In this case, the selection screen of the program appears straight away.
If there is more than one selection screen, select the screens for which you want to create the variant.
Example:
If you choose Variant for all selection screens, the variant also applies to any selection screens that you create after creating the variant.
Otherwise, the variant only supplies values to the selection screens that you select in the list.
Choose Continue.
The (first) selection screen of the program appears.
If your program has more than one selection screen, use the scroll buttons in the left-hand corner of the application toolbar to navigate between them. If you keep scrolling forwards, the Continue button appears on the last selection screen.
Enter the required selections, including multiple and dynamic selections.
Choose Continue.
Result
When you have finished, an overview screen appears (ABAP: Save Attributes of Variant), on which you can enter the attributes of your variant and save it.
Note that when you create a new variant, you must enter both values and attributes.
Names of variants: Names can consist of up to 14 alphanumeric characters. The "% " character is not allowed. If you want the variant to be transported automatically with its program, you must create a system variant. The name of a system variant starts "CUS&" for customers, and "SAP&" for SAP system variants. You can only use the "&" character within this prefix in the name of a system variant. It may not occur in any other context. System variants are administered by the Workbench Organizer. Although you can create and access variants from any client, they are always stored in client "000".
Creating Variants
Prerequisites
You must have defined one or more selection screens for the relevant program. The program may have any type except type S.
Procedure
On the initial screen of the ABAP Editor, enter the name of the program for which you want to create a variant, select Variants in the Sub-objects group box, and choose Change.
On the variant maintenance initial screen, enter the name of the variant you want to create.
Note the naming convention for variants (see below).
Choose Create.
If the program has more than one selection screen, a dialog box appears in which you can assign the variant to one or more screens. The dialog box does not appear if the program only has one selection screen. In this case, the selection screen of the program appears straight away.
If there is more than one selection screen, select the screens for which you want to create the variant.
Example:
If you choose Variant for all selection screens, the variant also applies to any selection screens that you create after creating the variant.
Otherwise, the variant only supplies values to the selection screens that you select in the list.
Choose Continue.
The (first) selection screen of the program appears.
If your program has more than one selection screen, use the scroll buttons in the left-hand corner of the application toolbar to navigate between them. If you keep scrolling forwards, the Continue button appears on the last selection screen.
Enter the required selections, including multiple and dynamic selections.
Choose Continue.
Result
When you have finished, an overview screen appears (ABAP: Save Attributes of Variant), on which you can enter the attributes of your variant and save it.
Note that when you create a new variant, you must enter both values and attributes.
Names of variants: Names can consist of up to 14 alphanumeric characters. The "% " character is not allowed. If you want the variant to be transported automatically with its program, you must create a system variant. The name of a system variant starts "CUS&" for customers, and "SAP&" for SAP system variants. You can only use the "&" character within this prefix in the name of a system variant. It may not occur in any other context. System variants are administered by the Workbench Organizer. Although you can create and access variants from any client, they are always stored in client "000".
reward all help full answers
Message was edited by:
sunil kumar
2007 Mar 16 7:03 AM
RAvi,
Variants are to define the selection options for evaluations you use frequently.
ie) Fill your selection screen with Inputs..and save as a Variant.
For the Subseqnt execution of the report , u can fill ur selection screen using the variant (no need to key in again)
<a href="http://help.sap.com/saphelp_47x200/helpdata/en/0a/af73ec76ac11d1ad670000e8a6353a/frameset.htm">For more info</a>
Rgds,
Jothi.P
Pl close the thread once your q is solved.
2007 Mar 16 7:16 AM
varients are the selction criterias of the program's selection screen that are useful often.
regards,
bharat.