
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.
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: |
|
|
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:
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. |
|
|
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
.
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
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.
Under
Metadata, choose the relevant obejcts and drag them to the area on the right of the screen.
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.
Record the required trace in the trace tool environment - transaction RSTT (see Trace Tool Environment).
In the menu, choose . A dialog box appears where you can enter the trace ID.
Copy over the trace ID from the trace tool environment.
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
, 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
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.
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:
|
|
The system checks the syntax of the statement in two steps:
|
|
|
The system executes the MDX statement multidimensionally (see Execute MDX Statement). |
|
Execute
|
The system executes the MDX statement according to the settings made in expert mode (see Execute MDX Statement). |
|
|
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
Once you have created or modified, checked and executed a statement, choose
. The
Properties of the Statement dialog appears.
Enter the technical name and both a short and a long description. The system notes the last modifier and the time stamp.
Answer Yes to the confirmation prompt. The system stores this data on the database.