Custom Filters - Object Comparison Filters

The query specification model defines object comparison filters by using the <comparisonFilter> XML element. The object used as right operand is defined using the <objectOperand> child element.

<filterPart>
    <comparisonFilter id="string" path="string" operator="string">
        <objectOperand id="string" path="string">
<comparisonFilter> Attribute Description
id The identifier of the object used as left operand, as defined when retrieving the data source metadata
path The full path of the object in the universe
operator The operator

The following table lists the possible values of the operator attribute and the number of operands the attribute accepts.

Operator operator Attribute Value Number of Right Operands
Equal To (=) EqualTo One object
Not Equal To (<>) NotEqualTo One object
Less Than (<) LessThan One object
Greater Than (>) GreaterThan One object
Less Than or Equal To (<=) LessThanOrEqualTo One object
Greater Than or Equal to (>=) GreaterThanOrEqualTo One object
<objectOperand> Attribute Description
id The identifier of the object used as right operand
path The full path of the object in the universe

Example

The following snippet of a query specification shows an EqualTo comparison filter with one object as operand in the query.

<query xmlns="http://www.sap.com/rws/sl/universe" id="5897899822041415615" dataSourceType="unx" 
    dataSourceId="5808">
    <querySpecification version="1.0">
        <queryOptions>
           ...
        </queryOptions>
        <queryData>
            <resultObjects>
                <resultObject path="Customer|folder\Geography|folder\Continent|dimension"
                    id="_IBo8M7IhEeCk0Ylv-tlF2Q"/>
                <resultObject path="Customer|folder\Geography|folder\Country|dimension"
                    id="_IBo8NrIhEeCk0Ylv-tlF2Q"/>
                <resultObject path="SalesOrders|folder\Number of Orders|measure"
                    id="_IB8eVbIhEeCk0Ylv-tlF2Q"/>
            </resultObjects>
            <filterPart>
                <comparisonFilter path="Customer|folder\Geography|folder\Country|dimension"
                    operator="EqualTo" id="_IBo8NrIhEeCk0Ylv-tlF2Q">
                    <objectOperand id="_IBo8JzLhEeCk0Ylv-tlF2Q" path="Restrictions\Restricted Country"/>
                </comparisonFilter>
            </filterPart>
        </queryData>
    </querySpecification>
</query>