Show TOC

SAPSetFilterLocate this document in the navigation structure

With this API method, you can define which members of a dimension should be filtered. You can also use this method to define the filter for a planning function.

To call the method, use Application.Run and specify the following input parameters:

  • Formula Alias

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

  • Dimension

    Technical name of the dimension to be filtered.

  • Member

    String that represents the member filter for the dimension, for example technical names or a variable. The "ALLMEMBERS" string or an empty string clears the filter and selects all members. Note the syntax rules for entering values.

  • Member Format
    • Text

      Single member as text.

    • Key

      Single member as key.

    • INTERNAL_KEY

      Single member with its internal key.

    • INPUT_STRING

      Complex selection of members.

    • INPUT_STRING_AS_ARRAY

      Returns the input string as string as array.

    • LITERAL

      Single member with its internal key.

      With this value format, no immediate validation with the back-end system is executed. This improves the performance.

      This format is only valid if you set the prompt value with its internal key and you use the syntax rule Equal To.

      If the entered member is not valid, a message is displayed.

    This parameter is optional. The default value is INPUT_STRING.

    Note The KEY and INTERNAL_KEY depend on the InfoObject modeling in SAP NetWeaver BW.
The system returns one of the following output parameters for each function execution:
  • 0 = execution failed.
  • 1 = execution successful.

Example

Dim lResult as long

lResult= Application.Run("SAPSetFilter", "DS_1", "0SOLD_TO__0COUNTRY", "CA;US;DE", "INPUT_STRING")

With this example, you set the filter for dimension 0SOLD_TO__0COUNTRY of data source DS_1 to the countries USA, Canada and Germany using member format INPUT_STRING.