Mentor SAP
In our example, the filter condition reduces the cardinality of the association to “0..1”: for a given language, TCURT contains a maximum of one entry per currency code. To document this – and to make the syntax warnings and errors go away – you can specify cardinality “1” in the filter condition of a path expression.

 

Annotation comparedFilter

 

By default, every new path expression with a filter condition will lead to a separate join in the generated SQL view. This happens even if the filter conditions are identical.

 

ABAP annotation AbapCatalog.complier.compareFilter can be used to specify whether the filter conditions are compared for the path expressions of a view. If the filter condition matches, the associated join expressions are created only once, which generally improves performance.

 

In the example above, the filter conditions in the two path expressions are identical. Annotation ABAPCatalog.complier.compareFilter is listed with value false. This makes the system generate two separate joins of scar and tcurt to retrieve fields ktext and ltext. With value true, the system would compare the filters, realize that they are identical, and use just one join to retrieve the two fields.