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:
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.
Technical name of the dimension to be filtered.
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.
Single member as text.
Single member as key.
Single member with its internal key.
Complex selection of members.
Returns the input string as string as array.
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.
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.