Application Development and Automation 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: 
Read only

break point

Former Member
7 REPLIES 7
Read only

Former Member
0 Likes
669

hi,

Cd u please explain me the use of varients?

Read only

0 Likes
669

Hi,

variants is a concept in SAP used for saving data and can be used for no. of times.

for ex : if we want to check our program with sam data for no. of times then variants are very useful for us.

Especially variants are very useful when programs are scheduled in background and also if the seleciton screen is big.

To create a variant first give the input to your prgm and click on save button then system creates a variant and give desc and name for that variant.then for next times on wards u no need to giv sam data just click on variant then it will automatically giv es data to required fields .

variants r useful in alv also.some of FM's in alv r

1. REUSE_ALV_F4_VARIANTS.

2. REUSE_ALV_VARIANTS_GET

.............

...........

For More Info,Refer this Link

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

Regards,

Padmam.

Read only

0 Likes
669

hi,

variants are mainly useful for storing input values of users. for ex: when are downlaoding a file to local system to have to give the location [path]. if u wanna download one more time than u have to give it agian. instead of giving again n again the se valuse can stored and used with the help of variants.

to create a variant in the o/p screen after giving values to scrren fields just click on save then system asks to give variant name and description. to this and execute the program. when next time in that o/p screen there appears a variant symbol after application tool bar and just click it. automatically all the values are placed into respective screen fields as before.

variants are user-specific. variants created for one user cant be used byanother user.

if useful reward some points,

with regards,

suresh.

Read only

0 Likes
669

hi

1. In a selection screen there are many fields,

eg. company , location, finanical year.

2. So everytime/everyday,

the user has to KEY in / TYPE IN

those values on selection screen again & again

3. To avoid this, we can type once,

and save this SET of VALUES,

with a name called as Variant.

4. So next time we open the report,

we need not type in all values, again,

we just have to SELECT the Variant Name,

and those Bunch of values, will automatically come on screen,

in their respective fields, and then we can execute the report.

Thanks

Ashu

Read only

Former Member
0 Likes
669

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

<b>Variants in Dialog Mode</b>

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.

<b>Variants in Dialog Mode</b>

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.

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.

<b>

Features</b>

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

Regards

Sudheer

Read only

Former Member
0 Likes
669

Hi Ajay,

When you run any report or transaction, you might need to use some selection criterion. In order to avoid entering them everytime, you can enter once and save it as variant and you can use them everytime you run the transaction or report.

For more help see this:

http://help.sap.com/saphelp_nw2004s/helpdata/en/c0/98037ae58611d194cc00a0c94260a5/content.htm

The variants we create at selection screen is different from the ALV variant. The ALV variant stores the layout of the output that the ALV is displaying. You need to create an ALV variant by selecting a layout with the fields you need in the displayed output and saving it. While executing the ALV report in the next run, you can give the name of the variant you have created as the ALV variant and the output will be as per the layout you have saved in your variant.

Hope u will find the matter useful.

Thanks,

Sapna