Procedure documentation Defining Exceptions Locate the document in its SAP Library structure

Use

You can define threshold values (exceptions) for a query. Data that varies from these thresholds are marked in different colors. You can use these exceptions to spot extraordinary variations from expected results straight away.

You can find additional information under Exception Reporting.

Procedure

...

       1.      Choose New Exception. (You can find this menu entry in the Query Designer toolbar under This graphic is explained in the accompanying text to the right of This graphic is explained in the accompanying text Exception.) You get to the Defining Exceptions dialog box.

       2.      Give a name for the exception in the Description field.

Note

If you only want to define the exception, and do not want to execute it actively in the query, remove the check from the Active field that is set there by default.

       3.      In the Evaluation for field, choose the structure elements, for which you want to evaluate the exception. Choose a structure element individually for every structure used, or use the (Everything) setting to apply the exception to all the structure elements.

Example

You want to evaluate the exception for the key figure Sales. Choose the value Sales from the selection field for the Key Figures structure.

       4.      Choose the Exception Values tab page.

Add one or more alert level rows to the list. See Conditions/Exceptions: Inserting, Changing, Deleting Rows

An alert level row consists of:

-         From-value

-         To-value

-         Alert Level

From and To Values

Specify floating point numbers for the from and to values. If you want to, you can leave either the from- or the to- value blank.

The format depends on the country setting in the operative system.

Note

The following convention makes it easier to handle numbers with many zeros:

An apostrophe after the number means multiplied by one thousand, a quotation mark means multiplied by one million, and three apostrophe marks means multiplied by one billion, for example 1.5” = 1.5 mil = 1,500,000.

You can use formula variables for the from and to values of the exception.

Select Variables Entry.

The available formula variables appear in a dropdown box. Select a variable. You can change the variable using This graphic is explained in the accompanying text . The Variables Editor dialog box appears. For more information, see Changing Variables in the Variable Editor.

Choose This graphic is explained in the accompanying text if you want to create a new formula variable. The Variables Wizard dialog box appears. For more information, see Defining Variables with the Variable Wizard.

When you execute the query, the variable dialog box appears, in which you can choose the from and to values.

Alert Level

Assign the exception priority you want to use as an Alert level.

In the Excel formatting templates used as standard in the BEx Analyzer, a color ramp is used to display the priority given to an exception (dark green = good 1,...yellow = medium 5,...dark red = bad 9). There are a total of nine color shades, corresponding to nine different levels of priority. If you want to assign your own colors, choose Formatting ® Pattern from the BEx toolbar (see also Formatting.

The formatting for Web applications is defined in the BW stylesheet. You can change the colors for the exceptions in the stylesheet.

Example

All sales below 1,000 are bad, all sales above 100,000 are good, and all sales between these two values are medium. Define three Alert level rows to correspond to these three categories:

From

To

Alert Level

 

1.000

9 (bad)

1.000

100.000

5 (medium)

100.000

 

1 (good)

Note

For report data, the alert level rows are processed in order. The alert level that is relevant for the report data goes to the first row.

       5.      Choose the Cell Restrictions tab page, if you want to define more precisely the data cells of the report for which the exception is evaluated.

Add one or more cell restriction rows to the list. See Conditions/Exceptions: Inserting, Changing, Deleting Rows

A restriction row consists of:

-         A characteristic

-         An operator

-         A value (only with the operator Fixed Value as a characteristic value, and the operator Level as a number)

Choose from any of the free characteristics, or any of the characteristics from the rows and columns that are used in a query. You cannot use characteristics that have already been used in another restriction row in the list.

Choose from the following operators:

Operators

Meaning

everything

The cell context is not restricted. The exception is valid for every drilldown status of the characteristic.

totals only

The exception is valid only for aggregated values of the characteristic.

everything except totals

The exception applies to all values of the characteristic apart from aggregated values.

fixed values

The exception is valid for only one particular value of the characteristic (“spare parts” under “product group”, for example). Specify the characteristic value you want to use in external non-compounded display format or call the value help with  This graphic is explained in the accompanying text to choose a characteristic value.

You can also use characteristic value variables.

Select Variables Entry.

The characteristic value variables appear in a dropdown box. Select a variable. You can change the variable using This graphic is explained in the accompanying text . The Variables Editor dialog box appears. For more information, see Changing Variables in the Variable Editor.

Choose This graphic is explained in the accompanying text if you want to create a new characteristic value variable. The Variables Wizard dialog box appears. For more information, see Defining Variables with the Variable Wizard.

When you execute the query, the variable dialog box appears, in which you can choose the characteristic value.

Level

The exception is valid only for a particular hierarchy level of the characteristic. Specify the hierarchy level you want to use as a number in the Value field.

Example

In the hierarchy for the characteristic Location, Country is the second hierarchy level (continent – country – state – location). If you want the exception to be valid only for the hierarchy level Country, put the number 2 in the Value field. If you want the exception to be valid only for the hierarchy level State, put the number 3 in the Value field, since State is the third hierarchy level.

The standard default cell restriction Totals Only (Recommended with Absolute Values) is applied to all those characteristics where you have not restricted the cells individually. This setting means that the exception is valid only for the aggregated values of this characteristic.

Note

You can also use the default restriction Everything (Recommended for Relative Values) in the field Default Operator Used for All Characteristics that Are Not Displayed. This setting means that the exception is valid independently of the drilldown status of a characteristic, whose cell context has not been restricted. This does not qualify as a restriction.

Recommendation

We recommend that you use this setting only with relative values (for example, percentage deviations).

       6.      Choose OK. You return to the query definition.

       7.      Choose Save.

Changing Exceptions

1.       Choose Change Exception. (You can find this menu entry in the Query Designer toolbar under This graphic is explained in the accompanying text to the right of This graphic is explained in the accompanying text Exception.) The dialog box for the exceptions that have already been defined appears.

2.       Select the exception you want to use, and choose OK. The Defining exceptions dialog box appears. Make your changes here.

3.       In the Query Designer, choose Save.

Deleting Exceptions

1.       Choose Exception. The dialog box for the exceptions that have already been defined appears.

2.       Select the exception you want to remove, and choose Delete.

3.       In the Query Designer, choose Save.

Result

You have defined or changed an exception for a query. In the status bar of the Query Designer, the This graphic is explained in the accompanying text symbol in the lower right-hand corner shows you that one or more exceptions have been defined for this query.

Execute the query. The exception is evaluated online. The cells that are affected by the exception are displayed with the appropriate color shading in the result area of the query.

Note

You can display the exception descriptions and activate or deactivate the exceptions you want.

BEx Web applications:

Choose in the Web item Liste der Exceptions the symbol for activating and deactivating exceptions.

Choose in the standard Web template This graphic is explained in the accompanying text Exceptions in order to see the display of the available exceptions and to excecute the corresponding functions.

BEx Analyzer:

In the BEx Analyzer, choose Layout ® Display Exceptions. The descriptions for the exceptions are inserted into the cell area below the filter cells. You can activate/deactivate the exceptions with a double-click or over the context menu (right mouse-click).

Exceptions are evaluated in the background, if they involve a large number of queries, for example. You schedule the exceptions for background processing in the Administrator Workbench Reporting Agent.

See Structure linkReporting Agent, Structure linkDefining the Exceptions Setting.