Support for BEx Structures

Structures consist of a group of characteristics and/or key figures. They can be saved and reused in other queries. For example, if plan/actual comparisons are being used extensively, it is possible to save a key figure group that consists of 10 key figures arranged for plan/actual comparison. To be able to use the same set of key figures in a different query, instead of selecting 10 key figures individually, adding the structure to the BEx query automatically brings those key figures into the query.

Note that SAP supports a maximum of two structures in a BEx query and only one of the structures can be of type Key Figure.

You can create a synonym with structured dimensions by checking the Structured Dimensions check box when creating the synonym.


Top of page

Example: Representing Structures as Dimensions or as a Cartesian Product

You can represent structures as dimensions or create a cartesian product of the fields in the structures. Consider a BEx query that uses 2 structures:

Without structured dimensions, the created Master File includes eight fields representing the cartesian product of the two structures. All of these fields are placed under the MEASURES section of the Master File and treated as separate key figures. The Master File looks something like this:

FILENAME=BW31C/Z2STRUCTURES_1KF_ROW_1COL, SUFFIX=BWBAPI  , $
  SEGMENT=Z2STRUCT, SEGTYPE=S0, $
$  -MEASURES-
    FIELDNAME=CURRENT_YEAR_CUMULATED_INCOMING_ORDERS,
      ALIAS=3466HXATG6RG1BG9GSTCN65IR3RV6E, USAGE=D18.2,
      ACTUAL=D8, MISSING=ON,
      TITLE='Current year cumulated Incoming Orders', $
    FIELDNAME=CURRENT_YEAR_CUMULATED_OPEN_ORDERS,
      ALIAS=3466HXATG6RG1BG9GSTCN65IR3RV6E, USAGE=D18.2,
      ACTUAL=D8, MISSING=ON,
      TITLE='Current year cumulated Open orders', $
    FIELDNAME=CURRENT_YEAR_CUMULATED_SALES_VOLUME,
      ALIAS=3466HXATG6RG1BG9GSTCN65IR3RV6E, USAGE=D18.2,
      ACTUAL=D8, MISSING=ON,
      TITLE='Current year cumulated Sales Volume', $
    FIELDNAME=CURRENT_YEAR_CUMULATED_RETURNS,
      ALIAS=3466HXATG6RG1BG9GSTCN65IR3RV6E,
      USAGE=D18.2, ACTUAL=D8, MISSING=ON,
      TITLE='Current year cumulated Returns', $
    FIELDNAME=PREV__YEAR_CUMULATED_INCOMING_ORDERS,
      ALIAS=36AWN99ETKI46HMTOGIVHHSOJ3RV6E,
      USAGE=D18.2, ACTUAL=D8, MISSING=ON,
      TITLE='Prev. year cumulated Incoming Orders', $
    FIELDNAME=PREV__YEAR_CUMULATED_OPEN_ORDERS,
      ALIAS=36AWN99ETKI46HMTOGIVHHSOJ3RV6E,
      USAGE=D18.2, ACTUAL=D8, MISSING=ON,
      TITLE='Prev. year cumulated Open orders', $
    FIELDNAME=PREV__YEAR_CUMULATED_SALES_VOLUME,
      ALIAS=36AWN99ETKI46HMTOGIVHHSOJ3RV6E,
      USAGE=D18.2, ACTUAL=D8, MISSING=ON,
      TITLE='Prev. year cumulated Sales Volume', $
    FIELDNAME=PREV__YEAR_CUMULATED_RETURNS,
      ALIAS=36AWN99ETKI46HMTOGIVHHSOJ3RV6E,
      USAGE=D18.2, ACTUAL=D8, MISSING=ON,
      TITLE='Prev. year cumulated Returns', $
$  DIMENSION 0DISTR_CHAN (Distribution Channel):
$  HIERARCHY  (Distribution Channel):
...
...

The following is a sample WebFOCUS request against this Master File:

