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

WHAT IS VARIANT?

Former Member
0 Likes
1,435

DEFINATION OF VARIANT?

8 REPLIES 8
Read only

Former Member
0 Likes
1,381

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

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.

Have a look at below link.

[Variants|http://help.sap.com/saphelp_nw04/helpdata/en/c0/98037ae58611d194cc00a0c94260a5/frameset.htm]

I hope it helps.

Best Regards,

Vibha

Please mark all the helpful answers

Read only

Former Member
0 Likes
1,381

HI Vinay,

When running test cases you can enter import parameter values directly, or you can create variants containing import parameters. When the test case runs with a variant, it fills the import parameters.

If the variant definition contains no value for a parameter, this parameter has its default value when the test case runs with this variant. If there is no default value, the parameter value is initial.

Prerequisites

When you have defined import parameters for the transaction input fields, you can create data sets which can be assigned to these import parameters when the test case runs.

Procedure

1. Enter the name of the test case for which you want to create variants, in the Easy mode initial screen.

2. Choose Parameter variants.

You go to the variant maintenance initial screen. If you have already created the variant, it appears on the screen.

3. Choose Create to create a new variant.

4. Enter a variant name in the Variant field, and a descriptive text for this variant in the following field.

5. Choose Maintain in screens. You go to the initial screen of the transaction. Parameterized fields are ready for input. You can maintain valid values for these parameters for this variant.

Navigate in the transaction with the scroll functions

6. When you have entered values for the parameterised fields, go back to the overview screen for the current variant by choosing Back. You get an overview of the valid variant values. If the value is the parameter default value, no value appears in the parameter value column.

Note

You can also enter the complete data set for the variant on this overview screen.

7. Save the variant and go back to the variant maintenance initial screen with Back.

8. To edit the created variant again, position the cursor on the variant and choose Edit. Save the variant and go back to the variant maintenance initial screen with Back.

9. Leave variant maintenance and go back to the Easy mode initial screen with Back.

When you run the test case again, you can choose the variants to be run, on the execution screen. The dataset defined in the variant is passed to the import parameters at runtime.

reward if helpful,

kushagra

Read only

Former Member
0 Likes
1,381

Hi,

Variant defines a set of pre-defined values for a selection screen.

Thank you.

Read only

Former Member
0 Likes
1,381

Hi,

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.

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

more on this http://help.sap.com/saphelp_nw04/helpdata/en/c0/980374e58611d194cc00a0c94260a5/frameset.htm

Refer

https://forums.sdn.sap.com/click.jspa?searchID=11516983&messageID=4887343

Regards

Kiran

Read only

Former Member
0 Likes
1,381

Hi Vinay,

Good Question from you.

Variants allow you to define fixed values for the input fields on the selection screen of a report.

And we have Transaction variant and Screen variant.

Now the question arise?

what you can do with the transaction variant?

Ans) Insert default values into fields

Change the ready for input status for fields

Hide various screen elements, menu functions or entire screens

Adjust table control settings

Note: Transaction variants can only be used with dialog transactions.

And also How to create transaction Variants?

Ans) Transaction variants are created with transaction: SHD0

In the field Transaction on SHD0 enter the transactioncode for the screen you want tpo modify (E.g. VA03)

In the field Variant on SHD0 enter the name you want to give the transaction variant (E.g. ZVA03)

Press Create

Now the screen for the transaction is shown and you can enter default values in the fields of the screen

Press Enter. Now a screen that enbles you to make further customizing (Hide, Output only, Invisible, Mandatory) if the screen fields is shown.

After you have finished customizing the screen press Enter to go to the next screen or ave and exit to save the Transaction variant

To run the transaction varian, you must create a new Transaction code in SE93 that referes to the Transaction variant. Choose Transaction with variant as Start object.

Note: The transaction variant can also be called from a program that imcludes a call to function module RS_HDSYS_CALL_TC_VARIANT

Coming to Screen Variants...

Screen variants

To create a screen variant, use transaction SHD0. Use menu Goto -> Screen variants

The process to create a screen variant is similar to creating a Transaction variant. The difference between the two types is that a Transaction variant covers the whole transaction and therefore can have more than 1 screen, while a screen variant only can have 1 screen.

If helpful dont forget to Reward.

Thanks

Abdul

Read only

Former Member
0 Likes
1,381

Hai,

While executing a code(Program), if same set of of inputs are used, then u can save this inputs in a set called Variant.

Thanks,

Swetha Singh

Read only

Former Member
0 Likes
1,381

Hi

Variant is a set of selection screen values, which is used to obtain desired/expected output.

Hope it helps.

Praveen

Read only

Former Member
0 Likes
1,381

Hi,

Varients are used to store the default values for slection-options and parameteres.

the easy way to create the varient is after executing the report....fill the values in the selction screen and click the save button...it will automatically create the vaient..

Regards,

Kranthi