SAP OS QUERY TERMS



Get Example source ABAP code based on a different SAP table
  



ABAP_OS - Query Service, Overview
A query is used to search for persistent objects in the database using conditions and to create the corresponding instances of the persistent class in the ABAP program.
A query is implemented by an object (query object) that implements the interface IF_OS_QUERY and is created by a query manager.
A query is a logical expression that compares the attributes of a persistent class with freely selectable parameters or values, known as the query condition. Those objects are loaded whose attributes meet the query conditions. A query also contains a sort condition, which determines the order of the loaded objects in the results table.
When a query is created using the query manager method CREATE_QUERY , the query conditions and sort conditions are passed to it.
The query itself is merely a container for the query condition and the sort condition. A query is executed by calling the interface method IF_OS_CA_PERSISTENCY~GET_PERSISTENT_BY_QUERY in the class agent of a persistent class. Similarly, the result of an executed query is not bound to the query, and it is returned by the method of the class agent as a table of references instead.



Latest notes:

When the result set of a query is determined, the changes that are made to persistent objects in the current transaction are ignored. The query is executed directly in the database.
ABAP_HINT_END