←Previous Step

Step1:Creating Variants for SAP ABAP programs Normal

Variant is a concept of saving a set of input fields with values with a particular name, so that we can use the same set of inputs next time, the below is the example of creating variants in SAP ABAP programs.

Create a program with a selection-screen.

REPORT ZSAPN_DYNAMICDATE.
DATA LV_DATUM TYPE DATUM.
PARAMETERS P_DATE TYPE DATUM.
SELECT-OPTIONS S_DATE FOR LV_DATUM.

Creating variants in SAP ABAP reports

Provide some input values, click on save button.

Creating variants in SAP ABAP reports

Provide variant name, description and save.

Creating variants in SAP ABAP reports

How to use variant in SAP ABAP programs

Go to the program selection screen, you will find variant icon, click on variant icon.

Creating variants in SAP ABAP reports

You will find list of variants available for the program, double click on any variant, the values will be populated to screen automatically.

Creating variants in SAP ABAP reports

Creating variants in SAP ABAP reports