Show TOC

Background documentationPlanning Table Functions and General Functions Locate this document in the navigation structure

 

Refer to the following table to find the macro function of your choice. The functions are listed in alphabetical order.

Function

Explanation

CELL_BG()

Syntax

CELL_BG( Color [; ToolTip] )

Color: Whole-numbered color code between 0 and 64

ToolTip: String that is displayed as a tooltip for the cell (optional)

Description

CELL_BG sets the background color of a cell.

CELL_FG()

Syntax

CELL_FG( Color[; ToolTip] )

Color: Whole-numbered color code between 0 and 64

ToolTip: String that is displayed as a tooltip for the cell (optional)

Description

CELL_FG sets the foreground color of a cell.

CELL_INPUT()

Syntax

CELL_INPUT (Read_only_mode)

Read_only_mode: Whole-numbered value 0, 1 or 2

Description

The CELL_INPUT function sets the ready for input status of a cell. The Read_only_mode parameter determines the status. The value 0 sets the status of the cell to Not Ready for Input. The value 1 sets the status of the cell to Ready for Input. The value 2 determines that the cell adapts the status of the corresponding row. If no status has been set for the row, the value 2 determines that the cell adapts the status of the corresponding column.

CELL_LICON()

Syntax

CELL_LICON( Icon [; ToolTip] )

Icon: Whole-numbered icon code between 0 and 29

ToolTip: String that is displayed as a tooltip for the icon (optional)

Description

CELL_LICON sets the icon Ieft-aligned in a cell.

CELL_RICON()

Syntax

CELL_RICON( Icon [; ToolTip] )

Icon: Whole-numbered icon code between 0 and 29

ToolTip: String that is displayed as a tooltip for the icon (optional)

Description

CELL_RICON sets the icon right-aligned in a cell.

CELL_TOOLTIP()

Syntax

CELL_TOOLTIP( ToolTip )

ToolTip: String that is displayed as a tooltip for the cell

Description

CELL_TOOLTIP sets a tooltip for a cell. The tooltip can be entered directly as a string or it can be determined using the GET_TEXT macro function (language-dependent), for example.

CHAR_VALUES_INPUT()

Syntax

CHAR_VALUES_INPUT( 'dialog_box_description' ; 'field_label') Description

CHAR_VALUES_INPUT prompts the user to enter a character string in a dialog box that appears automatically when this function is executed. As the first argument, you specify the text that appears in the title bar of the dialog box. Write this text in single inverted commas with an underscore between each word, or use the STRINGS_CONCATENATE() function. As the second argument, you specify the field label for the field in which the user enters the character string.

COL_BG()

Syntax

COL_BG( Color [; ToolTip] )

Color: Whole-numbered color code between 0 and 64, 100 and 164, or 200 and 264

ToolTip: String that is displayed as a tooltip for the column (optional)

Description

COL_BG sets the background color of a column.

COL_FG()

Syntax

COL_FG( Color [; ToolTip] )

Color: Whole-numbered color code between 0 and 64, 100 and 164, or 200 and 264

ToolTip: String that is displayed as a tooltip for the column (optional)

Description

COL_FG sets the foreground color of a column.

COL_INPUT()

Syntax

COL_INPUT( X)

Description

COL_INPUT sets the input status of a column. If X = 1, the status of the column is Ready for Input. If X = 0, the status of the column is Read-Only (write-protected). The argument can be either a number that you enter in an Operator/Function dialog box, or one of the macro elements cell, row or column from the planning table or auxiliary table. You can apply this function to a column or cell of the planning table. In the attributes of the column or cell, set the scope of change to Attributes. This applies to Grid 1. To refer to Grid 2, use X = 20 for Read-Only (write-protected) and X = 21 for Ready for Input. Similarly, use X = 10 and X = 11 if you are only referring to GRID 1.

COL_LICON()

Syntax

COL_LICON( Icon [; ToolTip] )

Icon: Whole-numbered icon code between 0 and 29

ToolTip: String that is displayed as a tooltip for the icon (optional)

Description

COL_LICON sets the icon Ieft-aligned in a column.

COL_RICON()

Syntax

COL_RICON( Icon [; ToolTip] )

Icon: Whole-numbered icon code between 0 and 29

ToolTip: String that is displayed as a tooltip for the icon (optional)

Description

COL_RICON sets the icon right-aligned in a column.

COL_TOOLTIP()

Syntax

COL_TOOLTIP (ToolTip)

ToolTip: String that is displayed as a tooltip for the column

Description

COL_TOOLTIP sets a tooltip for a column. The tooltip can be entered directly as a string or it can be determined using the GET_TEXT macro function (language-dependent), for example.

COL_VISIBLE()

