Managing SAP BW Metadata

In this section:

SAP BW field names are generated from the Level Caption loaded in BW Master Data and obtained from the BW Query Cube. These captions provide friendly (person-readable) field names.

Note:


Top of page

x
Creating Synonyms

How to:

Reference:

x

Synonyms define unique names (or aliases) for each SAP BW table or view that is accessible from a server. Synonyms are useful because they hide location information and the identity of the underlying data source from client applications. They also provide support for extended metadata features of the server such as virtual fields and additional security mechanisms.

Using synonyms allows an object to be moved or renamed while allowing client applications to continue functioning without modification. The only modification required is a redefinition of the synonym on the server. The result of creating a synonym is a Master File and Access File.

Note: In order to create a synonym, you need permission on the function group SU_USER.



x
Procedure: How to Create a Synonym

To create a synonym, you must have previously configured the adapter. You can create a synonym from the Applications or Adapters pages of the Web Console.

  1. From the Web Console menu bar, click Applications.

    The Applications page opens.

  2. Click the New button and select Synonym from the drop-down menu.

    The Select adapter to configure or Select connection to create synonym pane opens.

  3. Click a connection for the configured adapter.

    The first of a series of synonym creation panes opens.

  4. Enter values for the parameters required by the adapter as described in the synonym creation parameters reference.
  5. After entering the parameter values, click Create Synonym.

    The Status pane indicates that the synonym was created successfully.

The synonym is created and added under the specified application directory.

Note:



x
Reference: Synonym Creation Parameters for SAP BW

The following list describes the parameters for which you will need to supply values, and related tasks you will need to complete in order to create a synonym for the adapter. These options may appear on multiple panes. To advance from pane to pane, click the buttons provided, ending with the Create Synonym button, which generates the synonym based on your entries.

Filter by Catalog and Cube

To display all available queries, leave the Filter by Catalog and Cube check box blank.

To filter by Catalog name, Cube name, or Description, click the check box. Three input boxes are displayed. Enter the name of the Catalog (InfoCube), Cube (Query Cube), or description in the appropriate box. You can use the wildcard character (*) as needed. For example:

0CCA*

When issuing a request against a query cube, the adapter creates the cube name from these components: the full catalog name, followed by a forward slash (/), followed by the query cube name.

If you enter a description, it must be a contiguous portion of the SAP BW description from the InfoCube or Query Cube.

Multilanguage

A synoynm can be created using one or more languages. If you choose multiple languages, each selected language can have its own title and description attributes. For details on multilanguage titles and descriptions, see Multilanguage Titles and Descriptions.

  1. Click the Multilanguage check box to select languages in addition to the default logon language (the value of the SET LANGUAGE command at server startup). The list of available languages is displayed. (The default language is not on the list.)
  2. You may select one or more additional languages.

    For SAP BW, you must be authorized for each language you wish to access. Your userid and password are stored in the sapserv.cfg. The languages are retrieved from your selections on this list.

    Note, however, that for the your language selections to be implemented, the selected languages must be installed. Also NLS must be enabled and your language selections must be consistent with your code page settings in the NLS Configuration Wizard. To access this wizard from the Web Console menu bar, select Workspace, Configuration. In the navigation pane, expand the General folder and click NLS. For related information, see Code Pages and Multilanguage Synonyms.

In addition, a Field Names option is displayed (see next item on chart for details).

Field Names

If you have selected Multilanguage synonyms, you can choose to use Technical or Language-based field names:

  • Technical names are based on the global ID of the SAP BW object.
  • Language names use the caption (description) of the BW object. Language-based name is the default setting.

If you choose Language-based, a Field Name case option becomes available (see next item on chart for details).

Field Name Case

For Language-based field names, choose Uppercase or Mixed-case:

  • Uppercase displays all field names in the Master File component of the synonym in uppercase characters.
  • Mixed-case displays field names in the Master File in the same case that is used by SAP BW. Mixed-case is the default setting.
Select Application

Select an application directory. The default value is baseapp.

Prefix/Suffix

If you have tables with identical table names, assign a prefix or a suffix to distinguish them. For example, if you have identically named human resources and payroll tables, assign the prefix HR to distinguish the synonyms for the human resources tables. Note that the resulting synonym name cannot exceed 64 characters.

If all tables and views have unique names, leave the prefix and suffix fields blank.

Hierarchy Type

Select the type of hierarchy you want to create in the synonyms by choosing one of the following options from the Hierarchy type drop-down list:

  • Optimized. This option creates synonyms in which hierarchies are represented as parent/child relationships except for the flat hierarchy. The flat hierarchy (the list of all leaf nodes whose parent is the root node) is represented as a level hierarchy with two fields, one with a field name of the form hierarchy_name_LEVEL_01 (containing the member's caption) and one with a field name of the form hierarchy_name_NAME (containing the member's name).
  • Level. This option creates separate fields for each hierarchy level as in prior releases.

    Note: Existing synonyms from prior releases of the adapter may need to be migrated before you can use them in a request. To migrate a synonym, click its name on the metadata page and then click the Migrate option on the context menu.

