Entering content frame

Function documentation Semantic Checks for Macros Locate the document in its SAP Library structure

Use

Unlike the syntax check, which merely checks if the macro coding is formally correct, the semantic check of the MacroBuilder runs various checks and points out typical semantic errors. The messages issued by the semantic check are notes or tips, meaning you are not required to carry out the proposed changes. Only you ultimately decide if the macros are semantically correct.

Features

You can start the semantic check at various levels. You can check all the macros in a macro book or individual macros, macro steps, and results. If you run a check for a result, the system only checks one calculation or one process. It is not necessary to run a semantic check at a detail level (argument level).

There are several semantic checks available, including:

     Do Not Initialize Auxiliary Table

The system checks whether this indicator has been set at the macro level.

If the auxiliary table is not initialized when you call up the macro, any values that are in the table from the execution of previous macros remain in the table and can be used in the current macro (global auxiliary rows). All entries in the auxiliary table are lost when you leave the planning book.

If you set the Do Not Initialize Auxiliary Table indicator, the auxiliary rows defined in this macro cannot be used in other macros (local auxiliary rows).

     Layout

The system checks that you have assigned the correct change mode to a results element in the attributes. For example, if the function called changes the attributes of a cell (changes the background color, an icon setting, and so on), choose the Attribute Change setting for the change mode.

     Do not display initial values

This indicator at macro level affects performance. If you have not set this indicator, initial values, that is empty cells, are converted to zero values and the system takes them into account during the calculation.

Note

This setting does not have any effect on key figures that differentiate null values from initial values (see Differentiation of Initial Values and 0 Values).

     Parenthesis count

The system checks that there is an even number of parentheses. It also checks that the parentheses match up, that there is an opening parenthesis for each closing parenthesis and vice-versa (and ).

     Parenthesis and space

The system checks that there is a space before and after every opening and closing parenthesis.

     Semicolon and space

Similarly the system checks that there is a space before and after every semicolon.

     Single inverted comma count

The system checks if there is an even number of delimiters (') for character-based values.

     Compatibility mode

The system checks if the compatibility mode has been activated unnecessarily for a macro book. The compatibility mode is not necessary, for example, if no fixable key figures are used in the macro book. In addition, the system checks whether all macro books that are assigned to a planning book and its data views have the same settings for the compatibility mode.

     User functions

The system checks if you are using the obsolete parameters GRID_LINES, GRID_COLS, GRID_CELLS, GRID_FIXED_LINES, GRID_FIXED_COLS or GRID_FIXED_TAB. Using these parameters can signicantly decrease performance during macro execution.

     Seasonal Planning

The system checks if you are using date functions in a seasonal data view or seasonal macro functions in a non-seasonal data view.

     User exit macros

The system checks if you are using user exit macros. These macros are only supported for compatibility reasons. Use Business-Add-In macros (BAdI) instead, since they contribute to better performance.

Activities

You can start the semantic check from either the Macro Workbench or the Macro Builder. In both cases you start the checks by selecting the relevant object and choosing This graphic is explained in the accompanying text.

A log in table form appears listing any irregularities.

In the Macro Workbench you can see an overview of the messages for one or more macro books. If you double-click on an entry, the macro book is opened in the MacroBuilder. More detailed information is available here. Choose This graphic is explained in the accompanying text for more information. This can be the screen on a which a setting can be made or a more detailed message. In some cases you can correct the situation by choosing This graphic is explained in the accompanying text.

 

Leaving content frame