SAP BW Metadata Changes in 7.1
By Ben Yavuz
In a previous issue of the WebFOCUS Newsletter, we discussed the BEx components and looked at the WebFOCUS synonyms to identify how the BEx components were represented in the created synonyms. In this article we will concentrate on the changes in the BW metadata in WebFOCUS 7.1.
The main change in 7.1 is how the hierarchies are represented in the synonym. Prior to 7.1, all hierarchies are represented using fields corresponding to each level of the hierarchy. Now it's possible to represent a hierarchy as a parent-child relationship.
To be able to create synonyms with parent-child hierarchies you would have to use the "extended synonym" option in the create synonym screen of the web console and then select either the "optimized" or the "parent-child" value for the Htype (Hierarchy Type) selection in the next screen. The parent-child hierarchies will be discussed in more detail toward the end of this article. Release 7.1.3 will have additional features to fully exploit the benefits of parent-child hierarchies. Until then, using them is not recommended.
The changes in the metadata also include usage of new keywords/values for existing attributes to be able to describe the SAP BW metadata better.
Here is a summary of the changes regarding the usage of new keywords/values for existing attributes:
 |
Because of different types of fields in SAP BW a new set of PROPERTY and REFERENCE values are introduced in 7.1; in addition to these changes, new keywords such as ACCESS_PROPERTY, DIMENSION, CAPTION, HIERARCHY, HRY_DIMENSION, and HRY_STRUCTURE are introduced. |
 |
PROPERTY value is mainly used to identify the type and purpose of the field |
 |
REFERENCE value is used to relate the field to another field in the MFD |
 |
ACCESS_PROPERTY is used to define the behavior of a field |
One of the main reasons for these changes is to support the new front-end features that will debut in 7.1.3. Now let's look at these changes in more detail.
Valid PROPERTY Values in a SAP BW Synonym
PROPERTY=PARAMETER
This value is used to indicate the field represents a "variable." As discussed in the previous article, there are many different types of variables. Variables can have different processing types as well, and they are handled using a new keyword, ACCESS_PROPERTY.
ACCESS_PROPERTY
This keyword is used for different purposes in different adapters. In SAP BW, the purpose is to identify the processing type of a variable. So, ACCESS_PROPERTY can be used only in conjunction with the fields whose PROPERTY equals PARAMETER. In BW a variable can be optional, mandatory or mandatory initial value not allowed.
If the variable is not optional, the value of the ACCESS_PROPERTY will have NEED_VALUE. As the terms imply, if a variable is defined as mandatory, that variable has to be included in a WHERE statement, otherwise the report would not run. For SAP BW, ACCESS_PROPERTY has a second set of values that is separated from NEED_VALUE using comma.
This second set defines how many values can be used in a WHERE statement. Possible values are VALUE, RANGE, and MULTIVALUES. VALUE represents a single value, while RANGE is used to represent variables that can be used in WHERE statements with GE and LE. MULTIVALUES is used to represent that the variable can be used in any type of WHERE statement.
Here's an example of a mandatory variable:
FIELDNAME=VSOLD_TO_PARTY_MANDATORY,
ALIAS=[ZSOLDTOM], USAGE=A124, ACTUAL=A124,
MISSING=ON,
ACCESS_PROPERTY=(NEED_VALUE, VALUE),
TITLE='Sold-to-party mandatory',
PROPERTY=PARAMETER, $
And here's an example of an optional variable:
FIELDNAME=VSALES_ORGANIZATION,
ALIAS=[0SALEORG], USAGE=A124, ACTUAL=A124,
MISSING=ON, ACCESS_PROPERTY=
(MULTIVALUES),
TITLE='Sales organization',
PROPERTY=PARAMETER, $
PROPERTY =MEASURE, REFERENCE=[AGGREGATOR]
This value identifies the key figures. The
REFERENCE value reflects the type of operators that can be used with the field.
FIELDNAME=SALES_VOLUME,
ALIAS=3QMEOU70DFGUU4PEPI9R5ER0C,
USAGE=D18.2, ACTUAL=D8,
MISSING=ON,
TITLE='Sales Volume',
REFERENCE=SUM, PROPERTY=MEASURE, $
PROPERTY=CAPTION
This value identifies the hierarchies (both flat and presentation hierarchies). From the previous article you might remember that the dimension itself is also considered a one level hierarchy or flat hierarchy.
FIELDNAME=DIVISION_LEVEL_01, ALIAS=LEVEL01,
USAGE=A14, ACTUAL=A14,
MISSING=ON,
TITLE='Division Level 01',
WITHIN='*[0DIVISION]',
PROPERTY=CAPTION, $
PROPERTY=UDA, REFERENCE=[dimension]
UDA is short for "user-defined attribute." As you can guess from the long name, this value is used to identify the attributes (properties) of dimensions.
FIELDNAME=AFS__COLOR__KEY_, ALIAS='20AF_COLOR', USAGE=A5, ACTUAL=A5,
MISSING=ON,
TITLE='AFS: Color (Key)',
REFERENCE=[0CUSTOMER], PROPERTY=UDA, $
New Keywords in a SAP BW Synonym
DIMENSION, CAPTION
Using the keyword DIMENSION, the dimensions are identified in the synonym. The CAPTION keyword identifies the title for the dimension.
DIMENSION=[0SOLD_TO], CAPTION=
'Sold-to party', $
HIERARCHY, HRY_DIMENSION, HRY_STRUCTURE
The value assigned to HIERARCHY is the technical name of the hierarchy. HRY_DIMENSION shows the dimension the hierarchy is assigned and HRY_STRUCTURE shows the type hierarchy representation. The value STANDARD is used for the level hierarchies and the value RECURSIVE is used for parent-child hierarchies.
HIERARCHY=[0MATERIAL],
CAPTION='Material',HRY_DIMENSION=
[0MATERIAL],HRY_STRUCTURE=STANDARD, $
HIERARCHY=[0MATERIAL 001],
CAPTION='Material class', HRY_
DIMENSION=[0MATERIAL],HRY_STRUCTURE=
STANDARD, $
HIERARCHY=[0MATERIAL PRDHA],
CAPTION='Product Hierarchy for
material MARA', HRY_DIMENSION=
[0MATERIAL],HRY_STRUCTURE=STANDARD, $
HIERARCHY=[0MATERIAL RCV],
CAPTION='Retail category view',
HRY_DIMENSION=[0MATERIAL],HRY_
STRUCTURE=STANDARD, $
Parent-Child Hierarchies
As discussed earlier, a hierarchy can be represented either as level hierarchy or as parent-child hierarchy.
 |
