SAP / SAP Mid Level (3 to 8 yrs) Interview questions
How do you expose backend data as an OData service?
There are two main paths, reflecting the classical and modern (RAP) approaches: classical SAP Gateway service generation from a CDS View or manual service implementation, or the newer RAP approach using a service definition and service binding.
" RAP approach: define which CDS Views a service exposes define service Z_CUSTOMER_SRV { expose Z_C_CustomerList as CustomerList; } " then activate a service binding (e.g. OData V4, UI) to make it callable
In the classical approach, a CDS View annotated @OData.publish: true auto-generates a basic
service, or a developer manually implements a Gateway service class handling the CRUD logic explicitly. In the
RAP approach, the service definition declares which CDS entities to expose, and a service binding activates a
specific protocol version (like OData V4) against that definition — the currently recommended, more
structured approach for new development.
More Related questions...
