Show TOC

Managing Context VariablesLocate this document in the navigation structure

You can define context variables for various tasks. Context variables make entering parameter values easy for users. For example, you can create context variables for dates such as today, tomorrow and this year. Users can select such relative values when running a report, instead of having to select exact dates from a displayed calendar.

Context variables can be assigned to a context group and a data type can be specified for each group.

Standard Settings

Five context variables are predelivered in the system. You can modify these and also create new ones.

Maintaining Context Groups

Proceed as follows:

  1. In transaction SPRO open the SAP Reference IMG and navigate to: Start of the navigation path SAP NetWeaver Next navigation step SAP Gateway Next navigation step Content Next navigation step  Reporting Administration Next navigation step Report Settings  Next navigation step Manage Context Variables End of the navigation path and click the Activity icon.

  2. Choose New Entries to define a new context group

    Field

    Description

    Context Group

    Enter a name for the context group.

    Context Group Description

    Enter the name of the time point or data change event.

    Value Type

    Select the data type for the context group.

  3. Save your settings.

Maintaining Context Variables

Proceed as follows

  1. In transaction SPRO open the SAP Reference IMG and navigate to: Start of the navigation path SAP NetWeaver Next navigation step SAP Gateway Next navigation step Content Next navigation step  Reporting Administration Next navigation step Report Settings  Next navigation step Manage Context Variables End of the navigation path and click the Activity icon.

  2. In the Manage Context Groups view, select a context group and double-click Manage Context Variables on the dialog structure in the left menu. The page lists all context variables that have been defined for the group.

  3. Choose New Entries to create a new variable.

    Field

    Description

    Context Variable

    Specify the technical name for the context variable to map it to an RFC destination.

    Context Variable Description

    Enter a description for the context variable.

    Control Type

    Select Parameter if the variable refers to specific values (for example, a date).

    Select Select-Options if the variable refers to relative values (for example, a date range).

  4. Save your settings.

Maintaining Context Variables Mappings

Proceed as follows

  1. In transaction SPRO open the SAP Reference IMG and navigate to: Start of the navigation path SAP NetWeaver Next navigation step SAP Gateway Next navigation step Content Next navigation step  Reporting Administration Next navigation step Report Settings  Next navigation step Manage Context Variables End of the navigation path and click the Activity icon.

  2. In the Manage Context Variables view, select a context variable and double-click Enable Context Variables on the dialog structure in the left menu. The page lists the SAP System Alias that the context variable has been mapped to.

  3. Choose New Entries to define a new system.

    Field

    Description

    SAP System Alias

    Select the SAP System Alias of the system to locate the class.

    Class

    Select the class name.

  4. Save your settings.