SAP HANA Analytics Catalog BIMC Views Reference en
SAP HANA Analytics Catalog BIMC Views Reference en
1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.20 BIMC_SOURCES. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3.2 SAP HANA SQL Syntax for Passing Parameters and Variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
3.3 SAP HANA MDX Syntax for Passing Parameters and Variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
The SAP HANA Analytics Catalog consists of tables and views with the prefix BIMC located in the schema
_SYS_BI. It contains metadata required by analytic clients such as Analysis Office and Business Objects Cloud.
The metadata is also required for access via MDX.
The SAP HANA Analytics Catalog is populated with metadata when the following analytic models are deployed:
● Calculation views
● Analytic views
● Attribute views (the column CUBE_NAME is filled in with the '$ATTRIBUTE' value for these models)
This catalog can be seen as an analytic extension to the database catalog (schema SYS). However, it also
contains some additional information, like the data type of attributes, so that analytic clients do not need to
read the database catalog as well..
The structure of the analytic catalog is close to that of the ODBO schema rowset specification that can be
found at:
From SP11 onwards most of the views can be queried without the MDX prefix. In such cases, use the schema
_SYS_BI, as shown in the following example:
Sample Code
The following tables still need to be queried with the MDX prefix because they depend not only on the
metadata but on the data as well:
● BIMC_HIERARCHIES
● BIMC_LEVELS
● BIMC_MEMBERS
Sample Code
Note
We recommend not to use the schema "_SYS_BI" when the statements are prefixed with MDX. From SPS12
onwards, the MDX prefix is required only for HIERARCHIES, LEVLES, and MEMBERS.
A view of the BIMC_ALL_CUBES table with restriction on INTERNAL_CUBE = 0. Displaying only externally
visible views (cubes). The BIMC_CUBES view lists only those views for which the user has select privileges, so
the list of cubes displayed to the end user can be restricted by using SQL privileges. Relevant columns that
need to be requested to get repository texts in column DESCRIPTION for versions below SPS10: CUBE_NAME
and CATALOG_NAME
This table contains one header entry for each deployed view (a cube or a view enabled for multidimensional
reporting). The columns CATALOG_NAME, SCHEMA_NAME and CUBE_NAME have the same semantics and
are included in all the other tables. This table is currently not accessible with the MDX prefix. Attribute views
do not appear in it.
Note
This table is currently not accessible with the MDX prefix. Attribute views do not appear in it.
Table 1:
Column Description
CUBE_ID Unique identifier for the view (this ID is not stable and is only
used for internal purposes)
QUALIFIED_NAME Available from SP11 (for HDI). Contains the full qualified
name (including namespace, if configured) of an HDI-based
view - for example, sap.fi::CostCenter. Contains null for
Repo 1 views.
SCHEMA_UPDATED_BY Contains the user name that last activated the cube
Note
In case an analytic view is deployed as an OLAP View with
a Calculation View on top, the type will be CALC. See
"SYS"."VIEWS"."VIEW_TYPE"
Sample Code
select c.*from
_sys_bi.bimc_all_authorized_cubes
as c
left outer join
_sys_bi.bimc_all_dimensions as d
on c.catalog_name =
d.catalog_name and
c.catalog_name =
d.dimension_catalog_name and
c.cube_name =
d.cube_name and
c.cube_name =
d.dimension_name
where c.QUALIFIED_NAME is null and
( c.internal_cube = 0 or
d.is_private_attribute = 0 )
union all
select * from
_sys_bi.bimc_all_authorized_cubes
where qualified_name is not null
and cube_type in ('CUBE',
'DIMENSION');
This view contains the same columns as BIMC_ALL_CUBES but lists only the views for which the user has
SELECT privileges. It also shows views of the data category DIMENSION and DEFAULT, while BIMC_CUBES
only shows views of data category CUBE.
This view is available from HANA 2.0 SPS00 onwards. Many clients need to offer cubes and dimensions
(master data reporting) to their users. Retrieving the right rows is somewhat complicated and the view
BIMC_REPORTABLE_VIEWS returns the correct views. The view has the same columns as
BIMC_(ALL_AUTHOIRZED_)CUBES. As long as this view is not there, you can use the following select
statement from SPS11 onwards:
Sample Code
This table contains one entry for each dimension of the model, information about attribute views (in that case,
the column CUBE_NAME is filled with '$ATTRIBUTE'), and one entry for the Measures dimension.
Table 2:
Column Description
SCHEMA_NAME Deployment schema. For XSC: it will be filled with the de
ployment schema _SYS_BIC. For XSA or HDI: It contains the
name of the runtime container.
QUALIFIED_NAME Available from SP11 (for HDI). Contains the full qualified
name (including a namespace, if configured) of an HDI-
based view - for example, sap.fi::CostCenter. Contains null
for Repo 1 views.
This virtual table contains the hierarchies. The modeled hierarchies are stored here and, in addition, one
(attribute) hierarchy for each dimension attribute is created in this table automatically.
Table 3:
Column Description
QUALIFIED_NAME Available from SPS11 onward (for HDI). Contains the full
qualified name (including a namespace, if configured) of an
HDI-based view - for example, sap.fi::CostCenter. Contains
null for Repo 1 views.
Note
Select this column only if it is really needed. If DE
FAULT_MEMBER is selected the hierarchies need to be
instantiated first to fulfill the query
Sample Code
LEAF_ATTRIBUTE Contains the attribute representing the leaf level of the hier
archy.
Note
The Not Assigned Member option in hierarchies in
HANA models allows MDX/MDX/InA/SQL queries
on HANA models to include booked values in facts
that have no corresponding masterdata values in
the respective hierarchies.
The ODBO specification requires support for restrictions on the rows returned - CATALOG_NAME,
SCHEMA_NAME, CUBE_NAME, DIMENSION_UNIQUE_NAME, HIERARCHY_UNIQUE_NAME,
HIERARCHY_NAME. You can use any predicates listed here in your WHERE clause (without wildcards).
Note
A single * wildcard for "all fields" is supported but no other wildcards; otherwise you must explicitly list the
fields that you want to fetch.
Currently you must also specify a WHERE clause with at least one predicate in your SQL to constrain the
results so that you do not request all hierarchies from all dimensions in all cubes from all catalogs.
A simple ORDER BY is also allowed. The requirement is that any fields in the ORDER BY statement must be
present in the result set. For example, you cannot have the following statement because C will not be in the
results set.
Sample Code
Note that the ODBO specification specifies that the sort order should be by CATALOG_NAME,
SCHEMA_NAME, CUBE_NAME, DIMENSION_UNIQUE_NAME, HIERARCHY_UNIQUE_NAME. The code will
return results in this order. You do not need to specify an ORDER clause unless you need any other ordering.
Table 4:
Column Description
QUALIFIED_NAME Available from SPS11 onwards (for HDI). Contains the full
qualified name (including a namespace, if configured) of an
HDI-based view - for example, sap.fi::CostCenter. Contains
null for Repo 1 views.
LEVEL_ID Unique identifier for the level. (No longer exists or not sup
ported)
LEVEL_UNIQUE_NAME Unique name of the level in MDX style. For example, [Time].
[Fiscal_Year].[Fiscal_Period]
● MDLEVEL_TYPE_REGULAR (0x0000)
● MDLEVEL_TYPE_ALL (0x0001)
● MDLEVEL_TYPE_TIME_YEARS (0x0014)
● MDLEVEL_TYPE_TIME_HALF_YEAR (0x0024)
● MDLEVEL_TYPE_TIME_QUARTERS (0x0044)
● MDLEVEL_TYPE_TIME_MONTHS (0x0084)
● MDLEVEL_TYPE_TIME_WEEKS (0x0104)
● MDLEVEL_TYPE_TIME_DAYS (0x0204)
● MDLEVEL_TYPE_TIME_HOURS (0x0304)
● MDLEVEL_TYPE_TIME_MINUTES (0x0404)
● MDLEVEL_TYPE_TIME_SECONDS (0x0804)
● MDLEVEL_TYPE_TIME_UNDEFINED (0x1004)
The BIMC_LEVELS table is a virtual table. It does not exist physically. The metadata containing the results
from a SELECT FROM BIMC_LEVELS statement is held inside internal data structures and a results set for the
SELECT clause is constructed from those internal data structures and not from an SQL table. Any SQL query
issued against it goes through a minimal SQL parser inside the MDX engine, not through the regular SQL
The ODBO specification requires support for restrictions on the rows returned - CATALOG_NAME,
SCHEMA_NAME, CUBE_NAME, DIMENSION_UNIQUE_NAME, HIERARCHY_UNIQUE_NAME, LEVEL_NAME,
LEVEL_UNIQUE_NAME. You can use any predicates listed here in your WHERE clause (without any wildcards).
Note
A single * wildcard for "all fields" is supported but no other wildcards. If you do not use that wildcard, you
must explicitly list the fields that you want to fetch.
Currently you must also specify a WHERE clause with at least one predicate in your SQL too, so you cannot
request all levels of all hierarchies of all dimensions of all cubes.
A simple ORDER BY is also allowed. The requirement is that any fields in the ORDER BY must be present in the
results set. For example, you cannot have the following statement because "c" is not in the result set.
Sample Code
According to the ODBO specification, the sorting order should be by CATALOG_NAME, SCHEMA_NAME,
CUBE_NAME, DIMENSION_UNIQUE_NAME, HIERARCHY_UNIQUE_NAME, LEVEL_NUMBER. The code returns
results in this order. You do not need to specify an ORDER clause, unless you need another type of ordering.
Table 5:
Column Description
QUALIFIED_NAME Available from SPS11 (for HDI). Contains the full qualified
name (including a namespace, if configured) of an HDI-
based view - for example, sap.fi::CostCenter. Contains null
for Repo 1 views.
MEASURE_ID Unique identifier for the measure. Note that this is not the
same as the MEMBER_ID for the measure).
Note
The field no longer exists and is not supported. Please do
not request this field in your SQL statements.
● 1 = SUM (= MDMEASURE_AGGR_SUM)
● 2 = COUNT (= MDMEASURE_AGGR_COUNT),
● 3 = MIN (= MDMEASURE_AGGR_MIN)
● 4 = MAX (= MDMEASURE_AGGR_MAX)
Note
For more information, see MEASURES Rowset
Note
This does not always mean that the client can use this
aggregation function to further aggregate the measure
because for calculated measures and for counters this
usually results in wrong numbers. Client aggregation is
only allowed if MEASURE_AGGREGATABLE = 1.
MEASURE_AGGREGATABLE INTEGER:
NUMERIC_SCALE NULL except for DATA_TYPE 131 where the scale of the
measure is stored
UNIT_TYPE Contains the currency code (for example, USD, EUR and so
on), if the measure has a fixed unit or currency; has same
value as BIMC_DIMENSION_VIEW-UNIT_TYPE.
The BIMC_MEASURES table is a virtual table. It does not exist physically. The metadata containing the results
from a SELECT FROM BIMC_MEASURES statement is held inside internal data structures. A set of results for
the SELECT clause is constructed from those internal data structures and not from an SQL table. Any SQL
query issued against it goes through a minimal SQL parser inside the MDX engine, not through the regular SQL
processor. The minimal parser can carry out any request required by ODBO. The ODBO specification does not
support wildcards and the minimal SQL parser does not support them either.
Note
A single * wildcard for "all fields" is supported but no other wildcards. If you do not use that wildcard, you
must explicitly list the fields that you want to fetch.
Currently, you must also specify a WHERE clause with at least one predicate in your SQL too, so you cannot
request all levels of all hierarchies of all dimensions of all cubes.
A simple ORDER BY statement is also allowed. The requirement is that any fields in the ORDER BY statement
must be present in the results set. For example, you cannot have the following statement because "c" is not in
the result set.
Sample Code
According to the ODBO specification, the sorting order should be by CATALOG_NAME, SCHEMA_NAME,
CUBE_NAME, and MEASURE_NAME. The code returns results in this order. You do not need to specify an
ORDER clause, unless you need another type of ordering.
For releases below SPS10, the relevant columns that need to be requested to get repository texts in column
MEASURE_CAPTION are CUBE_NAME, CATALOG_NAME, and MEASURE_NAME.
A virtual table containing details about the members of the levels within the cube.
Table 6:
Column Description
QUALIFIED_NAME Available from SPS11 (for HDI). Contains the full qualified
name (including a namespace, if configured) of an HDI-
based view - for example, sap.fi::CostCenter. Contains null
for Repo 1 views.
HIERARCHY_UNIQUE_NAME Unique name of the hierarchy that the member belongs to.
PARENT_COUNT The number of parents the member has. 1 row for the mem
ber will be present for each parent. Currently, only 0 or 1 pa
rents are valid.
MEMBER_KEY For leaf children the key value of the underlying dimension
table if it exists or NULL otherwise
BIMC_MEMBERS table is a virtual table and does not exist physically exist. The meta data comprising the
results from a SELECT from BIMC_MEMBERS statement is held inside internal data structures. A result set for
the SELECT statement is constructed from those internal data structures and not from an SQL table. Any SQL
issued against it goes through a minimal SQL parser inside the MDX engine, not through the regular SQL
processor. The minimal parser can carry out any request required by ODBO. The ODBO specification does not
support wildcards and the minimal SQL parser does not support them either.
The ODBO specification requires support for restrictions on the rows returned. For more information, see
Restrictions in the MEMBERS Rowset
You can use any predicates listed here in your WHERE clause. In that particular case, there is no wildcard
support within SQL, so you need to explicitly list the fields that you want to fetch.
You must also specify a WHERE clause with at least one predicate in your SQL statement. A single * wildcard
for "all fields" is supported.
A simple ORDER BY is also allowed. The requirement is that any fields in the ORDER BY clause must be
present in the result set. For example, you cannot have the statement below because "c" will not be in the
result set.
According to the ODBO specification, the order of sorting should be by CATALOG_NAME, SCHEMA_NAME,
CUBE_NAME, DIMENSION_UNIQUE_NAME, HIERARCHY_UNIQUE_NAME, LEVEL_UNIQUE_NAME,
LEVEL_NUMBER, and MEMBER_ORDINAL. The code returns results in this order and you do not need to
specify an ORDER clause, unless you need another type of sorting.
Note
In order to calculate the members, you need to pass the parameter values entered by the user. For that
purpose, use the following syntax:
This is a virtual view of BIMC_PROPERTIES with the filter WHERE PROPERTY_TYPE = 4 and COLUMN_FLAG =
'Dimension Attribute'. It contains one row with the most prominent properties for each attribute and each
measure of the cube. This view is not known to the database catalog, so you need to use the MDX prefix when
querying it.
Table 7:
Column Description
QUALIFIED_NAME Available from SPS11 (for HDI). Contains the full qualified
name (including a namespace, if configured) of an HDI-
based view - for example, sap.fi::CostCenter. Contains null
for Repo 1 views.
COLUMNOBJECT_NAME The catalog name of the view to get the value help from. The
format is "<schema>"."<name>".
This is the column view which is generated either for the di
mension (attribute or calculation) view for attributes origi
nating from the dimension, or for the cube (analytic or cal
culation) view for attributes coming from the data founda
tion or fact table.
DIMENSION_COLUMN_NAME The column name in the value help view stored in COLUM
NOBJECT_NAME. Since aliasing dimension attributes inside
the star join are allowed, this name might be different from
COLUMN_NAME. The name is unique only within the value
help view stored in COLUMNOBJECT_NAME.
COLUMN_NAME The column name in the main view, that is the view name in
BIMC_CUBES.COLUMN_OBJECT. This name is globally
unique in the cube (might be aliased).
COLUMN_TYPE Either "NULL" or the column engine data type. For example
66 = fixed, 73 = int, 83 = string, and so on.
COLUMN_SQL_TYPE The SQL type of the column as in the official SQL data type
reference.
In case you need to specify length for the data type, you
need to add it in brackets without any spaces. For example,
VARCHAR(12), FLOAT(2) or ALPHANUM(66). In case a pre
cision and scale is specified, it is added in brackets without
spaces separated by a comma, for example DECIMAL(12,2)
where 12 is the precision and 2 the scale.
COLUMN_CAPTION The label (or caption) of the column. Use this (language-de
pendent) text to populate the caption or the label of the col
umn or the attribute.
DESC_OBJECT_NAME The catalog name of the view to look up the dimension de
scription attribute (format "<schema>"."<name>"). Not rel
evant for HANA views because it contains always the same
view as COLUMNOBJECT_NAME. It is relevant for CDS ana
lytics because texts for dimension attributes can be re
trieved from separate text tables or views.
MEASURE_AGGREGATABLE INTEGER:
UNIT_TYPE Contains the currency code (for example, USD, EUR , and so
on) in case the measure has a fixed unit or currency
MEASURE_DISPLAY_FOLDER The name of the measure display folder. For more informa
tion, see BIMC_MEASURES.
CONVERT_TO_EXTERNAL_FUNCTION Available from SPS12: Full qualified name of the scalar func
tion for converting the values of this field into the external
format
CONVERT_TO_INTERNAL_FUNCTION Available from SP12: Full qualified name of the scalar func
tion for converting the values of this field into the internal
format
Note
The column may be filled in with NULL, if the model was
activated after upgrading to HANA 2.0 SPS01. This prop
erty cannot be derived from KEY_COLUMN_NAME be
cause it is also filled in for the first attribute in each di
mension. In a star join, this property is inherited from the
dimension views.
Table 8:
Column Key Description
SCHEMA_NAME STRING
QUALIFIED_NAME Available from SPS11 (for HDI). Contains the full qualified name (including a
namespace, if configured) of an HDI-based view - for example, sap.fi::CostCen
ter. Contains null for Repo 1 views.
COLUMN_NAME Yes The unique attribute or column name in the view (may be aliased and thus differ
ent from the column name in the dimension view)
PARENT_COL Yes The name of the parent attribute or column. This is an attribute or column that
UMN_NAME has an n:1 relationship with the current element. For example, if two records have
the same value in COLUMN_NAME, they also have the same value for the column
in PARENT_COLUMN_NAME. The example assumes that you have a geography
dimension region, country, country_population and continent. Then you would
define a relation from country to country_population (the data must fit to this
setting). As a result the attribute country_population can be used as a hierarchy
level attribute for the level country in case a leveled hierarchy is defined on the
fields
This tables contains the list of variables and parameters for each cube.
Table 9:
Column Key Type Description
QUALI STRING Available from SPS11 onwards (for HDI). Contains the full qualified
FIED_NAME name (including a namespace, if configured) of an HDI-based view -
for example, sap.fi::CostCenter. Contains null for Repo 1 views.
COL INT Either NULL or the column engine data type. For example, 66 = fixed,
UMN_TYPE 73 = int, 83 = string, and so on.
COL STRING The (internal) column engine data type description (FIXED, INT,
UMN_TYPE_D STRING, and so on). Use the official COLUMN_SQL_TYPE wherever
possible.
COL STRING The SQL type of the parameter or variable as in the official SQL data
UMN_SQL_TYP
type reference.
E
In case you need to specify length for the data type, it is added in
brackets without any spaces. For example, VARCHAR(12), FLOAT(2)
or ALPHANUM(66). In case precision and scale need to be specified,
they are added in brackets without spaces and separated by a
comma. For example, DECIMAL(12,2) where 12 is the precision and 2
the scale.
VALUE_TYPE STRING Specifies how the values for the variable are determined. Same val
ues as the EMF enumeration: empty / Currency / UnitOfMeasure /
Date / AttributeValue / StaticList
VALUE_ENTITY STRING Contains the name of the catalog view or the catalog table for the
value help of the variable. Only relevant if BIMC_VARIA
BLE.VALUE_TYPE = AttributeValue.
VALUE_EN STRING Use this name to query BIMC_DIMENSION_VIEW in order to find out
Üe�‚ˇ„UBÖ"€tE\ÑÁfë_²ßj!‹ the description field of VALUE_ATTRIBUTE. If such a description field
TORY_FQN exists, it should be displayed in the value help in addition to the
VALUE_ATTRIBUTE. Contains null if the value entity is a pure catalog
object.
SELEC STRING What kind of selections are possible - same values as the EMF enu
TION_TYPE
meration:
DE STRING Default value of the variable. If you use an expression like "da
FAULT_VALUE tae(now())" as a default value, the values will be calculated when the
query "MDX select from BIMC_VARIABLES" is executed.
RANGE_DE INT 0=false: no range default values exist, only a single-valued default
FAULTS_EXIST
value in column DEFAULT_VALUE or no default value.
HIERAR STRING Available from SPS10 onwards. If this field is filled in, a hierarchical
value help must be provided. This field contains the name of the hier
CHY_VIEW
archy view to be used for the value help.
Note
The hierarchy view is based on the column view stored in
VALUE_ENTITY. If a parameter mapping is defined from the cur
rent view to VALUE_ENTITY, this parameter mapping needs to be
applied to the hierarchy view as well.
HIERAR STRING Available from SPS11 onwards; contains the name of the hierarchy in
CHY_NAME addition to HIERARCHY_VIEW. Is filled in only if HIERARCHY_VIEW is
filled in.
CON STRING Available from SPS12 onwards; contains the full qualified name of the
çÃS KÐN.£’˚{8ù1.˙2€–“Ų scalar function for converting the values of this field into the external
çÃSKÐN.£−˚e8á1>˙+€Łłåázä format.
TION
CON STRING Available from SPS12 onwards; contains the full qualified name of the
çÃS KÐN.£’˚{8ù1.˙2€›łÅ² scalar function for converting the values of this field into the internal
çÃSKÐN.£−˚e8á1>˙+€Łłåázä format.
TION
CONVER INTEGER Equals 1, if the internal or external conversion functions are order
çÃSKÜN3£−˚{8â13;} preserving and 0, if not.
çÃS˙KÐN.£ł˚t8ÿ1$˙>€–⁄åôzä
ING
HIERAR STRING Available from SPS11onwards; contains the node style to be used for
CHY_NODE_ST the hierarchy assigned to the variable if you have hierarchy filter vari
YLE ables. It Is filled in with "null" in case the variable is not used as hier
archy filter variable. The possible values and implications for clients
are:
Table 10:
Value Syntax for nodes Value to pass to the
hierarchy node col
(hierarchy mem
umn
bers)
HIERAR INT Available from SPS11 onwards: If the value is a positive number, only
CHY_LEVEL_N nodes from this level may be used via the value help. If the value is
UMBER NULL, all nodes can be selected via the value help.
This view fully corresponds to BIMC_VARIABLE and includes a privilege check. It can be used to securely read
all variables, including the unassigned ones.
The table contains the range defaults for variables and parameters. The column
BIMC_VARIABLE.RANGE_DEFAULTS_EXIST = 1 indicates that range defaults exist. In case expressions like
"datae(now())" are used as a default value, the values (LOW and HIGH) are calculated when the query "MDX
select from BIMC_VARIABLE_RANGE_DEFAULTS" is executed.
Table 11:
Column Key Type Description
SCHEMA_NAM STRING Deployment schema. For XSC, it is be filled in with the deployment
E schema _SYS_BIC. For XSA or HDI, it contains the name of the run
time container.
QUALI STRING Available from SPS11 (for HDI). Contains the full qualified name (in
FIED_NAME cluding name space if configured) of an HDI based view - for exam
ple, sap.fi::CostCenter. Contains null for Repo 1 views.
LINE_NUMBER Yes INT Line number in case the value is multi-line enabled
Clients don not need to read this field, because a low expression is
evaluated into a constant at the time of the "MDX select from
BIMC_VARIABLE_RANGE_DEFAULTS " query.
OPTION STRING Range option (EQ, BT, LE, GE, LT, GT, CP, NL [= IS NULL] )
Table 12:
Column Key Type Description
QUALI STRING Available from SPS11 onwards (for HDI). Contains the full qualified
FIED_NAME name (including name space if configured) of an HDI based view - for
example, sap.fi::CostCenter. Contains null for Repo 1 views.
Note
If you have CDS views, this column is filled in with the name of the
hierarchy or attribute. Clients should not rely on other model ele
ment names because this is considered internal (private) informa
tion of the view. If you have hierarchies, the name needs to be in
terpreted because the clients have to access the corresponding
hierarchy view which has its own set of parameters.
Note
In the case of CDS views, this column is filled in only for hierar
chies and variables. Clients should not rely on other model ele
ment types because this is considered internal (private) informa
tion of the view. For hierarchies, the type needs to be interpreted
because clients have to access the corresponding hierarchy view
which has its own set of parameters.
PLACE STRING If this field is filled in, the value for the parameter has to be passed to
HOLDER_NAM
the view (or the hierarchy view in case MODEL_ELEMENT_TYPE =
E
'Hierarchy') by using of the PLACEHOLDER syntax. In that case, the
value of the field contains the placeholder name. The SQL for access
ing the (hierarchy) view will look like this:
Note
Use the SELECT statement above for numerical typed parame
ters.
Note
Even a single value has to be escaped with a triple apostrophe in
case the parameter is multi-valued.
Code Syntax
A view combining the fields from the variable tables BIMC_VARIABLE_RANGE_DEFAULTS and
BIMC_VARIABLE_ASSIGNMENT.
Related Information
This table contains the mapping of variables, parameters, or attributes to their value help views. Clients read
from this table to find out how parameters and variables have to be filled in when querying the value help
(target) view.
Table 13:
Column Key Type Description
CATA Yes STRING REPO 1: Package of the view; HDI: <Runtime container>.<Name
LOG_NAME space>, for example, RTC1.sap.fi; In case of freestyle names, just
<Runtime container>, for example, RTC1.
QUALI STRING Available from SPS11 (for HDI). Contains the full qualified name (in
FIED_NAME cluding name space if configured) of an HDI based view - for exam
ple, sap.fi::CostCenter. Contains null for Repo 1 views.
TARGET_VARI Yes STRING Name of the target variable or parameter of the value help view. It
ABLE_NAME may be left empty (empty string) if the mapping points directly to an
attribute name (instead of a variable).
¼Tï?¡˜õ`_i² ter.
UTE_NAME ● The target attribute or column in case TARGET_VARIA
BLE_NAME denotes a variable or the mapping is directly linked
to an attribute name. You have to filter this attribute via the
WHERE clause of the SELECT statement when accessing the
target view.
TARGET_DE STRING Name of the default value of the target variable or parameter of the
FAULT_VALUE
TARGET_VIEW. Null in case no default is defined or the mapping is di
rectly linked to an attribute name (instead of a variable).
SOURCE_VARI STRING Name of the source variable or parameter of the cube or null in case
ABLE_NAME of constant mapping, that means if CONSTANT_VALUE is filled in. If
the value for this variable has already been entered by the user, the
value has to be passed on to the target view.
CON STRING Constant value to be used for the target variable or parameter. Null in
STANT_VALUE case SOURCE_VARIABLE_NAME is filled in - in that case, the con
stant value has to be passed on to the target view.
TARGET_PLA STRING ● Placeholder name to be used in the SQL statement for the TAR
?lW>œ½— GET_VIEW - see BIMC_VARIABLE_ASSIGNMENT.PLACE
HOLDER_NAM HOLDER_NAME in case TARGET_VARIABLE_NAME denotes a
E parameter.
● Null in case TARGET_VARIABLE_NAME denotes a variable or is
empty.
A table containing the static values allowed for the variable, if BIMC_VARAIBLE.VALUE_TYPE = 'StaticList'. In
the modeler, you can provide a list of names and descriptions for these types of variables.
Table 14:
Column Key Type Description
CATA Yes STRING REPO 1: Package of the view; HDI: <Runtime container>.<Name
LOG_NAME space>, for example, RTC1.sap.fi; In case of freestyle names, just
<Runtime container>, for example, RTC1.
QUALI STRING Available from SPS11 onwards (for HDI). Contains the full qualified
name (including name space if configured) of an HDI based view - for
FIED_NAME
example, sap.fi::CostCenter. Contains null for Repo 1 views.
ORDER Yes INT Order in which to present the variables on the user interface
DESCRIPTION STRING Description of the static list value - the text IDs for these descriptions
are defined by %V_<Variable Name>%<Static Value Name>.
The following columns need to be requested to get repository texts in column DESCRIPTION:
Table 15:
Column
CUBE_NAME
CATALOG_NAME
VARIABLE_NAME
NAME
For example, if you have an attribute in the analytic view containing 'A' for actuals and 'P' for planning data, you
could define a "ValueType" variable of type "Static List" and provide the following entries in the list:
Table 16:
Name Description
P Planned values
A Actual values
Then the clients should render a dropdown list for entering just one of these two values at query execution
time. The Name value is passed on to the engine as filter value.
This is a virtual table which retrieves information from the BIMC_VARIABLE_VIEW view. It is a schema rowset
table containing metadata about given variables. The structure of the table closely corresponds to the
schema rowset table for variables in BW.
2.20 BIMC_SOURCES
This view is available only for HDI-based calc views and contains the XML source code of the view.
Table 17:
QUALI Yes STRING Full qualified name (including namespace, if configured) of an HDI
FIED_NAME based view - for example, sap.fi::CostCenter.
The view BIMC_SOURCES is based on the new table BIMC_ALL_SOURCES and filters the result according to
the SQL privileges of the user.
The objective of SAP HANA variables and input parameters is to make the HANA information models more
dynamic by allowing parameter and column filtering via variables. The values for these variables are
determined before executing the view - typically, by asking the user to enter the value manually or to choose
one from a drop-down list. Alternatively, the SAP HANA engine can derive the variables by reading their values
from a separate table.
Definitions
● Variable: a variable is a directive for view consumers to filter certain columns. For BI clients, such as
Advanced Analytics for Office, this means to produce a variable user interface. On this user interface users
can enter filter values they want to use for the current view execution.
Variables define filters on an attribute of the view. Therefore they always have to be assigned to an
attribute. The variable values are passed to the engine via the WHERE-clause of the SQL statement.
Variables are not known to the engine but only to clients like Data Preview, MDX, Advanced Analysis for
Office or BO Explorer. It is the task of the client to convert the user input into a WHERE-clause when
accessing the data.
● Parameter (Input Parameter): It is used to parameterize the view execution - for example, as a part of filter
or calculated column expressions or to specify the target currency of a conversion. It is handled by the
view consumers in the same manner as variables, it is displayed on the variable UI.
A parameter defines the internal parameterization of the view. This means that the engine needs to know
it and uses the parameter value during the execution - for example, to calculate a formula for a calculated
measure. The parameter value is passed to the engine via the PLACEHOLDER clause of the SQL
statement. At runtime a parameter can be filled by one single value.
● Derived parameter: a parameter the value of which is derived automatically at run time without manual
user input. For the end user there is no distinction between variables and parameters. Both appear as
input fields on the variable pop up.
The distinction between variables and parameters exists only in the modeler. When it comes to consumption,
there is no difference between the two variable types. In the next sections the term "variable" also means
parameter, if not explicitly mentioned otherwise.
Client applications pass the entered values for variables and parameters to the engine as follows:
● Variables: the client converts them into fragments of the WHERE clause. Variables can be identified by
BIMC_VARIABLE_VIEW table, column PLACEHOLDER_NAME = null.
● Parameters: the client converts them into fragments of the PLACEHOLDER clause. Parameters can be
identified by BIMC_VARIABLE_VIEW table, column PLACEHOLDER_NAME != null
If a placeholder appears twice in the assignment table, it may occur only once as a placeholder in the SQL
statement.
Sample Code
Use the following select statement for string-typed parameters (the string values need to be escaped by
double apostrophe '). If the parameter is multi-valued then even a single value has to be escaped by a triple
apostrophe.
...SELECT ... FROM "schema"."view" ('PLACEHOLDER' = ('$$MULTI_VALUE_PARAM_STRING$
$', '''Value1'',''Value2'''))
Multiple single values are supported for some parameters. They have to be put in the PLACEHOLDER clause
as follows depending on the data type. Use the following SELECT statement for numerical typed parameters:
Sample Code
SAP HANA supports the use of variables in MDX queries. The variables are an SAP-specific enhancement to
standard MDX syntax.
You can specify values for all mandatory variables that are defined in SAP HANA studio for various modeling
entities. The following example illustrates how to declare SAP HANA variables and their values:
Sample Code
MDX
Select
From [SALES_DATA_VAR]
An MDX SELECT statement in SAP HANA enables you to send values for variables defined within modeling
views.
Analytic and calculation views may contain variables bound to specific attributes. When calling the view, you
can assign values to those variables and use them to filter results, for example.
SAP HANA supports an extension to MDX where you can assign values to variables defined in views by adding
a SAP VARIABLES clause in your select statement. Here is the syntax for a SELECT statement:
A variable or a parameter can have a default value which is used in the following cases:
It can make sense to define a mandatory parameter which is prefilled in the variable UI. Mandatory in the view
model means semantically mandatory - the data may be inconsistent, if the parameter is not provided
because the data is then aggregated across SAP-client values (for example, multiple tenants). From the engine
point of view, the parameter is technically mandatory if no default value is provided and the mandatory flag is
set in the modeler.
In case the parameter is not mandatory and no default value is provided, the calc engine uses the empty string
('') as parameter (default) value.
The variable UI must enforce a user entry for a (semantically) mandatory variable even if a default value exists.
For example, if the user deletes the proposal for a mandatory variable in the variable UI, the UI displays a
warning message prompting the user to enter a value for the variable. In the end, the entered value is sent to
the engine.
You can use expressions as special default values. Those expressions are specified in the variable or
parameter wizard expression editor, for example date(Now()).
For a metadata request to the BIMC_VARIABLE table, the default value must be calculated and not read from
the table. For example:
Note
If both the default value and the default expression are filled in, which should not happen, the default value
takes precedence. In case the default value is an expression, it will be calculated at the time the
BIMC_VARIABLE_VIEW table is read and it will be returned in the field DEFAULT_VALUE. In that case the
consumer still has as to use the MDX prefix.
Value help consisting of a list of values is provided wherever possible. The way to retrieve this list depends on
the value type of the variable.
Currency Values
The currency codes and their texts can be read from the tables TCURC and TCURT. However, the database
schema in which to look for the TCUR* tables is not fixed but chosen by the model developer and stored at the
header level of the information model. There may be even several database schemas containing the TCUR*
tables. During the deployment of the information models the default schema is stored in
BIMC_CUBES.DEFAULT_SCHEMA. The clients need to read the schema from there to make sure they are
accessing the right TCUR* tables.
To read all currencies and texts with the language, use the following SELECT statement:
Sample Code
Note
It is recommended not to use the session client (mandt = (SELECT SESSION_CONTEXT( 'CLIENT' ) FROM
"DUMMY") because you can define different clients for the currency conversions in a single view.
UnitOfMeasure Values
Unit of measures should be treated as currencies. The handling with respect to schema and client is exactly
the same. (Tables T006, T006A).
To read all units and texts with the language, use the following SELECT statement:
Sample Code
Date Values
Date values display a date selection dialog (either pass as SQL date in the form YYYY-MM-DD or ERP CHAR 8
date).
The attribute to generate the dynamic value help list can be derived from
BIMC_VARIABLES.VALUE_ATTRIBUTE. As the value lists can be derived from an attribute of the model itself
or a referenced model or table, the following cases need to be distinguished:
The most common scenario for passing and mapping of variables or parameters between view models is when
a calculation view is built on top of other view models that have variables. You can pick variables from the
underlying models and take them over to define variables on the calculation view. You can map one variable of
the edited calc view to several variables of the underlying view models that are reused as data sources in the
edited calc view.
Passing Variables
Parameter or placeholder variables: these variables can be passed on to the underlying views because they are
mandatory in most cases.
Attribute or filter variables: these variables cannot be passed down because they are not known by the engine.
Parameter Mapping
To cover all use cases, it is possible to define a mapping from a parameter or variable of the main view to a
parameter or variable of the external value help view. If the user has already filled in parameters or variables on
the variable UI, the client will proceed as follows:
● Send the corresponding values to the mapped target parameters of the value help (or dimension) view if
the mapping is to a parameter.
● Filter the attributes of the value help (or dimension) view accordingly if the mapping is to a variable (or an
attribute).
All information needed for querying the external value help view is provided in the table
BIMC_VARIABLE_MAPPING - the clients do not need to read the BIMC_VARIABLE table again for the external
value help view.
Coding Samples
Any software coding and/or code lines / strings ("Code") included in this documentation are only examples and are not intended to be used in a productive system
environment. The Code is only intended to better explain and visualize the syntax and phrasing rules of certain coding. SAP does not warrant the correctness and
completeness of the Code given herein, and SAP shall not be liable for errors or damages caused by the usage of the Code, unless damages were caused by SAP
intentionally or by SAP's gross negligence.
Accessibility
The information contained in the SAP documentation represents SAP's current view of accessibility criteria as of the date of publication; it is in no way intended to be
a binding guideline on how to ensure accessibility of software products. SAP in particular disclaims any liability in relation to this document. This disclaimer, however,
does not apply in cases of willful misconduct or gross negligence of SAP. Furthermore, this document does not result in any direct or indirect contractual obligations
of SAP.
Gender-Neutral Language
As far as possible, SAP documentation is gender neutral. Depending on the context, the reader is addressed directly with "you", or a gender-neutral noun (such as
"sales person" or "working days") is used. If when referring to members of both sexes, however, the third-person singular cannot be avoided or a gender-neutral noun
does not exist, SAP reserves the right to use the masculine form of the noun and pronoun. This is to ensure that the documentation remains comprehensible.
Internet Hyperlinks
The SAP documentation may contain hyperlinks to the Internet. These hyperlinks are intended to serve as a hint about where to find related information. SAP does
not warrant the availability and correctness of this related information or the ability of this information to serve a particular purpose. SAP shall not be liable for any
damages caused by the use of related information unless damages have been caused by SAP's gross negligence or willful misconduct. All links are categorized for
transparency (see: http://help.sap.com/disclaimer).