You are on page 1of 14

Conditions

Use
In the BEx Analyzer, you formulate conditions for efficient data analysis. In the results area of the query, the data is restricted according to the conditions so that only the part of the results area that you are interested in is displayed. Conditions do not affect the results lines, that is, the results lines correspond to the query results lines without this condition. You can define se eral conditions for one query. You can lin! se eral conditions logically using A"#, to ma!e different conditions apply to the query at the same time, as long as they are all acti e.

Prerequisites
You ha e defined and executed a query, and now want to define one or more conditions for this query.

Functions
Conditions help you restrict how you iew query data in the following way$ Absolute Conditions$ A line is filtered independently of the other lines, when its reference alue exceeds a specified threshold alue. Ranked Lists$ %ere, all lines of the displayed list are considered and their relationship to each other decides whether the lines are displayed. &an!ed lists are always sorted automatically.

'he following operators help you to create ran! lists$ Top N, Bottom N$ 'he ran!ed list is arranged according to a particular num(er.

Customers$ 'op ) or (ottom * sales olumes You get a list of the three customers with the highest sales, and also the fi e customers with the lowest sales. Top percent, bottom percent: 'he ran!ed list is arranged according to a particular percentage.

+aterial$ 'op ,*- of sales re enue

You get a list of materials with the highest sales olume that account for ,*- of the total re enue. +aterial$ Bottom ,*- of sales re enue You get a list of materials with the lowest sales olume that account for ,*- of total re enue. Top total, bottom total: 'he ran!ed list is arranged according to a particular totals alue.

.roducts$ 'op total ,/,/// E0& of sales olume You get a list of products with the lowest sales olume, whose com(ined sales olume ma!es a total of ,/,/// E0&. 1irst, all sales olumes are sorted in descending order and then totals are formed until the threshold alue of ,/,/// is exceeded. 'hose products that exceed the ,/,/// E0& threshold are left in the list. 'he ran!ed list for this condition might loo! li!e this$

Product

Sales olume

22,/// E0&

3,/// E0&

*,/// E0& .roduct C is included in the list, e en though it means the total sum is greater than ,/,/// E0&. All the products that ha e a lower sales olume than product C are no longer displayed. If you want to create a ran!ed list of the products with the lowest sales olume whose com(ined sales total a certain amount, use the Bottom total operator.

See also: #efining Conditions

!e"inin# Conditions
Prerequisites
You ha e executed a query. You want to define one or more conditions for this query, and ha e chosen Change query (global definition) from the BEx tool(ar.

Procedure
!e"inin# Conditions
2. Choose New Condition. 4'his menu path is under the push(utton with the arrow pointing downwards on the right next to the Condition sym(ol5. You get to the dialog (ox Define conditions. ,. 6pecify a name for the condition in the Description field.

If you want to 7ust define the condition, and do not want to execute it acti ely in the query, remo e the chec! from the active field that is there (y default. ). You now ha e the following options$ o In the field Evaluate conditions below for, choose the option All characteristics independent in drilldown, if you want to e aluate the lower condition rows separately for all the characteristics in the drilldown.

'he condition row is ales !op ". If the characteristic Customer is the only one in the query, the top * customers as far as sales are concerned are displayed (ecause of the condition. If the characteristic #roduct is the only one in the drilldown, the top * products as far as sales are concerned are displayed. 8hat9s more, if Customer and #roduct are in the drilldown, the top * customers and the top * products, as far as sales are concerned, are displayed, as well as all ,* com(inations of the two. o In the field Evaluate conditions below for, choose the option ingle characteristics or characteristic combinations if you want to e aluate only on certain drilldowns of defined characteristics or characteristic com(inations. You can then ma!e entries in the list of characteristics which are used in the queries in rows, columns or free characteristics.

a. If you only want to e aluate the condition if it is in the drilldown, select it with a chec!.

'he condition row is ales !op ". You ha e selected Customer as the only characteristic. 'he condition is only e aluated if Customer is in the drilldown. :nly the top * customers with their sales are displayed. (. 6elect se eral characteristics with a chec!, if you want to e aluate the condition for characteristic com(inations.

'he condition row is ales !op ". You ha e selected the characteristics Customer and #roduct with a chec!. 'he condition is only e aluated if Customer and #roduct are in the drilldown at the same time. 'he option All characteristics independent in drilldown, displays the top * customer;product com(inations with sales, so only * rows instead of ,* 4see a(o e5.

If you ha e defined se eral conditions for a query, there may (e clashes (etween the conditions that refer to the same characteristics. In this case, certain rules of priority apply. It is generally the most specific condition that applies when there are clashes.

:ne condition defines the top " sales for the characteristic Customer, a second condition defines the bottom $ sales in the customer;product com(ination. If only characteristic Customer is in the drilldown, only the first condition applies. 6o, only the condition top " sales is used for the characteristic Customer. If Customer and #roduct are in the drilldown at the same time, you can use (oth conditions according to your definition. In this case, the second condition applies, since it is the most specific (ecause of its reference to the characteristic com(ination. <. In the field #resent all values that fulfill at least one of the following conditions , enter one or more condition rows into the list. 6ee Conditions=Exceptions$ Inserting, changing, deleting rows A condition row is always deri ed from the determination of an element for e ery structure used in the query 4usually one or two structures5, an operator and a alue that matches the operator. You can choose from the following operators for threshold conditions$ o o is equal to is not equal to

o o o o o o

is less then is greater than is less than or equal to is greater than or equal to is between (is in the interval) is not between (is not in the interval)

'hese operators demand a floating point num(er as a alue. 1or the operators is in interval and is not in interval, you must enter a alue area> a lower and an upper threshold alue. You can choose from the following operators for ran!ed list functions$ o o o o o o !op N Bottom N !op percent Bottom percent !op sum Bottom sum

1or !op%Bottom N& you must enter a whole, positi e num(er as the alue. 1or !op%Bottom percent, enter a num(er (etween / and 2//. 1or !op%Bottom sum, you can also enter a floating point num(er 4for example, 2*.35. 'he entry format depends on the country setting of the operati e system.

'o ma!e it easier to enter larger num(ers, there is the following entry con ention$ A quotation mar! (ehind the num(er means it is multiplied (y one thousand, two quotation mar!s means a multiplication (y one million and three quotation mar!s means a multiplication (y one (illion, for example 2.*? @ 2.* +io @ 2.*//.///.

A group of condition rows is logically lin!ed with :&. 'his means that at least one of the condition rows has to (e filled for the entire condition to (e filled for one characteristic alue. 3. Choose :'. 'his ta!es you (ac! to the query definition. A. Choose ave.

C$an#in# Conditions 2. Choose Change condition( 4'his menu path is under the push(utton with the arrow pointing downwards on the right next to the Condition sym(ol5. You get to the selection window for the conditions that ha e already (een defined.

,. Choose the condition you want to use, and then choose )'. You get to the dialog (ox Defining conditions, where you ma!e the changes. ). In the query definition, choose ave. !eletin# Conditions 2. Choose Condition. You get to the selection window for the conditions that ha e already (een defined. ,. Choose the condition you want, and then choose Delete. ). In the query definition, choose ave.

Result
You ha e defined or deleted a condition for a query. Execute the query. :nly those o(7ects are displayed which fulfill the defined conditions.

#isplay the descriptions of the conditions in the query iew, and acti ate=deacti ate them with a dou(le;clic!, or the right mouse (utton. Choose *ayout Display conditions.

See also:
0sing Conditions

!e"inin# Conditions
Prerequisites
You ha e executed a query. You want to define one or more conditions for this query, and ha e chosen Change query (global definition) from the BEx tool(ar.

Procedure
!e"inin# Conditions
2. Choose New Condition. 4'his menu path is under the push(utton with the arrow pointing downwards on the right next to the Condition sym(ol5. You get to the dialog (ox Define conditions. ,. 6pecify a name for the condition in the Description field.

If you want to 7ust define the condition, and do not want to execute it acti ely in the query, remo e the chec! from the active field that is there (y default. ). You now ha e the following options$ o In the field Evaluate conditions below for, choose the option All characteristics independent in drilldown, if you want to e aluate the lower condition rows separately for all the characteristics in the drilldown.

'he condition row is ales !op ". If the characteristic Customer is the only one in the query, the top * customers as far as sales are concerned are displayed (ecause of the condition. If the characteristic #roduct is the only one in the drilldown, the top * products as far as sales are concerned are displayed. 8hat9s more, if Customer and #roduct are in the drilldown, the top * customers and the top * products, as far as sales are concerned, are displayed, as well as all ,* com(inations of the two. o In the field Evaluate conditions below for, choose the option ingle characteristics or characteristic combinations if you want to e aluate only on certain drilldowns of defined characteristics or characteristic com(inations. You can then ma!e entries in the list of characteristics which are used in the queries in rows, columns or free characteristics.

a. If you only want to e aluate the condition if it is in the drilldown, select it with a chec!.

'he condition row is ales !op ". You ha e selected Customer as the only characteristic. 'he condition is only e aluated if Customer is in the drilldown. :nly the top * customers with their sales are displayed. (. 6elect se eral characteristics with a chec!, if you want to e aluate the condition for characteristic com(inations.

'he condition row is ales !op ". You ha e selected the characteristics Customer and #roduct with a chec!. 'he condition is only e aluated if Customer and #roduct are in the drilldown at the same time. 'he option All characteristics independent in drilldown, displays the top *

customer;product com(inations with sales, so only * rows instead of ,* 4see a(o e5.

If you ha e defined se eral conditions for a query, there may (e clashes (etween the conditions that refer to the same characteristics. In this case, certain rules of priority apply. It is generally the most specific condition that applies when there are clashes.

:ne condition defines the top " sales for the characteristic Customer, a second condition defines the bottom $ sales in the customer;product com(ination. If only characteristic Customer is in the drilldown, only the first condition applies. 6o, only the condition top " sales is used for the characteristic Customer. If Customer and #roduct are in the drilldown at the same time, you can use (oth conditions according to your definition. In this case, the second condition applies, since it is the most specific (ecause of its reference to the characteristic com(ination. <. In the field #resent all values that fulfill at least one of the following conditions , enter one or more condition rows into the list. 6ee Conditions=Exceptions$ Inserting, changing, deleting rows A condition row is always deri ed from the determination of an element for e ery structure used in the query 4usually one or two structures5, an operator and a alue that matches the operator. You can choose from the following operators for threshold conditions$ o o o o o o o o is equal to is not equal to is less then is greater than is less than or equal to is greater than or equal to is between (is in the interval) is not between (is not in the interval)

'hese operators demand a floating point num(er as a alue. 1or the operators is in interval and is not in interval, you must enter a alue area> a lower and an upper threshold alue. You can choose from the following operators for ran!ed list functions$ o o o o !op N Bottom N !op percent Bottom percent

o o

!op sum Bottom sum

1or !op%Bottom N& you must enter a whole, positi e num(er as the alue. 1or !op%Bottom percent, enter a num(er (etween / and 2//. 1or !op%Bottom sum, you can also enter a floating point num(er 4for example, 2*.35. 'he entry format depends on the country setting of the operati e system.

'o ma!e it easier to enter larger num(ers, there is the following entry con ention$ A quotation mar! (ehind the num(er means it is multiplied (y one thousand, two quotation mar!s means a multiplication (y one million and three quotation mar!s means a multiplication (y one (illion, for example 2.*? @ 2.* +io @ 2.*//.///.

A group of condition rows is logically lin!ed with :&. 'his means that at least one of the condition rows has to (e filled for the entire condition to (e filled for one characteristic alue. 3. Choose :'. 'his ta!es you (ac! to the query definition. A. Choose ave.

C$an#in# Conditions 2. Choose Change condition( 4'his menu path is under the push(utton with the arrow pointing downwards on the right next to the Condition sym(ol5. You get to the selection window for the conditions that ha e already (een defined. ,. Choose the condition you want to use, and then choose )'. You get to the dialog (ox Defining conditions, where you ma!e the changes. ). In the query definition, choose ave. !eletin# Conditions 2. Choose Condition. You get to the selection window for the conditions that ha e already (een defined. ,. Choose the condition you want, and then choose Delete. ). In the query definition, choose ave.

Result
You ha e defined or deleted a condition for a query. Execute the query. :nly those o(7ects are displayed which fulfill the defined conditions.

#isplay the descriptions of the conditions in the query iew, and acti ate=deacti ate them with a dou(le;clic!, or the right mouse (utton. Choose *ayout Display conditions.

See also:
0sing Conditions

!e"inin# %ueries: Business &'plorer Anal()er


Use
You analyze the dataset of the Business Information 8arehouse (y defining queries for InfoCu(es. By selecting and com(ining Info:(7ects 4characteristics and !ey figures5 in a query you determine in which way you na igate through and e aluate the data in the selected InfoCu(e.

*nte#ration
You can gi e queries parameters. You can use aria(les for characteristic alues, for texts and for formulas in the query definition. You create these aria(les in ad ance in the +ariable maintenance. You can insert the defined query in its initial iew in a ,orkbook. 0sing different na igation functions you can analyze InfoCu(e data with the characteristics and !ey figures defined in the query. You can sa e arious iews for the query and pu(lish them in the 8e( to form a 8e( query. You can sa e the wor!(oo! in your "a+orites or in acti+it( #roups -roles..

Prerequisites
'he Business Information 8arehouse must contain at least one InfoCu(e.

Functions
&eporting consists of the steps query definition and na igation. 8ith the query definition in the Business Explorer, you define a query that forms the (asis for analyzing data in the InfoCu(e. If you imagine the InfoCu(e as an nB2 dimensional cu(e, then a su(;cu(e 4query cu(e5 is cut from the InfoCu(e with the selection and restriction of the characteristics and !ey figures. 'he data for the characteristics that is not selected for the query is aggregated.

'he significant components of the query definition are the filter and na igation$
'he selections in the "ilter ha e a limiting effect on the whole query. 8ith the filter definition, you select certain characteristic alues or !ey figures that is=are to (e reported on. All of the InfoCu(e data is aggregated using the filter selection of the query. 'he filter selection cannot (e changed (y the na igation. 1or the na+i#ation you select user;defined characteristics and determine the content of the rows and columns of the query. You use this selection to determine o er which data areas of the InfoCu(e you want to na igate. In addition, how the contents of the rows and columns are arranged, determines the default iew of the query and with it, the rows and columns axis in the results area. After it is inserted into a wor!(oo!, a query is displayed in the predefined initial iew. By na igating through the query you can generate different iews of the InfoCu(e data, (y dragging one of the user;defined characteristics into the rows or columns of the query, for example, or filter a characteristic according to a single characteristic alue.

8ith the definition of a query the InfoCu(e data can (e e aluated specifically and quic!ly. 'he more precisely the query is defined the smaller the su(cu(e is and the quic!er the execution and na igation. You define the queries (y$
6electing an *n"oCube, for which the query is defined> 6electing reusa(le structures that already contain characteristic or !ey figure com(inations 4for example, contri(ution margin schema5> 6electing c$aracteristics from the InfoCu(e> &estricting selected characteristics to characteristic alues, characteristic alue inter als or hierarchy nodes> 0sing +ariables for characteristic alues, formulas and texts> 6electing ke( "i#ures from the InfoCu(e> 1ormulating calculated !ey figures> &estricting !ey figures ia the com(ination with characteristics> Arranging the characteristics and !ey figures in rows or columns and there(y esta(lishing an initial +ie, for the query analysis.

Acti+ities
Choose tart #rograms A# +rontend Business ,nformation -arehouse SAP Business
Explorer Analyzer(

See also: Introduction$ &eporting with the Business Explorer #efining "ew Cueries 0sing Daria(les

!e"inin# Ne, %ueries


Prerequisites
'he Business Information 8arehouse must contain at least one InfoCu(e.

Procedure
2. ,. ). <. 6tart the Business Explorer Analyzer. In the BEx tool(ar, choose )pen. You get to the selection screen for all existing wor!(oo!s. Choose .ueries. You get to the selection screen for all a aila(le queries. Choose New... again. You get to the selection screen for all InfoCu(es, for which you can define a new query. *. 6elect the InfoCu(e on whose data the query should (e (ased.

If you want to show the technical name of the InfoCu(es, choose the sym(ol !echnical name on%off. E. 'he a aila(le o(7ects in the *n"oCube you selected are displayed as a directory tree in the left part of the screen for the query definition. 'he right;hand area contains empty directories for the filter selection, the rows, the columns and the free characteristics of the query. 'he pre iew of the results area for the query can (e found (ottom right. 'his area is also empty at first 4also see the example at the end of this section5. .roceed as follows to create a query$ By clickin# on the plus or minus sym(ol of the directories you can expand or compress the directories. You can, for example, display the list of all of the !ey figures in the InfoCu(e (y expanding the !ey figure node in the InfoCu(e tree. 0sing dra#/and/drop, you can drag characteristics and !ey figures from the InfoCu(e into the directories of the query definition 4filter& rows& columns& free characteristics5.

0sing the ri#$t mouse button you call up all the functions that are a aila(le in the current context menu. 1irst, select the query component you want to wor! with 4for example, a characteristic5 and then, using the right mouse (utton, select a menu entry 4for example, #roperties5 from the context menu. By double/clickin# on an element of the query definition, you call up a dialog (ox containing a function that is executed (y default on this element. If, for example, you dou(le;clic! on a characteristic, the dialog (ox for restricting the characteristic appears. If you dou(le;clic! on a calculated !ey figure, for example, then the Calculated /ey figure dialog (ox, in which you can ma!e changes, appears.

3. +a!e the selections for the "ilter of the query. .lease note that the filter selection has a restricting effect on the entire query, meaning all of the InfoCu(e data is aggregated with the filter selection. 6elect the characteristics or the !ey figure upon which the query should (e (ased from the directory tree of the InfoCu(e. o C$aracteristics Expand the dimension directory you want and first select one or more characteristics of the InfoCu(e that you want to restrict to one or more alues, a aria(le, a alue inter al or a hierarchy node 4 see also: Creating Cueries 8ith Daria(les 5. Expand this characteristic and, using drag;and;drop, put a single alue in the filter of the query definition. :r, using drag;and;drop, drag the characteristic into the +ilter area of the query definition. 0sing the right mouse (utton select 0estrict from the context menu. "ow select a characteristic alue inter al or a hierarchy node 4 See also: &estricting Characteristics5. o 0e( "i#ure #ecide whether all of the query data should refer to the num(er alues of a !ey figure or whether the query should (e (ased on se eral !ey figures. If the query should refer to the num(er alues of one ke( "i#ure, select the corresponding !ey figure of the InfoCu(e tree and drag it to the +ilter area of the query definition using drag;and;drop. You can also use a restricted or calculated !ey figure 4 see also: &estricting and Calculating Fey 1igures5. A. "ow determine which characteristics, !ey figures or structures you want to use for the na+i#atin# on the query data. 0sing drag;and;drop, drag the corresponding directories of the characteristics of the InfoCu(e tree to the directories rows& columns or free characteristics in the right;hand screen area of the query definition or drag the structure directories into the rows or columns. If you ha e not selected any !ey figures for the filter, then define one or more ke( "i#ures either in the rows or columns of the query. 1rom the 'ey figures directory of the InfoCu(e tree drag a !ey figure into a directory of the query definition using drag;and;drop 4either row or column5. 'he !ey figure is stored in the new directory 'ey +igure. You can also define a ne, calculated ke( "i#ure and use it for the query. 1or example, instead of ?6ales re enue?, define the !ey figure ?.rice? that is calculated using ?6ales re enue? di ided (y ?Cuantity?. %ighlight the directory 'ey figures in the InfoCu(e tree and choose New calculated /ey figure from the context menu 4right mouse clic!5.

You can restrict ke( "i#ures to characteristic alues, characteristic alue inter als or hierarchy nodes (y highlighting the !ey figure and choosing Edit from the context menu 4right mouse clic!5. A restricted !ey figure would (e ?6ales re enue in 2 st quarter?, for example. By placing the characteristics, !ey figures or structures either in the rows or columns directory of the query definition, you configure the first na+i#ational state of the query 4start iew5. In the lower right area you can see a pre iew of the results area of the query in the start iew that you selected.

You can change the arrangement of the !ey figures and characteristics in the rows and columns using drag;and;drop until the pre iew shows the results area you want. G. If you ha e created the query, you can chec! the query definition (y choosing the Chec/ sym(ol in the standard tool(ar. 2/. 6elect the sym(ol for .uery properties from the tool(ar if you want to change the description& settings for 0esult position, Display options and Number display, or /ey date for the query. 22. 6a e the query. Enter a technical name and a description for naming the query. 'he technical name must uniquely identify the query, meaning that the name is only allowed to appear once across all InfoCu(es of the Business Information 8arehouse. 'he technical name can (e up to )/ characters long and must (egin with a letter.

Result
'he query is sa ed and can (e inserted into a wor!(oo!. You can analyze the query data in the Business Explorer.
See also: Creating &eusa(le 6tructures .roperties of the Cuery Components 1unctions of the Cuery #efinition #isplaying and Changing the Cuery #efinition Authorizations for the Cuery #efinition