Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Variant

Former Member
0 Kudos

Hi...

What is variant ?

What is the use of variant ?

How to create Variant ?

How to use variant in program ?

Please Give me step by step information..

Thanks

Raj

4 REPLIES 4

Former Member
0 Kudos

Hi,

if u r program has selection screen and it expects some input from the user then u can give some default inputs and then can save those inputs as variant

for example if u r selection screen expects carrid and connid

u can give aa and 0017 and can save those inputs as one variant

to create it simply enter values in the input block and press save then it wil ask for some name.

then u will get one more icon by clicking it it will displays all the variants u created then u can choose among them

the exact use of variant comes when u r executing the program in the background which kas selection scren then u can give variant and continue the execution..

i think u got it noww

further if u have any quiries u can contact me on mutyalasunilkumar@gmail.com

plzz reward if it is usefullll

Former Member
0 Kudos

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.

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 TVARVC

Refer the link for creating and maintaining variants:

http://help.sap.com/saphelp_nw70/helpdata/en/c0/980386e58611d194cc00a0c94260a5/frameset.htm

Regards,

Renjith Michael.

Former Member
0 Kudos

Hi

Variants are used to hold sample selection screen values.

They can be craeted using transaction SE38.

To use variants, execute the program to get the selection screen and then click on the icon next to the execute button in the application tool bar.Select a variant. Then the selection screen fields will be automatically populated with those contained in the variant.Then execute the report.

thanks

Vasudha

Former Member
0 Kudos

hi raj,

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).

u want other information the see the below link.

http://help.sap.com/saphelp_nw04/helpdata/en/c0/980374e58611d194cc00a0c94260a5/content.htm

for creating varient u better see the below link

http://help.sap.com/saphelp_470/helpdata/en/c0/980389e58611d194cc00a0c94260a5/content.htm

*reward me if it's ok.