Syntax

COL_VISIBLE( X)

Description

COL_VISIBLE sets the visibility of a column. If X = 1, the column is visible. If X = 0, the column is not visible. The argument can be either a number that you enter in an Operator/Function dialog box, or one of the macro elements cell, row or column from the planning table or auxiliary table. You can apply this function to a column or cell of the planning table. In the attributes of the column or cell, set the data source to Attributes. This applies to Grid 1. To refer to Grid 2, use X = 20 for Read-Only (write-protected) and X = 21 for Ready for Input. Similarly, use X = 10 and X = 11 if you are only referring to GRID 1.

COLUMN_FROM

Syntax

COLUMN_FROM

Description

The COLUMN_FROM function returns the index of the first column of a macro step interval (compare ACT_COLUMN and COLUMN_TO).

COLUMN_MARKED()

Syntax

COLUMN_MARKED

Description

COLUMN_MARKED returns the value 1 if the column specified in the argument has been selected. Otherwise, the value is 0. In the attributes of the row or cell, set the data source to Row Attributes.

COLUMN_TO

Syntax

COLUMN_TO

Description

The COLUMN_TO function returns the index of the last column of a macro step interval (compare ACT_COLUMN and COLUMN_FROM).

CURR_CONV_FAC()

Syntax

CURR_CONV_FAC ( 'source_currency' ; 'target_currency' ; 'exchange_rate_type'; DATE)

Description

CURR_CONV_FAC returns the currency conversion factor for the specified source currency, target currency, and the exchange rate type on the specified date. This date can be TODAY (that is, the system date) or a different date (see the DATE() and TODAY functions). TODAY is a function, so you do not have to enter it in inverted commas. Example: CURR_CONV_FAC ( 'USD' ; 'EUR' ; 'M' ; TODAY ).

DATA_IS_LOCKED

Syntax

DATA_IS_LOCKED

Description

DATA_IS_LOCKED returns the value 1 if the data is locked for other users, meaning that the current user can edit the data. DATA_IS_LOCKED returns the value 0 if the data is locked by another user, meaning that the current user cannot edit the data.

DISPLAY_CONV_FACTOR()

Syntax

DISPLAY_CONV_FACTOR (Row)

Description

DISPLAY_CONV_FACTOR (Row) returns the conversion factor that is used to convert the unit stored internally in the data to the unit that is displayed in the data for the row. For example, time data may be stored in SAP liveCache in seconds, but it is displayed in the planning table in hours. The conversion factor that is returned by DISPLAY_CONV_FACTOR in this case is 3600. In the attributes of the row or cell, set the data source to Row Attributes.

EVAL()

Syntax

EVAL

Description

EVAL() is an auxiliary function for constructing complicated functions. EVAL() evaluates arithmetic expressions in the argument, so that this result can be used in another function. The argument can be either a number that you enter in an Operator/Function dialog box, or one of the macro elements cell, row or column from the planning table or auxiliary table.

Use this function to calculate the argument of other functions at runtime.

For example, EVAL ( ( 1 + 2 ) * 3 ) = 9

GET_TEXT()

Syntax

GET_TEXT( TextID [; Language] )

TextID: Text ID for identifying the text element to be read

Language: Parameter for specifying the language (optional)

Description

GET_TEXT returns the language-dependent text of the TextID text element. The TextID text element must exist as a macro text in at least one language.

If you do not specify the Language parameter, the text element is read in the logon language. If the text element is not available in the logon language, it is returned in English or, if applicable, in another available language.

When you specify the Language parameter, the system first looks for the text element in that language. If the text element is not available in this language, it is returned in English or, if applicable, in an other available language.

HELPTAB_CLEAR

Syntax

HELPTAB_CLEAR

Description

HELPTAB_CLEAR initializes the values in the auxiliary table. You can use this function anywhere in a macro. If you want to initialize the values in the auxiliary table at the beginning of a macro, leave the Do Not Initialize attribute unselected.

IS_FIXED()

Syntax

IS_FIXED (Key Figure)

Key Figure: Row element, column element, or cell element (data source = row attributes)

Description

The IS_FIXED function returns the value 1 if the cell is completely fixed. (The column results from the current step iteration; the row is determined by the Key Figure parameter.) If the cell is not fixed or is partially fixed, the return value is 0. The function is not available if the compatibility mode is activated for the macro book.

IS_INITIAL()

Syntax