Standard (or level) hierarchy. Each hierarchy level is described using a separate field name. To issue a report request, you must reference the field name for each level you want to display on the report output. |
 |
Parent/child (or recursive) hierarchy. The hierarchy is described with a set of fields that represent hierarchy data. These fields contain mandatory properties for describing the hierarchy such as the member's unique ID, level number, its parent, and the parent member's level number. To issue a report request, you need only specify a field name for one of the hierarchy fields. |
Dimension properties apply to all hierarchies in the dimension and are listed after all of the dimension's hierarchies.
When you create a synonym with standard (level) hierarchies, the synonym contains one field declaration for each level. This declaration also specifies which field is its parent. If the data changes, to have an additional level, you must recreate the synonym in order to account for this additional field parent reference. With a parent/child hierarchy, one set of field names in the synonym describes the hierarchy. A change in the number of levels does not require a change to the synonym.
Here is an example: We have a dimension called "customer." We also have a hierarchy called "geography" assigned to the dimension customer. Let's assume that currently the geography hierarchy has the following levels:
World
---Continents
------Countries
---------States/Regions
------------Customers
If we had used the level hierarchies we would have five fields representing the five levels of the hierarchy. Using a parent-child hierarchy however, we would have seven fields describing the parent-child relationship. Here are the PROPERTY values for these seven fields:
PROPERTY=UID, REFERENCE=[Hierarchy]
This field represents the unique ID for each member of the hierarchy.
FIELDNAME=GEOGRAPHY, USAGE=A143, ACTUAL=A143,
MISSING=ON,
TITLE='Geography',
WITHIN='*[0CUSTOMER 001]',
REFERENCE=[0CUSTOMER], PROPERTY=UID, $
PROPERTY=KEY, REFERENCE=[The field representing Unique ID]
This field represents the key for each member of the hierarchy.
FIELDNAME=GEOGRAPHY_KEY, USAGE=A64, ACTUAL=A64,
MISSING=ON,
TITLE='Geography KEY',
REFERENCE=GEOGRAPHY, PROPERTY=KEY, $
PROPERTY=LEVEL_NUMBER,
REFERENCE=[The field representing Unique ID]
This field represents the level number for each member of the hierarchy.
FIELDNAME=GEOGRAPHY_LVLNO, USAGE=I2L, ACTUAL=I4,
MISSING=ON,
TITLE='Geography LEVEL_NUMBER',
REFERENCE=GEOGRAPHY, PROPERTY=LEVEL_NUMBER, $
PROPERTY=PARENT_OF,
REFERENCE=[The field representing Unique ID]
This field represents the unique ID of the parent for each member of the hierarchy. For example the country USA would be the parent of the state NY.
FIELDNAME=GEOGRAPHY_PARENT, USAGE=A143, ACTUAL=A143,
MISSING=ON,
TITLE='Geography PARENT_OF',
REFERENCE=GEOGRAPHY, PROPERTY=
PARENT_OF, $
PROPERTY=PARENT_LEVEL_NUMBER, REFERENCE=[The field
representing Unique ID]
This field represents the level number of the parent for each member of the hierarchy.
FIELDNAME=GEOGRAPHY_PARENT_LVLNO, USAGE=I2L, ACTUAL=I4,
MISSING=ON,
TITLE='Geography PARENT_
LEVEL_NUMBER',
REFERENCE=GEOGRAPHY, PROPERTY=
PARENT_LEVEL_NUMBER, $
PROPERTY=CHILDREN_CARDINALITY, REFERENCE=[The field
representing Unique ID]
This field represents the number of children for each member of the hierarchy. For example if we have displayed the field GEOGRAPHY_CHILDREN_CARD for the hierarchy node USA (country), it would show 50. (Country is the parent of state/region)
FIELDNAME=GEOGRAPHY_CHILDREN_CARD, USAGE=I9, ACTUAL=I4,
MISSING=ON,
TITLE='Geography CHILDREN_
CARDINALITY',
REFERENCE=GEOGRAPHY, PROPERTY=CHILDREN_CARDINALITY, $
PROPERTY=CAPTION, REFERENCE=[The field
representing Unique ID]
This field represents the caption or description for each member of the hierarchy.
FIELDNAME=GEOGRAPHY_CAPTION, USAGE=A60, ACTUAL=A60,
MISSING=ON,
TITLE='Geography CAPTION',
REFERENCE=GEOGRAPHY, PROPERTY=
CAPTION, $
And that bring us to the conclusion of our discussion on changes in Release 7.1 In the next article, we will look at the 7.1.3 new features for SAP BW.
|
|