Show TOC

SAPGetVariableLocate this document in the navigation structure

This function returns the value of the specified property for a specific BW variable.

The formula consists of three parameters and is made up of the following arguments:
  • Data Source

    Enter the formula alias for the data source. You can set the alias when configuring the data source on the Components tab in the design panel.

  • Variable Name

    Enter the name or technical name of the variable.

  • Property Name
    You can enter the following property names:
    • VALUE

      If you enter VALUE, the current value of the variable is displayed.

    • VALUEASKEY

      If you enter VALUEASKEY, the current value of the variable is displayed as a key.

    • VALUEASTEXT

      If you enter VALUEASTEXT, the current value of the variable is displayed as text.

    • INPUT_STRING

      If you enter INPUT_STRING, the current value of the variable is displayed as an input string.

    • INPUT_STRING_AS_ARRAY

      This property name can only be used if the formula is called from VBA. It returns the input string as a string array.

    • DESCRIPTION

      If you enter DESCRIPTION, the variable name is displayed.

    • ISINPUTENABLED

      If you enter ISINPUTENABLED, the function checks if the variable is input-enabled.

    • ISMANDATORY

      If you enter ISMANDATORY, the function checks if the variable is mandatory.

    • TECHNICALNAME

      If you enter TECHNICALNAME, the technical name of the variable is displayed.

Example

Cell F20: =SAPGetVariable("DS_2";"0BW_VAR";"DESCRIPTION")

If you enter the formula in cell F20, the name of variable 0BW_VAR is displayed in cell F20.