5.3    InfoObjects

Apart from a few new functionalities, SAP BW/4HANA InfoObjects are very similar in concept to the SAP BW versions. SAP professionals well-versed in this type of object from previous versions of SAP BW may find this section a breeze; it’s intended to be an introduction for professionals new to SAP’s BI world.

InfoObjects are considered the smallest modeling units in SAP BW. They act as building blocks for other modeling objects within the SAP BW data warehouse. A CompositeProvider or Advanced DSO can be defined by selecting a set of InfoObjects that represent the desired information.

There are four types of InfoObjects in SAP BW/4HANA: characteristic, key figure, unit, and XXL. To make an analogy to data warehousing fundamentals, characteristic types are contextual elements, whereas key figures represent the metrics of a data model. Units are the standardized references required to establish the proper order of magnitude and comparison between the metrics of a data model. As for XXL, these are special InfoObjects that rely on deep ABAP types to allow for long content, up to 1,333 characters, to be stored as additional information for the model.

Example

Let’s walk through an example. For this example, assume that sales information must be stored for reporting purposes. The first sales record indicates a total of $1,200,000. The second sales record shows a total of $200,000. Which one is more attractive for a business? That’s a trick question: The contextual information hasn’t yet been provided. The amounts of $1,200,000 and $200,000 are simple metrics until additional information can be used to contextualize them.

By assigning units to the metrics, some insights are possible. Let’s say the first sales records is in US dollars (a total of $1,200,000). The second sales record is in Euros (€200,000). The first deduction here is that with orders of magnitude, the units, applied to the amounts, we can now say that based on market exchange rates the $1,200,000 amount is greater than the €200,000 amount.

However, this is maybe a limited view. To further contextualize the data, other elements can be added to the analysis. In this case, let’s provide a time characteristic—for example, calendar month. It happens that the $1,200,000 amount was obtained during an entire year of sales at an average of $100,000 per month. The €200,000 amount was obtained in a single month.

As more characteristics are added to the model, more information and insights can be derived. Characteristics such as customer ID, product, region, and stores can assist in various analyses. Even some comments originating from customer feedback could be stored and assigned to related sales transactions. This intersection of data elements is modeled under datasets that in SAP BW/4HANA are commonly referred to as InfoProviders. InfoProviders thus are representations of a group of InfoObjects of different types as per analytical requirements.

5.3.1    Characteristics

Characteristic InfoObjects act as contextual elements for metrics in a data model. Characteristics in SAP BW/4HANA can be defined based on five ABAP dictionary data types:

  1. Character string (CHAR)
  2. Numerical text (NUMC)
  3. Signed numerical characteristics (SNUMC)
  4. Date in format YYYYMMDD (DATS)
  5. Time in format HHMMSS (TIMS)

The data type is selected when defining a characteristic InfoObject (see Figure 5.4) and determines the format in which it should be displayed in the UI, including its maximum length and output template.

Data Types Selection during SAP BW/4HANA InfoObjects Definition

Figure 5.4    Data Types Selection during SAP BW/4HANA InfoObjects Definition

When an ABAP program consumes table data, the system converts the internal format of its contents per the ABAP data type for user visualization.

Table 5.4 describes the output template and length limitations of each of the five data types applicable to characteristics.

Data Type Definition
Character string (CHAR) Character field that can be filled with alphanumeric characters; limited to a maximum length of 1,333 characters in tables.
Numerical text (NUMC) Character field in which only numbers can be entered; length of this field is limited to a maximum of 255 characters.
Signed numerical characteristic (SNUMC) Character field in which signed numbers can be entered; similar to NUMC, but allows negative values.
Date in format YYYYMMDD (DATS) Character field with a length set to eight characters; format is YYYYMMDD; output template can be set in user profile.
Time in format HHMMSS (TIMS) Character field with length set to six characters; the format is HHMMSS; template for input and output has the form ’__.__.__’.

Table 5.4    Data Types for SAP BW/4HANA Characteristic InfoObjects

After specifying the data type applicable for the new InfoObject, the next step is to determine its general properties within the InfoObject definition UI, under the General tab, where the properties in Table 5.5 can be set.

Property Definition
Usable as InfoProvider This allows queries to be created on top of the InfoObject tables.
Authorization-relevant Authorization objects for reporting that rely on this InfoObject can be created.
Attribute only This InfoObject characteristic can only be modeled as a display attribute of another characteristic.
High-cardinality No persistent SID table is created for this InfoObject.
Case-sensitive Characteristic values aren’t converted to uppercase by default.
Master data Generates an attribute table.
Texts Generates a text table.
Hierarchy Generates a hierarchy table.

Table 5.5    General Properties of Characteristic InfoObjects