TABLE FILE Z2STRUCTURES_1KF_ROW_1COL
SUM CURRENT_YEAR_CUMULATED_INCOMING_ORDERS
    CURRENT_YEAR_CUMULATED_OPEN_ORDERS
    CURRENT_YEAR_CUMULATED_SALES_VOLUME
    CURRENT_YEAR_CUMULATED_RETURNS
    PREV__YEAR_CUMULATED_INCOMING_ORDERS
    PREV__YEAR_CUMULATED_OPEN_ORDERS
    PREV__YEAR_CUMULATED_SALES_VOLUME
    PREV__YEAR_CUMULATED_RETURNS
BY 0DISTR_CHAN_KEY
END

With structured dimensions, the created Master File includes four key figures placed under the MEASURES section of the Master File and the Curr. Year vs. prev. year Cumulated structure are treated as a dimension. The Master File looks something like this:

FILENAME=BW31C/Z2STRUCTURES_1KF_ROW_1COL_STON, SUFFIX=BWBAPI  , $
  SEGMENT=Z2STRUCT, SEGTYPE=S0, $
$  -MEASURES-
    FIELDNAME=INCOMING_ORDERS, ALIAS=[3RV6ENA572BRXFKFCO2M2ZUWS],
      USAGE=D18.2, ACTUAL=D8, MISSING=ON, TITLE='Incoming Orders', $
    FIELDNAME=OPEN_ORDERS, ALIAS=[3RV6ENHTQ0XHG23VII4YD1TMK],
      USAGE=D18.2, ACTUAL=D8, MISSING=ON, TITLE='Open orders', $
    FIELDNAME=SALES_VOLUME, ALIAS=[3RV6ENPI8ZJ6YONBOC7AN3SCC],
      USAGE=D18.2, ACTUAL=D8, MISSING=ON, TITLE='Sales Volume', $
    FIELDNAME=RETURNS, ALIAS=[3RV6ENX6RY4WHB6RU69MX5R24], USAGE=D18.2,
      ACTUAL=D8, MISSING=ON, TITLE='Returns', $
$  DIMENSION 0DISTR_CHAN (Distribution Channel):
$  HIERARCHY  (Distribution Channel):
...
...
$  DIMENSION EAZ5PAJIWG37DI674JZI2C3UB (Curr. year vs. prev. year 
(cumulated to last period)):
$  HIERARCHY  (Curr. year vs. prev. year (cumulated to last period)):
    FIELDNAME=CURR__YEAR_VS__PREV__YEAR__CUMULATED_TO_LAST_PERIOD_,
      USAGE=A22, ACTUAL=A22, MISSING=ON,
      TITLE='Curr. year vs. prev. year (cumulated to last period)',
      WITHIN='*[EAZ5PAJIWG37DI674JZI2C3UB]', $
$  Cardinality: 2 
$  DIMENSION EAZ5PAJIWG37DI674JZI2C3UB, PROPERTIES:
    FIELDNAME=EAZ5PAJIWG37DI674JZI2C3UB_KEY, ALIAS=MEMBER_NAME,
      USAGE=A64, ACTUAL=A64, MISSING=ON,
      TITLE='Curr. year vs. prev. year (cumulated to last period) Key', $

The following is sample WebFOCUS request against this Master File:

TABLE FILE Z2STRUCTURES_1KF_ROW_1COL_STON
PRINT INCOMING_ORDERS
    OPEN_ORDERS
    SALES_VOLUME
    RETURNS
BY CURR__YEAR_VS__PREV__YEAR__CUMULATED_TO_LAST_PERIOD_
END

Important: If the BEx query includes only two structures and no dimensions as free characteristics or no dimensions in rows and columns, you should use structured dimensions. Without structured dimensions, the created synonym will have only measures and no dimensions. Any WebFOCUS requests created against such a synonym would produce the following messages:

(FOC11205) ERROR IN MASTER FILE DESCRIPTION:
(FOC11229) MDX SEGMENT DESCRIPTION CONTAINS NO HIERARCHIES

iWay Software