The schema rowset SAP VARIABLES contains the list of SAP variables in the rows and, in the columns, information about the properties of SAP variables for a specific QUERY_CUBE.
GUID |
Number of Restrictions |
Restriction Columns |
MDSCHEMA_SAP_VARIABLES |
1 |
CUBE_NAME |
DEFINE_GUID(MDSCHEMA_SAP_VARIABLES, 0xcaff2c30, 0x30d, 0x11d3, 0x87, 0x1, 0x0, 0x10, 0x5a, 0x18, 0x50, 0x2e);
Column Name |
Type Indicator |
Description |
CATALOG_NAME |
DBTYPE_WSTR |
Name of Catalog to which the Cube belongs |
SCHEMA_NAME |
DBTYPE_WSTR |
Not supported |
CUBE_NAME |
DBTYPE_WSTR |
Name of QUERY_CUBE to which the variable belongs |
VARIABLE_NAME |
DBTYPE_WSTR |
Name of variable. A variable name can have leading zeros. For this reason, the provider always returns the name with separators. |
VARIABLE_CAPTION |
DBTYPE_WSTR |
A description (label or caption) associated with the variables that is mainly used for the display. |
VARIABLE_UID |
DBTYPE_GUID |
Variable GUID |
VARIABLE_ORDINAL |
DBTYPE_I2 |
An ordinal number assigned to a variable in the group of variables for a Cube. |
VARIABLE_TYPE |
DBTYPE_I2 |
Variable type. The following values are possible: ● SAP_VAR_TYPE_MEMBER. The variable is a placeholder for a selection for MEMBER_UNIQUE_NAMES. ● SAP_VAR_TYPE_HIERARCHY. The variable is a placeholder for a HIERARCHY_UNIQUE_NAME. ● SAP_VAR_TYPE_NUMERIC. The variable is a placeholder for a numerical value in formulas For more information, see the Constants section. |
DATA_TYPE |
DBTYPE_UI2 |
Data type of variable values. Possible entries here are the types appearing in appendix A of the OLE DB Programmer’s Reference. |
CHARACTER_MAXIMUM_ LENGTH |
DBTYPE_UI4 |
Maximum length of variable values having data type Character. |
VARIABLE_PROCESSING_TYPE |
DBTYPE_UI2 |
Processing type for variable. The following value is possible: SAP_VAR_PROC_TYPE_USER_INPUT. You can manually enter values for the variable before executing the query. With this processing type, only the variables are returned to the OLE Db for OLAP interface.
For more information, see Variable Types and Processing Types: An Overview. |
VARIABLE_SELECTION_TYPE |
DBTYPE_UI2 |
Variable selection type. Variables with type SAP_VAR_TYPE_MEMBER allow the selection of single values, intervals, and complex selection options with a single variable. The following values are possible for the selection types: ● SAP_VAR_SEL_TYPE_VALUE. The variable is replaced by a single value. This is the only possible selection type for variables with type NUMERIC. ● SAP_VAR_SEL_TYPE_INTERVAL. The variable is a placeholder for an interval. ● SAP_VAR_SEL_TYPE_COMPLEX. The variable is a placeholder for a complex selection.
For more information about the display areas of variables in BI, see Details. |
VARIABLE_ENTRY_TYPE |
DBTYPE_UI2 |
Type that shows whether replacing variables is optional or mandatory: The following values are possible for the entry type: ● SAP_VAR_INPUT_TYPE_OPTIONAL. Specifying a value is optional for this variable. ● SAP_VAR_INPUT_TYPE_MANDATORY. You must specify this variable. When no value is specified for the variable, executing the Statement results in termination with an error message. ● SAP_VAR_INPUT_TYPE_MANDATORY_NOT_INITIAL. These variables must be specified. When no value is specified for the variable, executing the Statement results in termination with an error message. An initial field is not a valid entry.
For more information about the creation type of variables, see Details. |
REFERENCE_DIMENSION |
DBTYPE_WSTR |
This column contains a DIMENSION_UNIQUE_NAME for the parameter type SAP_VAR_TYPE_HIERARCHY.
Note that the Dimension must not appear in the QUERY_CUBE. You must select a value for the hierarchy from this dimension. |
REFERENCE_HIERARCHY |
DBTYPE_WSTR |
This column contains a HIERARCHY_UNIQUE_NAME for the variable type SAP_VAR_TYPE_MEMBER.
Note that the hierarchy must not be contained in the QUERY_CUBE. |
DEFAULT_LOW |
Variant |
Either contains a default value for the variable or is zero. The current type of this column is the same as the data type displayed in the column DATA_TYPE. |
DEFAULT_LOW_CAP |
DBTYPE_WSTR |
A description (label or caption) associated with the Default Member. |
DEFAULT_HIGH |
Variant |
Either contains a default value for the variable or is ZERO. This is only important for variables with the selection type SAP_VAR_SEL_TYPE_INTERVAL and SAP_VAR_SEL_TYPE_SELECTION. |
DEFAULT_HIGH_CAP |
DBTYPE_WSTR |
A description (label or caption) associated with the Default Member. |
DESCRIPTION |
DBTYPE_WSTR |
A readable description of the variable. |
To execute an MDX statement that selects data from a parameterized Cube, you need to specify variable values for all obligatory variables in the MDX statement. For more information, see BI-Specific Enhancement: MDX Syntax.
In the C coding, use the following define statements for the constants defined in the schema rowset SAP VARIABLES (see column VARIABLE_TYPE).
#define
SAP_VAR_TYPE_MEMBER 1
#define SAP_VAR_TYPE_NUMERIC 2
#define SAP_VAR_TYPE_HIERARCHY 3
#define SAP_VAR_PROC_TYPE_USER_INPUT 1
#define SAP_VAR_SEL_TYPE_VALUE 1
#define SAP_VAR_SEL_TYPE_INTERVAL 2
#define SAP_VAR_SEL_TYPE_COMPLEX 3
#define SAP_VAR_INPUT_TYPE_OPTIONAL 0
#define SAP_VAR_INPUT_TYPE_MANDATORY 1
#define SAP_VAR_INPUT_TYPE_MANDATORY_NOT_INITIAL 2
See also:
Documentation for OLAP BAPI MDDataProviderBW:
MDDataProviderBW.GetVariables