SAP BW/4HANA characteristic InfoObjects can be simple fields or sophisticated master data objects defined based on entity-relationship models. Examples of simple characteristics include postal codes, street names, and street numbers. These simple characteristics can be modeled as parts of a customer’s addresses. The main characteristic customer would then be defined with these simple characteristics acting as its attributes.

Not only simple characteristics can be modeled as attributes. Characteristics with their own attributes can easily become attributes of other characteristics. For example, a characteristic such as city usually carries attributes such as state and country as part of its master data table. City is routinely mapped as an attribute of customer master data in entity-relationship models, as shown in Figure 5.5.

Entity-Relationship Model Applied to SAP BW/4HANA Characteristics

Figure 5.5    Entity-Relationship Model Applied to SAP BW/4HANA Characteristics

In addition to attributes, SAP BW/4HANA InfoObject characteristics can be configured with texts and/or hierarchy tables. Texts are the descriptions associated with the key values of a characteristic. Hierarchies are the tree structures against which the key values of a characteristic can be distributed, usually for rolling up and categorization purposes in reporting.

Attributes, texts, and hierarchies of a characteristic InfoObject are defined by flagging the Master Data, Texts, and Hierarchies properties (see Figure 5.6) during InfoObject definition. Tables are then generated in the SAP HANA database to store the related content.

The specifications of the master data tables storing attributes, texts, and hierarchies, including potential dependencies related to versioning or time validity, are determined by selecting the tabs made available during the InfoObject definition.

From the Master Data/Texts tab (see Figure 5.7), you can set the compounding parameters for the Texts table key, allowing multilanguage descriptions and time validity for such descriptions. To do so, set the Language-Dependent and Time-Dependent flags, respectively.

Configuring Characteristic InfoObject with Attributes, Texts, and HierarchiesCharacteristic InfoObjectdefinition

Figure 5.6    Configuring Characteristic InfoObject with Attributes, Texts, and Hierarchies

Defining Texts Table for Characteristic InfoObject

Figure 5.7    Defining Texts Table for Characteristic InfoObject

In the case of language dependency, the language is added as a compounding key to the characteristic’s values, allowing multiple descriptions to be stored. For time dependency, setting the flag means compounding the characteristic’s values with Valid From and To fields as keys for the text tables.

SAP BW/4HANA allows three lengths of text to be stored: short, medium, and long. Short texts have a maximum length of 20 characters, medium have a maximum length of 40, and long texts can vary from 60 up to a limit of 1,333 characters. This upper limit is enabled if the option Long Text Is Extra Long is chosen. In this case, the long text is associated with data type SSTRING.

For the hierarchy table of a characteristic InfoObject, the settings available under the Hierarchies tab (see Figure 5.8) allow time-dependency and versioning to be introduced to the hierarchy structure. Versioning (Version-Dependent), if set, is applied to entire structure. As for time-dependency (Time-Dependent), this can be set at the header level or structure level. At the header level, the entire hierarchy follows the validity set at the root level of the tree structure. If the time-dependency is set at the hierarchy structure level, then nodes within the tree structure can have their own dedicated validity periods.

Defining Hierarchy Table for Characteristic InfoObject

Figure 5.8    Defining Hierarchy Table for Characteristic InfoObject

Two other parameters are also available, under Miscellaneous in the Hierarchy tab. The first, Intervals Permitted in the Hierarchy, allows intervals to be set as nodes of the tree structure, minimizing maintenance effort when inputting the characteristic values to the tree structure. This is relevant when hierarchical values follow an interval pattern. The other parameter available, Reverse +/- Sign for Nodes, can be used to reverse the positive/negative sign for transaction data posted against the nodes of the hierarchy structure.

The Attributes tab (see Figure 5.9) is where attributes to be associated with the InfoObject can be entered. This is done by selecting other characteristics available within SAP BW/4HANA to act as attributes for the InfoObject being defined.

Adding Attributes to Characteristic InfoObjectCharacteristic InfoObjectattributes

Figure 5.9    Adding Attributes to Characteristic InfoObject

Depending on the settings chosen, the attributes can be of a navigation or display nature. If an attribute is set as navigational, then it can be used for slicing and dicing at the query level. Display attributes won’t have the same behavior and will only serve as an extension to the characteristic value on reports. They can be displayed side by side with the main characteristic. No slicing or filtering is possible with display attributes in queries.

It’s also possible to logically assign XXL attributes to a characteristic. XXL attributes differ from regular attributes and can be further specified via MIME type. A MIME type is a standardized specification comprised of a two-part identifier that determines file format and content. Based on the MIME type selected, the system can interpret the XXL attribute as an audio file, a video file, text, or an image. XXL attributes first must be defined as an XXL InfoObject type before being available as XXL attributes for other characteristics.

5.3.2    XXL

XXL InfoObjects are available in SAP BW/4HANA to assist in storing large contents in different formats in the SAP HANA database. Subsequent modeling activities can then associate the contents stored as XXL InfoObjects with other characteristics.

