Start of Content Area

Procedure documentation Creating Variants  Locate the document in its SAP Library structure

Prerequisites

You must have defined one or more selection screens for the relevant program. The program may have any type except type S.

Procedure

  1. On the initial screen of the ABAP Editor, enter the name of the program for which you want to create a variant, select Variants in the Sub-objects group box, and choose Change.
  2. On the variant maintenance initial screen, enter the name of the variant you want to create.
    Note the naming convention for variants (see below).
  3. Choose Create.
    If the program has more than one selection screen, a dialog box appears in which you can assign the variant to one or more screens. The dialog box does not appear if the program only has one selection screen. In this case, the selection screen of the program appears straight away.
  4. If there is more than one selection screen, select the screens for which you want to create the variant.

Example:

This graphic is explained in the accompanying text

Note

If you choose Variant for all selection screens, the variant also applies to any selection screens that you create after creating the variant.

Otherwise, the variant only supplies values to the selection screens that you select in the list.

  1. Choose Continue.
    The (first) selection screen of the program appears.
    If your program has more than one selection screen, use the scroll buttons in the left-hand corner of the application toolbar to navigate between them. If you keep scrolling forwards, the Continue button appears on the last selection screen.
  2. Enter the required selections, including multiple and dynamic selections.
  3. Choose Continue.

Result

When you have finished, an overview screen appears (ABAP: Save Attributes of Variant), on which you can enter the attributes of your variant and save it.

Note that when you create a new variant, you must enter both values and attributes.

Note

Names of variants: Names can consist of up to 14 alphanumeric characters. The "% " character is not allowed. If you want the variant to be transported automatically with its program, you must create a system variant. The name of a system variant starts "CUS&" for customers, and "SAP&" for SAP system variants. You can only use the "&" character within this prefix in the name of a system variant. It may not occur in any other context. System variants are administered by the Workbench Organizer. Although you can create and access variants from any client, they are always stored in client "000".