Skip to Content
Author's profile photo Tanmay Verma

Selection Screen Variants – Part III

In previous blogs we learnt about the types of selection screen variant, variant attribute and their uses.

Previous Blogs in the series:

Selection Screen Variants – Part I

Selection Screen Variants – Part II

Dynamic Variants: The values in such variants are dynamic and can vary over time.

How to use table TVARVC for dynamic variants? : The table TVARVC can be used for creating variants where input data needs to be changed frequently.

We have to first maintain high and low values for a field in the table TVARVC .Transaction STVARVC can be used to maintain  these values in client 000. In other clients the table can be directly maintained in SM30.

This values can be then used in variants while saving the variant attributes.

To create dynamic value for any field, Click on Selection variable and then press F4.

The F4 for the selection variable shows the following options.

T – Table Variable for TVARVC

D –  Dynamic data calculation.

When T is selected values will be  fetched from TVARVC table . Press ‘F4’ on ‘Name of Variable’ for the field and select the desired entry.

When D is selected  it corresponds to dynamic date calculations and hence is suitable for date fields.

For example if we have the selection screen as below:


We saving a variant we can make the values dynamic as follows:

  • Select the field for which dynamic values are required and press value help for selection variable.


On pressing the F4 help the options are displayed in pop-up window.


Select ‘T’ for TVARVC and the select the variable name using ‘F4’ help.


  • The date field can be made dynamic by following the below steps:
  • Select the selection variable as ‘D’.
  • Select the attribute value using F4 help. Here in the example we set the date field value equals to the current date.



One the variant is saved and report is executed:

  • The material value will be filled from TVARVC entry chosen.
  • The date will be defaulted to current date.

Running the report using the saved variant.


Function Modules Related to Variants:

  • Below Function modules can be used can be used in report programs as per the requirements.

Function Module



To create variants for reports


To check whether a variant exists for a report


Returns the variant list for a report in an internal table


To get the variant attributes of an existing variant


To copy an existing variant


To change the contents of an existing variant


To get the variant contents


To save the variant attributes. Helpful for dynamic variants


To save the variant values.

Suggestions and comments welcomed.


Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo VIJAYA CHANDRAN UVARAJAN

      Hi Tanmey.,


      Nice Blog. When i choose Select Option "D" in date field only from date is getting affected. I want to set "D" option for both from and to field. How to do that?

      Author's profile photo Ashish Jacob
      Ashish Jacob

      Hi Vijaya,

      If you are looking at a solution to input a date range, you can use choose option "current day -xxxx days current day + yyy days" . Hope the information is useful.




      Author's profile photo VIJAYA CHANDRAN UVARAJAN

      It worked. Thanks.