Sei sulla pagina 1di 9

BEx Query Designer

Unit 5: Variables

7/17/2007
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.

Variables act as placeholders for:


– Characteristic values
– Hierarchies
– Hierarchy nodes
– Texts
– Formula elements

If you use variables, a query definition can then serve as the basis for
many different queries.
Slide 2
Characteristic Value Variables

Selecting Single Value Variables


• Single Values

Selecting Single Value Variables as Variable


Value Area Limits
• Value Range
• Between, Greater than, Less than,
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, you can not only select
single values for variables, but also
several single values, intervals, or
selection options.

Slide 3
Text and Formula Variables

Formula Text variables


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

Hierarchy variables represent


hierarchies.

You can use them wherever


hierarchies can be selected.

Note that the fields for Version and Key Date are only input-
enabled if the characteristic can contain version or time-
Note
dependent hierarchies.

Slide 5
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 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
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
Using the Variable Offset

To analyze key figures that have a fixed


time-relationship to one another, you
can use the variable offset.

In your report definition, you can use


the same variable several times to
restrict the key figures and determine a
difference from the input value.

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.

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.

Slide 8
Business Content Variables

Business Content variables are


delivered for all types of variables to
enable you to create complex
queries quickly and easily.

For time characteristics, a range of


variables are delivered that replace
frequently-used time periods or
specific times.

Examples:
• current month
• comparable month of the
previous year

Slide 9

Potrebbero piacerti anche