2008 Jan 20 5:03 AM
2008 Jan 20 5:25 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.
For further information about selection screens, refer to 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
http://help.sap.com/saphelp_nw70/helpdata/en/c0/98037ae58611d194cc00a0c94260a5/content.htm
http://help.sap.com/saphelp_erp2004/helpdata/en/73/69ee3c55bb11d189680000e829fbbd/content.htm
2008 Jan 20 5:51 AM
Hi Prashanth, this will clear ur doubt.
You can create any number of selection sets (variants) for a program. The variants are allocated to the program uniquely.
Creating variants makes sense when you frequently start a program with the same selection default values.
You can mark Start with variants in the program attributes. Users (system, services, reporting) can then start the program only with a variant.
If the program uses several selection screens, you can choose to create a variant for all the selection screens or individually for each selection screen.
Naming conventions and transporting variants
"SAP&xxx" are supplied by SAP
"CUS&xxx" are created by customers (in client 000)
Variants that follow these naming conventions are client-independent and will automatically be transported along with the report. If these naming conventions are not followed, an entry for a request (task) must be added to the object list: LIMU VARI .
You have to assign a name and a description to each variant. By default, variants are available for both online and background processing. You can also define a variant exclusively for use with background processing.
You can protect the variant itself and the individual selection criteria and parameters against unauthorized changes. If you select Display only in catalog, this variant will not be displayed in the general value help (F4).
The type of a selection is determined in its declaration: Type s for SELECT-OPTIONS, type p for PARAMETERS. If you select Selections protected, then the field(s) will not be ready for input. You can use the hide attribute to suppress selection criteria and parameters on the screen, if required, resulting in a less cluttered selection screen.
When you use selection variables, there are three basic ways of supplying your selections with values at runtime:
From table TVARV (type T)
Date fields using dynamic date calculation (type D), such as today's date
User-specific variables (type B); Prerequisite: The selection must be declared with the MEMORY ID addition.
kindly reward if found helpful.
cheers,
Hema.