You are on page 1of 9

BEx Query Designer

Unit 5: Variables

7/17/2007

Variables act as placeholders for: – Characteristic values – Hierarchies – Hierarchy nodes – Texts – Formula elements If you use variables. Slide 2 .Using Variables Variables are query parameters that you define in Query Designer and that are filled with values only when you execute the query or Web application. a query definition can then serve as the basis for many different queries.

you can not only select single values for variables. Greater than or equal to. Less than or equal to Selecting Variables with Several Single Values or Value Ranges • Depending on how they have been defined. Greater than. Less than. or selection options. but also several single values.Characteristic Value Variables Selecting Single Value Variables • Single Values Selecting Single Value Variables as Variable Value Area Limits • Value Range • Between. intervals. Slide 3 .

enclosed by ampersands (&). Slide 4 . Text variables represent a text. This appears with its technical name. calculated key figures and structural components. in the description.Text and Formula Variables Formula variables represent numerical values. You can use text variables in query descriptions. You can use formula variables in formulas and for calculating exceptions and conditions.

Slide 5 . You can use them wherever hierarchies can be selected. Note Note that the fields for Version and Key Date are only inputenabled if the characteristic can contain version or timedependent hierarchies.Hierarchy Variables Hierarchy variables represent hierarchies.

Variable hierarchy node with a fixed hierarchy – a report about any department (variable hierarchy node) for the hierarchy valid for 2002 (fixed hierarchy) Variable hierarchy node with a variable hierarchy – a report about any department (variable hierarchy node) for the hierarchy valid for the current calendar year (variable hierarchy) Slide 6 .Hierarchy Node Variables If you use a hierarchy node variable. you can make selections by hierarchy node when you come to use the query.

Variable Processing Types User Entry / Default Value Enables you to enter the required value for the variable manually in a dialog box when you execute the query Replacement Path Enables you to specify the value that automatically replaces the variable when the query or Web application is executed Authorization Enables you to fill the variables automatically with the values from the authorization of a user Customer Exit Enables you to determine values for variables by means of a function module exit SAP Exit Contained in variables that are delivered with SAP BW Business Content Slide 7 .

You can also use the variable offset to select an interval as a restriction with upper and lower limits that refer to the same variable.Using the Variable Offset To analyze key figures that have a fixed time-relationship to one another. Slide 8 . you can use the same variable several times to restrict the key figures and determine a difference from the input value. you can use the variable offset. In your report definition. Example: Use the variable offset to compare the sales volume from the current time period with that of the same time period in the previous year.

a range of variables are delivered that replace frequently-used time periods or specific times.Business Content Variables Business Content variables are delivered for all types of variables to enable you to create complex queries quickly and easily. Examples: • current month • comparable month of the previous year Slide 9 . For time characteristics.