Application-specific Enhancements 

SAP Query is a generic tool that can be used with all applications within SAP systems for reporting tasks. This generic approach has, until now, prevented SAP Query from utilizing specific application knowledge (specific application logic).

The application HR is, however, an exception. There is a range of specific HR solutions integrated into SAP Query (InfoSet generation, query target groups, and so on). These solutions are strictly coded, meaning that changes or enhancements are only possible if you modify SAP Query.

From the current Release, work has begun on enhancing SAP Query so that it is possible to evaluate application-specific logic without having to modify SAP Query itself. The procedure for setting up these enhancements is similar to that for defining and implementing Business Add-Ins.

Specific interface methods are called at different times, for example, when creating an InfoSet or during a query runtime. These interface methods are either implemented by a basis class (standard) or from a special class containing additional application logic. If you want your queries to use application-specific functionality rather than basis functionality for a particular service using an InfoSet, then you can deposit the class that implemented the corresponding interface in the InfoSet. The InfoSet then becomes a carrier for all the information on application-specific logic.

A practical example should help explain the procedure:

The interface methods IDENTIFY_TEXT or READ_TEXT for the IF_TEXT_IDENTIFIER interface are called for automatic text identification when creating an InfoSet and for reading relevant texts on query runtimes. This interface is implemented by the basis class CL_TEXT_IDENTIFIER and this implementation in turn is used by default. Texts that cannot be identified by the basis class could possibly be determined by additional logic in a particular application context. For example, the CL_HR_TEXT_IDENTIFIER class in the HR environment. In principle, the application classes can either re-implement the IF_TEXT_IDENTIFIER interface or be derived from the basis class. The relevant class for text identification is specified in the InfoSet; corresponding implementation for the interface method is called for reading texts in all queries for this InfoSet.

You can use the program RS_TEXT_IDENTIFY_TEXT to test text identification. Essentially, the class CL_TEXT_IDENTIFIER evaluates the ABAP dictionary. It can happen that texts exist for particular fields, but the link between value field and text field is not apparent in the ABAP dictionary. If this occurs, you can define exceptions in SAP reference IMG ( Basis ® SAP Query): You can, for example, specify a function module for creating a text, or create a text for a field in a table directly. The procedure for defining exceptions is described in the documentation for the IF_TEXT_IDENTIFIER interface.

The following interfaces are defined for Release 4.6C:

Automatic text identification

Interface: IF_TEXT_IDENTIFIER
Methods: IDENTIFY_TEXT, READ_TEXT
Basis class: CL_TEXT_IDENTIFIER

InfoSet generator (generation and preassignment of field groups)

Interface: IF_QUERY_INFOSET_GENERATOR
Methods: MODIFY_INFOSET
Basis class: CL_QUERY_DATASOURCE_GENERATOR

You can enter a special class in the dialog box when creating an InfoSet (More Options).

The specified service classes are displayed in InfoSet maintenance in the Application-specific Enhancements tabstrip ().