Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Processing External Data →  ABAP - Database Accesses →  Object Services 

Query Service

The query service enables persistent objects to be found and loaded using logical expressions.

To work with the query service, access to the query manager of Object Services is required. Object Services implements the interface


This access enables the method GET_QUERY_MANAGER of the system service class


The method CREATE_QUERY of the query manager can be used to create queries in the form of query objects, which can be accessed using the interface


The most important methods of a query are:


Using these methods, a filter condition is defined for the search for persistent objects, as well as a sort order for the results list.

A query is not executed directly, but using the method GET_PERSISTENT_BY_QUERY of the interface IF_OS_CA_PERSISTENCY of a class agent. This means a search is carried out for persistent objects of the associated persistent class that match the filter condition.

The options for executing a query are controlled using the interface IF_OS_QUERY_OPTIONS. To enable this, a structure of the type IF_OS_QUERY_OPTIONS=>OPTIONS can be passed to the method GET_PERSISTENT_BY_QUERY.

Other versions: 7.31 | 7.40 | 7.54


Query Service