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

How to set Dynamic variant for a program

Former Member
0 Likes
3,956

Hello experts,

I want to set variants dynamically on a selection screen. Please help me.

Thanks,

Ashwani.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,785

Hi Ashwani,

The variant can be set using:

SUBMIT program name [USING SELECTION-SET <var>]

USING SELECTION-SET <var>

This option tells the system to start the called program with the variant <var>.

For further details you can refer the link below:

http://help.sap.com/saphelp_nw04/Helpdata/EN/9f/dba51a35c111d1829f0000e829fbfe/frameset.htm

Also refer,

http://sapbrainsonline.com/sap-training/SAP-tutorial-pdf-material_425.html

Regards,

Soundarya.

Edited by: K.Soundarya Singh on Mar 16, 2010 7:16 AM

8 REPLIES 8
Read only

Former Member
0 Likes
1,785

HI Ashwin,

See below Eg:

SUBMIT zreport USING SELECTION-SET 'VARIANT1'.

Regards

Srikanth M

Read only

Former Member
0 Likes
1,785

what kind of fields you are using in the variant

if it is like data kind of variable then standard itself having the option for dynamic variant

and if it is some other fields then you have to use selection-set

as said by preivous friend

cheers

s.janagar

Read only

Former Member
0 Likes
1,786

Hi Ashwani,

The variant can be set using:

SUBMIT program name [USING SELECTION-SET <var>]

USING SELECTION-SET <var>

This option tells the system to start the called program with the variant <var>.

For further details you can refer the link below:

http://help.sap.com/saphelp_nw04/Helpdata/EN/9f/dba51a35c111d1829f0000e829fbfe/frameset.htm

Also refer,

http://sapbrainsonline.com/sap-training/SAP-tutorial-pdf-material_425.html

Regards,

Soundarya.

Edited by: K.Soundarya Singh on Mar 16, 2010 7:16 AM

Read only

Former Member
0 Likes
1,785

Hi Ashwani,

Please refer to following link :

[Dynamic Variant Creation|;

Regards,

Chandravadan

Read only

vinod_vemuru2
Active Contributor
0 Likes
1,785

Hi,

Welcome to SCN!!!

Please search in SCN. We have lot of information on this topic.

Checkout below blog which dicuss about the same.

/people/vinod.vemuru2/blog/2010/01/04/how-to-create-a-dynamic-variant-and-setup-batch-job-with-dynamic-variant

Thanks,

Vinod.

Read only

Former Member
0 Likes
1,785

Hi,

Have a look at this [link|http://www.divulgesap.com/blog.php?p=MTM=]. It has a procedure to create dynamic variant for Delivery due list. VL10 transaction.

Hope it is useful.

Regards,

Ravikiran

Read only

sumit_joshi2
Product and Topic Expert
Product and Topic Expert
0 Likes
1,785

Hi,

These are the steps.

1. First maintain a variable with values in table TVARV. This can be done from transaction STVARV. Later this variable needs to be assigned to the variant.

2. Next create the dynamic variant by pressing the SAVE button on the selection screen.

3. In the next screen (ABAP: Save as Variant) enter Variant name, description, set the u2018Selection variableu2019 (L) radio button and press u2018Selection variableu2019 push button.

4. In the next screen check that green traffic light is on under column T (T: Table variable from TVARV).

5. Now from the popup select the variable name created in Step1 and save the variant.

Sumit

Read only

dhirendra_pandit
Active Participant
0 Likes
1,785

Hi Ashwin,

You can use the table update VARID, its containing the variant parameter.

If you are using any job just make report before to update this table with dynamic variant value details and your job will run with new variant parameter.

For changing variant parameter you can use function module FASU_RS_CHANGE_CREATED_VARIANT.

Regards

Dhirendra Pandit