IS_INITIAL (Key Figure

Key Figure: Row element, column element, or cell element (data source = row attributes)

Description

The IS_INITIAL function returns the value 1 if the cell is initial. (The column results from the current step iteration; the row is determined by the Key Figure parameter.) Apply this function to key figures that can distinguish between zero values and initial values. The function is not available if the compatibility mode is activated for the macro book.

IS_PARTLY_FIXED()

Syntax

IS_PARTLY_FIXED (Key Figure)

Key Figure: Row element, column element, or cell element (data source = row attributes)

Description

The IS_PARTLY_FIXED function returns the value 1 if the cell is partially fixed. (The column results from the current step iteration; the row is determined by the Key Figure parameter.) If the cell is not fixed or is completely fixed, the return value is 0. The function is not available if the compatibility mode is activated for the macro book.

MARKED_COLUMN() or

MARKED_COLUMN

Syntax

MARKED_COLUMN (<'FIRST/LAST'>)

Description

MARKED_COLUMN returns the column numbers of all marked columns. If FIRST or LAST is included as an argument, the function returns the first or last column marked in the time series. FIRST and LAST are the only possible arguments.

MARKED_PLOB

Syntax

MARKED_FIXED_ROWS

Description

MARKED_FIXED_ROWS returns the internal planing object number of the marked rows. Using this number has the advantage in comparison to the row number that this number remains constant irrespective of where the object appears in the grid.

MARKED_ROW() or MARKED_ROW

Syntax

MARKED_ROW (<'FIRST/LAST'>)

Description

MARKED_ROW returns the row numbers of all marked rows. If FIRST or LAST is included as an argument, the function returns the first or last marked row. FIRST and LAST are the only possible arguments.

NUM_VALUES_INPUT()

Syntax

NUM_VALUES_INPUT ( 'dialog_box_description'; 'field_label')

Description

NUM_VALUES_INPUT prompts the user to enter a numerical value in a dialog box that automatically appears when he or she executes this function. As the first argument, you specify the text that appears in the title bar of the dialog box. Write this text in inverted commas with an underscore between each word, or use the STRINGS_CONCATENATE() function. As the second argument, specify the field label for the field in which the user enters the numerical value.

NUMBER()

Syntax

NUMBER( E1 ; ... ; En )

Description

NUMBER( E1 ; ... ; En ) returns the total number of cells in the macro elements E1 through En. E1 through En can be cell(s), row(s), column(s) and/or area(s) from either the planning table or the auxiliary table. For example, you can use this function to determine the number of time buckets in the current grid.

OUTPUT_POPUP

Syntax

OUTPUT_POPUP ('dialog_box_description'; 'field_label'_1' ; value in field 1 ;... ; 'field_label_10' ; value in field 10)

Description

OUTPUT_POPUP opens a dialog box that displays the alphanumeric or numerical values of the extra fields contained in the product master record and/or location master record. A maximum of 10 field values can be displayed in this box.

PLOB_DATA_VISIBLE()

Syntax

PLOB_DATA_VISIBLE ( X; 'planning_object'...'planning object n' )

Description

PLOB_DATA_VISIBLE sets the visibility of the specified planning object(s). You use this function if you are working with the drill-down function in the Details (All) view. If X=1, the planning objects are displayed. If X=0, the planning objects are hidden. Use the ACT_PLOB, MARKED_PLOB, or KEYFS_PLOB function to specify the planning objects.

PLOB_MARKED()

Syntax

PLOB_MARKED

Description

PLOB_MARKED returns the value 1 if the planning object specified in the argument has been selected. Otherwise, the value is 0. Use the ACT_PLOB, MARKED_PLOB, or KEYFS_PLOB function to specify the planning objects.

REPORT_SUBMIT()

Syntax

REPORT_SUBMIT ( 'program_name' ; <'job_name'> ; <'job_number'>; <'new_mode'> )

Description

REPORT_SUBMIT causes the specified program to be executed. Use the optional arguments (job name and job number) if you want the program to run in the background. If you set the new_mode argument, the results are displayed in a new window.

ROW_BG()

Syntax

ROW_BG( Color [; ToolTip] )

Color: Whole-numbered color code between 0 and 64

ToolTip: String that is displayed as a tooltip for the row (optional)

Description

The ROW_BG function sets the background color of a row.

ROW_CLEAR()

Syntax

ROW_CLEAR (Key Figure)Key Figure: Row of the key figure of the planning area. You can enter the key figure in the following two ways:

  • As the internal number of the key figure. This is the position of the key figure in the table on the Key Figure tab page of the planning area maintenance.

  • By including the row as the argument In this case, you have to include the data source as row attributes in the Macro Workbench.

Description

ROW_CLEAR() deletes all values of the key figure at aggregate level (totals level). The value 0 is then disaggregated to all detail levels. Thus it is sufficient if you execute the macro at aggregate level only. Similarly it is sufficient if you include the function in a step with only one iteration.

ROW_FG()

Syntax

ROW_FG( Color [; ToolTip] )

Color: Whole-numbered color code between 0 and 64

ToolTip: String that is displayed as a tooltip for the row (optional)

Description

The ROW_FG function sets the foreground color of a row.

ROW_INPUT()

Syntax

ROW_INPUT ( X )

Description

ROW_INPUT sets the input status of a row. If X = 1, the status of the row is set to Ready for Input. If X = 0, the status of the row is set to Read-Only (write-protected). The argument can be either a number that you enter in an Operator/Function dialog box, or one of the macro elements cell, row, or column from the planning table or auxiliary table. You can apply this function to a row or a cell. In the attributes of the row or cell, set the scope of change to Attributes.

Note Note

It is not possible to use this function in conjunction with key figure-specific locking and the Do Not Lock Read-Only Key Figures option. For more information, see Key Figure-Specific Locking

End of the note.

ROW_LICON()

Syntax

ROW_LICON( Icon [; ToolTip] )

Icon: Whole-numbered icon code between 0 and 29

ToolTip: String that is displayed as a tooltip for the icon (optional)

Description

The ROW_LICON function sets an icon left-aligned in a row.

ROW_MARKED()

Syntax

ROW_MARKED

Description

ROW_MARKED returns the value 1 if the row specified in the argument has been selected. Otherwise the value is 0.

ROW_RICON()

Syntax

ROW_RICON( Icon [; ToolTip] )

Icon: Whole-numbered icon code between 0 and 29

ToolTip: String that is displayed as a tooltip for the icon (optional)

Description

The ROW_RICON function sets an icon right-aligned in a row.

ROW_TOOLTIP()

Syntax

ROW_TOOLTIP( ToolTip )

ToolTip: String that is displayed as a tooltip for the row

Description

The ROW_TOOLTIP function sets a tooltip for a row.

ROW_VALUES_CHANGED()

Syntax

ROW_VALUES_CHANGED ( X )

Description

ROW_VALUES_CHANGED returns 1 if the user has changed one or more values in row X in the current planning session since last pressing Enter. In the attributes of the row, enter Row Attributes as the data source.

Note Note

Since you generally choose Enter when entering values, we recommend that you use macros as default macros for this function.

End of the note.

ROW_VISIBLE()

Syntax

ROW_VISIBLE ( X )

Description

ROW_VISIBLE sets the visibility of a row. If X = 1, the column is visible. If X = 0, the column is not visible. The argument can be either a number that you enter in an Operator/Function dialog box, or one of the macro elements cell, row or column from the planning table or auxiliary table. You can apply this function to a row or a cell. For the attributes of the row or cell, set the scope of change to Attributes.

STEP_AREA_SET()

Syntax

STEP_AREA_SET( From-Column; To-Column )

From-Column: Column index

To-Column: Column index

Description

The STEP_AREA_SET function sets the step interval of all following macro steps from From-Column to To-Column. This way, the macro step interval that you defined in the MacroBuilder is overridden. However, the step interval of the macro step in which the STEP_AREA_SET function is called is not changed.

The step interval set by the STEP_AREA_SET function is valid until the end of the macro execution, or can be canceled by calling STEP_AREA_SET( 0 ; 0 ).

STEP_CALC_STOP

Syntax

STEP_CALC_STOP

Description

The STEP_CALC_STOP function exits a macro step after carrying out the current step iteration. Any assignments and macro functions that exist after STEP_CALC_STOP is called are still executed.

STRINGS_CONCATENATE()

Syntax

STRINGS_CONCATENATE ('String1'...'Stringn')

Description

STRINGS_CONCATENATE inserts blanks between several character strings to produce one string.

UNIT_CONV_FAC()

Syntax

UNIT_CONV_FAC ( NAME1 ; NAME2 )

Description

UNIT_CONV_FAC returns the conversion factor for converting unit NAME1 to unit NAME2. You enter the names of the units in Operator/Function dialog boxes, for example UNIT_CONV_FAC ( KG ; TO ) = 1000 .

USER

Syntax

USER ( NAME ) = 1

Description

USER( NAME ) = 1, where the user name of the person logged on to the system is NAME; for example USER( SUCHANEK ) = 1, if the logon name of the planner is Suchanek. Otherwise, USER( SUCHANEK ) = 0. You enter the argument in an Operator/Function dialog box.

VALUE_OF_ROW_CHANGED()

Syntax

VALUE_OF_ROW_CHANGED ( X ; Y1 ; ... Yn )

Description

VALUE_OF_ROW_CHANGED returns 1 if the user has changed one or more key figure values in column Y1 through Yn in row X in the current planning session since last pressing Enter. In the attributes of the column, enter Row Attributes as the data source.