Member Sampling

Check this box if you want the adapter to select all members of a hierarchy level to determine the optimum length for the field, and also the cardinality.

Note: Depending on the data volume, this may take a long time. If synonym creation takes too long, you may wish to turn the member sampling off.

When this box is unchecked, all field lengths for the hierarchy levels are set to alphanumeric 60, and the cardinality information will be missing.

Structured Dimensions

Structures consist of a group of characteristics and/or key figures. They can be saved and reused in other queries. You can represent SAP BW structures as dimensions or create a cartesian product of the fields in the structures. To include structures as dimensions in the synonym, check this box.

If you do not check this box, the created Master File includes fields representing the cartesian product of all fields in the structures. All of these fields are placed under the MEASURES section of the Master File and treated as separate key figures.

Key Date

Produces a Master File that contains all versions of the hierarchies (time dependent and not) that existed for the time period associated with the specified key date. Specifying the key date at the time of synonym creation makes sense mostly in the presence of a time-dependent hierarchy that has or has had multiple concurrent versions. The key date should be specified for a period of time when the hierarchy had the maximum number of concurrent versions.

If no key date is specified, the current date is used.

Overwrite Existing Synonyms

To specify that this synonym should overwrite any earlier synonym with the same fully qualified name, select the Overwrite existing synonyms check box.

Note: The connected user must have operating system write privileges in order to recreate a synonym.

Select synonyms to generate

Click the radio button next to the name of each cube for which you want to create a synonym. To create synonyms for all cubes on the list, click the radio button above the list of cubes. The Default Synonym Name column specifies the synonym name that will be generated by default if you select that cube. To specify non-default names for the generated synonyms, overtype the default names.

To delete measures, dimensions, or hierarchies from the synonym, use the Data Management Console after the synonym has been created.



x
Reference: Multilanguage Titles and Descriptions

When you create a Multilanguage synonym, title and/or description attributes for each selected language are added to the synonym. For example, if you choose French, the synonym will contain additional TITLE and DESC attributes of the following form:

TITLE_FR='french title'
DESC_FR='french description'

The default logon language generates titles and descriptions using the TITLE and DESCRIPTION attributes.

In order to make field names in the synonym language independent, they are created based on the field's unique name (these names are called technical names). In synonyms created using only the default language, field names are created based on the field caption.



Example: Code Pages and Multilanguage Synonyms

The languages you wish to select for multilanguage synonyms determine which code page you should configure. For example, ISO 8859-1 can accommodate most Western European languages. Therefore, using this code page, you can request English, German, French, and Spanish.

The Unicode UTF-8 code page (65001) supports all languages and can therefore be used with any combination of languages. However, the UTF-8 character encoding scheme uses three bytes (in ASCII environments) or 4 bytes (in EDCDIC environments) to represent characters, increasing the storage needed for character data.



x
Reference: Managing Synonyms

Once you have created a synonym, you can right-click the synonym name in the Adapter navigation pane of either the Web Console or the Data Management Console to access the following options.

Option

Description

Edit

Opens the Master File for viewing and editing using a graphical interface. If an Access file is used it will be also available.

Edit as Text

Enables you to view and manually edit the Master File synonym.

Note: To update the synonym, it is strongly recommended that you use the graphical interface provided by the Edit option, rather than manually editing the Master File.

Edit Access File as Text

Enables you to view and manually edit the Access File synonym.

Note: This option is available only when an Access File is created as part of the synonym.

Sample Data

Retrieves up to 20 rows from the associated data source.

Data Profiling

Data Profiling provides the data characteristics for synonym columns.

Alphanumeric columns provide the count of distinct values, total count, maximum, minimum, average length, and number of nulls.

Numeric columns provide the count of distinct values, total count, maximum, minimum, average value, and number of nulls.

Refresh Synonym (if applicable)

Regenerates the synonym. Use this option if the underlying object has been altered.

Data Management

Followed by these options, if applicable:

Recreate DBMS Table. Recreates the data source table. You are asked to confirm this selection before the table is regenerated. (Note that the table will be dropped and recreated. During the process, data may be lost.)

Delete All Data. Deletes all existing data. You are asked to confirm this selection before the data is deleted.

Insert Sample Data. Inserts specified number of sample records, populating all fields with counter values.

Impact Analysis

Generates reports on procedures, synonyms, and columns that provide information on the flows/stored procedures available on a particular server, and the synonyms and columns they use. These reports enable you to evaluate changes before they are made by showing which components will be affected. See the Server Administration for UNIX, Windows, OpenVMS, IBM i, and z/OS manual for details about Impact Analysis Reports.

Copy

Copies the synonym to clipboard.

Delete

Deletes the synonym. You are asked to confirm this selection before the synonym is deleted.

Cut

