Query Element is a general name for objects used for building of queries. Each query element has unique 25-digits identification generated by the system (ELTUID - ELenemT Unique IDentification). The unique identification is generated automatically when the element is being saved. Before query and all elements which are in this query are not yet saved, they are represented in the system with temporary IDs which should be replaced by permanent IDs during save procedure. For the reusable elements the most general name or term used for the ELTUID is COMPUID (from COMP onent IUD ). The COMPUID is used in several DB tables containing query definition data and also in OLAP and Run-Time area.
Local Query Element
Query Element which is used as a building block for another Query Element is called Local Query Element. Local query elements can contain other local element in the definition.
Query Element which can be shared between different queries of the same InfoProvider is called Reusable Query Element or Query Component. Query Component can contain other Local and/or Reusable Query Elements in the definition. Query Component additionally always has a user-given Technical Name (COMPID).
Types of Query Elements
The Local Elements in BW are: SHT (Sheet or Drilldown), ATR (Attribute), CEL (Cell), STR (Structure), FML (Formula), SEL (Selection).
The Reusable Query Elements ot Query Components in BW are: REP (Query), SOB (Selection Object or Filter), VAR (Variable), STR (Structure), CKF (Calculated Key Figure), SEL (Reusable Selection or Restricted Key Figure).
The following table demonstrates the relations between Local Elements and Query Components:
|Type||Can be Local?||Can be Reusable?|
Reusable Formula element (FML) has the type Calculated Key Figure (CKF).
The type Restricted Key Figure (RKF) is used only by OLAP processor and not presented in the database tables. Restricted Key Figure is just a reusable selection and the corresponding type is Reusable Component of type SEL .
- Some queries which are created by Ad-Hoc Query Designer and are not saved (only executed in Web browser) are not reusable.
Sub Types of Query Elements
Sub type is an additional specification of the type of Query Element. The property is only available since BW 7.x.
|FML||STM||Structure Member Formula|
|SEL||STM||Structure Member Selection|
|SEL||RKF||Restricted Key Figure|
For other types of query elements the subtype is the same as the main type. For example, ATR or CKF. The subtype of the query elements can be found in the database table RSZELTDIR column SUBDEFTP.
Object Versions of Query Element
Usually query elements might be presented in the database tables in several objects versions (field OBJVERS):
- A - Active version used by the BEx Query Designer and OLAP;
- B - Backup version represents 3.x definition in 7.x system;
- D - Delivery version. The objects created and delivered as SAP Business Content;
- M - Modifiable version. Used in transport. Query elements are imported into a target system in 'M' object version.
- S - A backup object version created by the report SAP_GLOBV_CHECK.