There are two data types available when defining XXL InfoObjects, as noted in Table 5.6.

Data Type Definition
Character string (CLOB) Character large object: Used to store a large amount of character data, up to 1,333 characters.
Byte string (BLOB) Binary large object: Used to store a large amount of binary data; further specification using MIME types is necessary to specify file format and content.

Table 5.6    Data Types for XXL InfoObjects

If an XXL InfoObject is created using the CLOB data type, then no further parameters are needed beyond the technical name and description of such an InfoObject. This is because the system recognizes CLOB as a text file by default.

If an XXL InfoObject type is created using the BLOB data type, then it’s necessary to assign its MIME type. The MIME type specifies the file format and contents, assisting the system in determining how to store and interpret the file in question. MIME types available in SAP BW/4HANA include image types (PNG, IMG, BITF, PFX, etc.), video types (MPG, AVI, QT, VDO, etc.), Microsoft types (DOC, PPT, XLS, RTF, etc.), Adobe PDF, AutoCAD (DWG), and many others.

5.3.3    Key Figure

Key figure InfoObjects are the metrics used in data models. These metrics can represent amount, quantity, integer, number, date, or time. To accommodate these options, there are eight different data types applicable to key figures in SAP BW/4HANA. Table 5.7 describes the output template, length limitation, and properties of each of the eight data types applicable to key figures.

Data Type Definition
Currency field (CURR) Equivalent to an amount field DEC. A field of this type must refer to a field of type CUKY (reference field). The maximum length for this data type is 31 characters.
Floating point (FLTP) The length (including decimal places) is set to 16 characters for this data type.
Packed numbed (DEC) Counter or amount field with decimal point, sign, and commas separating thousands. A DEC field has a maximum length of 31 characters.
Date in format YYYYMMDD (DATS) Length set to eight characters. The format is YYYYMMDD. The output template can be set in the user profile.
Time in format HHMMSS (TIMS) Length set to six characters. The format is HHMMSS. The template for input and output has the form ’__.__.__’.
4-Byte integer (INT4) The length for this data type is limited to 10 characters, with lower and upper limits set to -2,147,483,648 and +2,147,483,647, respectively.
8-Byte integer (INT8) The length for this data type is limited to 20 characters, with lower and upper limits set to -9.2 × 1018 and +9.2 × 1018 respectively
Quantity field (QUAN) Equivalent to an amount field DEC. A field of this type must always refer to a field type UNIT. The maximum length for this data type is 31 characters.

Table 5.7    Data Types for Key Figure InfoObjects

There’s a relationship between the data type and the type of the key figure being defined. SAP BW/4HANA automatically restricts the data type options to the ones applicable to each key figure type. For example, if a key figure will represent an integer, then the data type options are restricted to INT4 and INT8 during the key figure definition. Table 5.8 presents the key figure types and related data types allowed.

Key Figure Type Data Types Allowed
Amount CURR, FLTP
Integer INT4, INT8
Date DATS, DEC
Number FLTP, DEC
Quantity QUAN, FLTP
Time TIMS, DEC

Table 5.8    Key Figure Types and Related Data Types

General key figure specifications are set during definition (see Figure 5.10). These range from aggregation procedures for reports (sum, minimum, maximum, no aggregation) to fixed or variable units to display behavior.

Defining Key Figure InfoObjectsKey figure InfoObjectdefining

Figure 5.10    Defining Key Figure InfoObjects

In addition to the general key figure settings, SAP BW/4HANA also offers the opportunity to set four other special properties. These four special properties are Non-Cumulative and Stock Coverage (both commonly used for inventory management), High Precision, and Attribute Only.

The Non-Cumulative property enables snapshots of stock position by period. Stock Coverage determines the number of periods of supply against planned or expected demand.

High Precision is used to force the analytical engine to perform calculations using extra decimal places instead of rounding. The Attribute Only option can be set when a key figure is only to be used as an attribute of characteristics instead of for report calculation.

5.3.4    Unit

Unit InfoObjects are used in conjunction with key figures, setting the measuring standards between values and thus enabling proper comparisons and conversions. There are two data types available when defining unit InfoObjects, as noted in Table 5.9.

Data Type Definition
Currency Key (CUKY) Fields of this type are referenced by fields of type CURR. The length is set to five characters for this data type.
Unit Key (UNIT) Fields of this type are referenced by fields of type QUAN. The length of this data type is set to two or three characters.

Table 5.9    Data Types for Unit InfoObjects

The steps for defining a unit InfoObject are restricted to selecting Unit Type, Technical Name, and Description (see Figure 5.11). The only further specification relates to the display behavior during reporting, which determines if the unit should be displayed as a key, text, or a combination of both.

Defining Unit InfoObjects

Figure 5.11    Defining Unit InfoObjects