Deletes the synonym and places it in clipboard.

Properties

Displays the properties of the synonym, including physical location, last modified date, and description.



x
Mapping Metadata

Reference:

OLAP (OLE DB standard) uses the following terms for row sets: Hierarchies, Levels, Measures, Members, and Dimension Properties. The corresponding terms are mapped in BW and the Adapter for SAP BW.

It is a good practice to regenerate the adapter metadata whenever data is loaded into the cube. Regeneration keeps data up-to-date and enables the adapter to accurately record the extent to which each dimension hierarchy expands.



x
Reference: Mapping BW InfoProviders to OLE/DB Cubes

Business Information Warehouse (BW) InfoProviders are similar to OLE/DB cubes. Both are the central metadata objects and containers for data used for reporting. InfoPRoviders contain two types of data: Key Figures and characteristics. For related information, see Creating BEx Queries. For examples of these mappings, see Mapping Illustrations.

OLAP

BW

FOCUS

Cube

Query

Master File.

Dimension

Characteristic

Internal use appears as comment in Master File (see above).

Hierarchy

Hierarchy

Dimension (An Adapter for SAP BW Dimension is a group of fields connected by means of the WITHIN keyword. The WITHIN keyword relates inner values to outer values for summary purposes.

Level

Level

Field (the WITHIN keyword points to the parent field).

Member

Characteristic Value

Field values.

Dimension Property (including special property Key)

Attribute

Field (only printable when the reference Dimension Hierarchy is used as a BY field).

No OLAP mapping

SAP BW variable

Field (specially mapped in a Master File) that takes optional or required input.

Measure

Key Figure (Measure)

Numeric fields upon which FOCUS verbs (PRINT/SUM) can perform operations.



Example: Mapping Illustrations

The following lines of syntax illustrate the makeup of the Adapter for SAP BW metadata. Each is listed with its corresponding definition:

FILENAME=WAREHOUS, SUFFIX=BWBAPI,$

This denotes the cube descriptor. The FILENAME=value is generated from the query cube name.

SEGNAME=WAREHOUS, SEGTYPE=S0,$

This is the segment name (used internally in FOCUS only). The SEGNAME=value is generated in the same way as FILENAME=value.

$ DIMENSION -MEASURES-

This is the beginning of the measures section of the Master File. The Fact Table is logically a dimension and is displayed accordingly in the Master File.

$ CARDINALITY=n

The cardinality of a dimension defines how many members can be retrieved for a report. If the Cardinality of a dimension is high, you should consider a WHERE test to restrict the returned values.

FIELD=STORE_INVOICE, ALIAS='STORE INVOICE', USAGE=D10.2, ACTUAL=D8.2, MISSING=OFF,$

This describes the measure. The first section in the Master File defines the fields that comprise the Fact Table for your cube.

$ DIMENSION: dimension_name

This is the Dimension section comment. The Adapter for SAP BW synonym logic puts dimension names in comments before descriptions of the corresponding hierarchies and increases the readability of the Master File. All columns that follow a dimension comment are members of the dimension.

Note: Multiple hierarchies for the same dimension display as separate dimension entries.

FIELD= PRODUCT_FAMILY, ALIAS='PRODUCT FAMILY', WITHIN= *PRODUCT, USAGE=A20, ACTUAL=A20, MISSING=OFF,$

This is the top level of a dimension hierarchy. Each subsequent level of the hierarchy will have a corresponding field name. Each level of the hierarchy has a following comment line with the level unique cardinality (count of members for the level).

Note: The WITHIN=value cannot exceed 66 characters. If the hierarchy unique name is longer than 65 characters (plus 1 character for *), Create Synonym generates a message. Although OLAP supports summary levels (the root level in the hierarchy), these are not displayed in the Master File.

FIELD=STORE_MANAGER, ALIAS='STORE MANAGER', USAGE=A20, ACTUAL=A20, MISSING=ON,$

This describes the Dimension property. Any fields listed in a dimension section of the Master File that do not have an assigned hierarchy (for example, no WITHIN), represent dimension properties. In this example, the property stores the manager name for the store in the rollup.



x
Reference: Syntax Conventions for Master Files

The following conventions must be followed in a Master File that is used with SAP BW:



Example: Dimension: 0MATERIAL

The following example shows what can be expected when selecting the fields in a report. It is important to remember that two fields are returned for the same data value.

Field:0MATERIAL_LEVEL01
Field:0MATERIAL_NAME

as displayed in a report:

0MATERIAL_LEVEL_010MATERIAL_NAMETOTAL_SALES 
Fitdrink 2000(CAN)  R100032             $1000.00

Both fields represent the same characteristic value.

0MATERIAL_LEVEL_01 is the dimension level containing the captions for all members of the dimension.

0MATERIAL_NAME contains the SAP BW technical name for the members of the dimension.


Top of page

x
Variable Types

SAP BW supports four types of variables:

For related information, see Reporting With Variables.


iWay Software