Show TOC

MDX Test EnvironmentLocate this document in the navigation structure

Use

The test environment for multidimensional expressions (MDX) in the BW system (transaction MDXTEST) allows developers of MDX-based SAP applications or MDX client tools and SAP Support to create execute and check MDX statements. The MDX test environment is fully integrated into the MDX environment of the analytic server.

Features

The test environment comprises the following parts:

  • The left part of the screen contains the following navigation areas, where users can build and execute supported MDX statements:

    Navigation Pane

    More information:

    Metadata Browser

    The system displays all metadata objects relevant for your MDX statements. You can choose whether you want to see cubes or catalogs.

    The metadata is normally displayed in a tree structure with the following layout:

    • Unter catalog $INFOCUBE, the system lists all MultiProvider and InfoCubes.

    • Under a Catalog, all of its cubes are displayed. Under a cube, all of its dimensions are displayed. Under a dimension, all of its hierarchies and properties are displayed. Under a hierarchy all of its levels are displayed. And under a hierarchy level, all of its members- all leaves and nodes - are displayed.

    The metadata browser allows you to drag selected objects (members or hierarchies for example) to the editor area.

    You can create a favourite list of the metadata objects most relevant for you.

    Function Browser

    The system displays all MDX functions for the selection grouped according to their return type as well as other syntax templates.

    Statements (MDX Query Navigator)

    The system lists all existing MDX statements. A search function is provided in input help. If you double-click a statement, the system displays it in the editor.

    To show or hide a navigation area, choose Show/Hide Navigator.

  • The central part of the MDX test environment is the editor on the area on the right of the screen. You can add new MDX statements here and edit statements copied from other systems. The editor offers the following functions:

    • Single spacing, to allow indents

    • Line numbering

    • Drag & drop of parts of MDX functions

    • Simple creation of comments, of multiple lines for example

    With the MDX-specific Pretty Printer, the editor allows you to format MDX statements more clearly:

    • Indents

    • Set key words in capitals

    • Set non-key words in small letters

    • Formation of semantic blocks to provide a clearer understanding of the code

  • The result of an MDX query is displayed in a new window. This allows the user to analyze the result independently of the statement.

Edit MDX Statement

  1. Under Functions, choose the required MDX function and drag it to the area on the right of the screen.

    If you want to modify an existing statement, select it under Statements and drag it to the area on the right of the screen.

    If you want to create a new statement instead, delete the content of the editor and create your new statement.

  2. Under Metadata, choose the relevant obejcts and drag them to the area on the right of the screen.

  3. Choose the Pretty Printer function. The editor formats the text.

Import MDX Statement

To analyze customer issues, SAP often uses the trace tool environment to record an MDX statement. These statements are then extracted and opened, tested and processed in the MDX editor. To perform these steps, you can choose Import from RS Trace Tool in the menu.

  1. Record the required trace in the trace tool environment - transaction RSTT (see Trace Tool Environment).

  2. In the menu, choose Start of the navigation path MDX Next navigation step Import from RS Trace Tool End of the navigation path. A dialog box appears where you can enter the trace ID.

  3. Copy over the trace ID from the trace tool environment.

  4. Under Store MDX Commands, select one or more of the following options:

    • Store Commands. If the command already exists, it cannot be saved again unless you also select one of the following options.

    • Overwrite Command ID. If you select this option together with the first and then choose Execute, the Properties of the Statement dialog will appear. Enter a name of your choosing and press Yes on the confirmation prompt.

    • Enter the ID in the Start Command ID field. If you choose Execute the Properties of the Statement dialog will appear.. The system has now inserted the command ID. You can change the name or text again. Answer Yes to the confirmation prompt.

    On the Import MDX Statements from the RS Trace Tool screen, the system shows whether the command could be created and displays the text of the statement.

    Note

    You can also copy the text of the MDX statement to the editor and further process it there.

Check and Execute MDX Statement

You can choose from:

Check

The system checks the syntax of the statement in two steps:

  • Statement Check

  • Extended check (checks whether the selected dimensions actually exist in the system for example)

The MDX statement is executed multidimensionally.

The system executes the MDX statement multidimensionally (see Execute MDX Statement).

Execute The MDX statement is executed.

The system executes the MDX statement according to the settings made in expert mode (see Execute MDX Statement).

Execution Plan

The system displays the runtime objects for the current query in the MDX instance hierarchy and makes it possible to set instance-specific breakpoins in the MDX execution plan.

Save MDX Statement

  1. Once you have created or modified, checked and executed a statement, choose Save. The Properties of the Statement dialog appears.

  2. Enter the technical name and both a short and a long description. The system notes the last modifier and the time stamp.

  3. Answer Yes to the confirmation prompt. The system stores this data on the database.