In the RAP (RESTful ABAP Programming Model), Unmanaged Query Implementation refers to a scenario where the developer manually implements the data retrieval logic for a query instead of relying on the automatic query handling provided by the framework. Normally, in a managed scenario, the framework automatically handles standard operations like READ, CREATE, and UPDATE using the CDS data model. However, in certain cases — such as when the data comes from external systems, non-ABAP sources, or complex joins not suitable for CDS views — automatic handling is not possible.
In such cases, you define a Query Behavior Definition (behavior definition for a query) and then implement it manually using an Unmanaged Query Implementation Class. This class must implement the interface IF_RAP_QUERY_PROVIDER, particularly the method IF_RAP_QUERY_PROVIDER~SELECT, which contains the ABAP logic to fetch and return data. This approach gives full control over query execution, filtering, and pagination. It’s typically used in integration scenarios or custom reports where CDS-based managed queries are insufficient.