Implementation of Queries 
Node attribute queries cannot be implemented. Business Object Processing Framework (BOPF) provides the logic of these queries.
To create a custom query, the implementing class of the query must be implemented. This class corresponds to a common ABAP class (with the /BOBF/IF_FRW_QUERY interface implemented). If you create the query using Business Object Builder (BO Builder), the generated class already implements this interface.
The query interface consists of the following methods:
Method |
Description |
|---|---|
QUERY |
This method contains the business logic of the query. |
RETRIEVE_DEFAULT_PARAM |
If the query has a parameter maintained, this method can be implemented to provide the consumer with a default parameter. |
The following source code provides you with an example of a generic result query to read the attributes of several business object node instances with one SELECT statement:
Syntax
" return pairs of attributes located on different nodes of the same BO " - INVOICE_ID (located on the ROOT node) " - ITEM_ID (located on the ITEM node) "... DATA lt_result TYPE /CI/S_QUERY_INVOICE_ID. SELECT root~db_key AS key root~invoice_id item~item_id FROM /CI/D_ROOT AS root INNER JOIN /CI/D_ITEM AS item ON root~db_key = item~parent_key INTO TABLE lt_result. et_data = lt_result. "...