Академический Документы
Профессиональный Документы
Культура Документы
noreports.com/variable-and-variable-functions-in-business-objects/ 1/3
Variable and @variable functions in
Business Objects
Posted on March 23, 2012 by Business Objects
Variable : Formula with a name.
It can be used with every report feature and can be used anywhere on the report.
The @Variable function syntax:
@Variable()
@Variable(BOUSER)
BOUSER : contains username with which you login.
@variable() function is not meant to be used for prompts but can act like @prompt. There are
some limitations using @Variable() function:
- you dont have parameters such as @prompt ()
- you cant control type
- you cant use LOVs in @variable ()
- you cant have default value in @variable ()
- you cant have multi select in @variable ()
- multiple @variable () you cant control the display order.
Business Objects Official @Variable definition:
The @Variable function is used, for example, in the WHERE clause to call the value assigned
to one of the following types of variables:
BusinessObjects system variables
Report variables
No Reports
SAP Business Objects, Data Warehousing, Sql and SAP HANA
7/17/13 Variable and @variable functions in Business Objects | No Reports
noreports.com/variable-and-variable-functions-in-business-objects/ 2/3
Language (Locale) variables
Operating system variables
Custom variables for Desktop Intelligence
BusinessObjects system variables
BOUSER user login
DBUSER database user name
DBPASS database user password
(The returned data is then restricted based on that BusinessObjects
users login.)
Report variables
DOCNAME the name of the document
DPNAME the name of the Data Provider
DPTYPE the type of the Data Provider
UNVNAME the name of the universe
UNVID the ID of the universe used
the Begin_SQL parameter that will be executed before the SELECT statement. This can be
used for audit purposes concerning the use of the database. ( To determine which report
query or which universe is used most frequently).
Operating system variables : You can enter Windows environment
variables in order to obtain information about your installation.
You can use the @Variable function with BusinessObjects system variables to restrict data
according to the identity of the currently logged in BusinessObjects user.
In the universe for a human resources database, you have an object called Employee name.
You want to restrict the returned data for Employee name to the values authorized in the
database for each user. This would allow you to control what employee information each user
is allowed to see.
Employees.Employee_Name = @Variable(BOUSER)
When the object Employee name is used in a query, the data is returned only for the value in
the tables that matches the BOUSER value.
Using locale variables:
SELECT *
FROM PRODUCT
WHERE PRODUCT.LANG = @Variable(PREFERRED_VIEWING_LOCALE)
7/17/13 Variable and @variable functions in Business Objects | No Reports
noreports.com/variable-and-variable-functions-in-business-objects/ 3/3
At query time, the variable is replaced by the correct value.
Using report variables
The variables can be referenced in:
The definition of an object: SELECT, WHERE clauses, etc
Filters
The Join expression
The Begin_SQL parameter
You can enter windows environment variables in order to obtain information about your
installation. For example, NUMBER_OF_PROCESSORS, USERNAME.
If you include the following @Variable(NUMBER_OF_PROCESSORS) in a query, the
response will include the number of processors on the machine you are using.
This entry was posted in Business Objects and tagged @Variable('BOUSER'),
@Variable(), BusinessObjects system variables, formula, Language (Locale)
variables, Operating system variables, report variables by Business Objects. Bookmark
the permalink [http://noreports.com/variable-and-variable-functions-in-business-
objects/] .