ERPClimb logoERPClimb

SAP RAP / CDS / OData OData V4 Interview Questions

In SAP RAP / CDS / OData rounds, odata v4 questions are where configuration knowledge meets day-to-day behaviour — what a setting does, and what breaks in a live system when it is wrong.

Understand OData V4 as the strategic service protocol for many modern RAP scenarios. Learn entity sets, navigation, actions, metadata, concurrency, deep operations, query behavior, service bindings and the practical differences from classic Gateway OData V2.

This page carries 12 reviewed SAP RAP / CDS / OData odata v4 interview questions, each with a complete written answer and no sign-in required. The set breaks down into 2 foundational, 8 mid-level and 2 advanced questions, so you can start at the top for a first interview or skip ahead to the scenario-based items for a senior round.

Rehearse these out loud rather than reading them. If you can explain each answer in your own words, including one realistic way it goes wrong on a project, you are covering what a normal SAP RAP / CDS / OData round on odata v4 expects.

12 OData V4 questions with answers

easyOData V4

1. Why should you inspect OData V4 metadata before manually constructing CRUD requests?

The metadata is the public service contract. It tells the client the entity-set names, keys, property names and types, navigation properties, actions/functions and annotations. Guessing names from the CDS source can produce invalid requests because the public projection/service can expose a different contract.
easyOData V4

2. Explain the OData V4 contract: what does $metadata contain and which query options exist?

$metadata defines entity types (properties, types, keys), entity sets, navigation properties with bindings, actions/functions and annotations — the contract clients rely on. Query options: $select, $filter (eq, ne, gt, lt, and/or, contains, startswith), $orderby, $top/$skip, $count, $expand with nested options, $search. RAP draft entities have IsActiveEntity in the key. The RAP V4 URL includes binding, service definition and version.
mediumOData V4

3. How does optimistic concurrency with ETags work in a RAP OData V4 service?

The etag master field (e.g. LocalLastChangedAt) is returned as @odata.etag/ETag on read. Clients send it in If-Match on PATCH/DELETE/actions. RAP compares: equal → proceed; different → 412 Precondition Failed; missing where required → 428. If-Match: * bypasses the check and must not be used by business clients. The field must change on every modification (managed via @Semantics; unmanaged in code). Draft adds the total etag for activation.
mediumOData V4

4. A RAP OData V4 service works in Fiori preview, but a direct API POST fails. How would you isolate whether the problem is in OData exposure or the RAP business object?

I would start with the service metadata and reproduce the exact POST outside the UI. Then I would compare the HTTP status and RAP messages. If an equivalent EML create succeeds, the business object is likely healthy and I would focus on the OData path, payload shape, authentication, entity-set name, draft state and concurrency headers. If EML also fails, I would investigate the RAP behavior, validation, authorization or data state.
mediumOData V4

5. How do you publish a RAP OData V4 service and make it usable for a Fiori app and an integration?

Two service definitions on separate projections (UI with draft, API without draft), each with a service binding: OData V4 – UI for the Fiori app, OData V4 – Web API for the integration. Activate and publish; note URLs (srvd vs srvd_a2x) and versions; assign service authorizations/roles (communication arrangements for technical users in cloud); test with preview and a REST client including CSRF; document the API contract.
mediumOData V4

6. A mobile approval app sometimes overwrites budget corrections made minutes earlier. What is the cause and fix?

Lost updates: the app either ignores ETags or sends If-Match: *. Fix the client to store @odata.etag on read, send it in If-Match on writes, handle 412 by reloading and asking the user to review, and use the new ETag after successful writes. On the backend, ensure etag master is defined and maintained, and require If-Match (428) so no client can skip it.
mediumOData V4

7. How are RAP actions, functions and draft actions called over OData V4, and when do you use $batch change sets?

Bound actions: POST on the entity URL with the namespaced action name from $metadata; parameters as JSON body; functions: GET with parentheses; draft: POST Edit on the active instance, Prepare/Activate on the draft, DELETE the draft to discard. $batch bundles requests; requests in one change set (atomicityGroup) run as one RAP transaction — all or nothing; separate change sets are independent. Use change sets when several steps must succeed together (e.g. create + approve).
mediumOData V4

8. Map OData HTTP status codes to their typical causes in RAP services.

400 — malformed request, unknown property, wrong type or business rejection (validation/feature control); 401 — authentication; 403 — CSRF failure or missing authorization; 404 — not published, wrong URL/version or key not found (e.g. IsActiveEntity missing); 405 — operation not exposed in projection BDEF; 409 — lock conflict; 412 — ETag mismatch; 428 — If-Match missing; 500 — dump/unhandled exception. Always read the error body; use /IWFND/ERROR_LOG, ST22 and ABAP Cross Trace.
mediumOData V4

9. A reporting tool extracts purchase requests via OData and times out at night. What do you change?

Analyze the requests: likely no $select, $expand of to-many navigation, no paging, full loads. Fix: $select only needed fields; filter deltas (e.g. LastChangedAt gt last run); page with $top/$skip and stable $orderby; expand items only when needed or read them separately; consider a dedicated read-only API projection. Measure backend time with traces and agree limits with the consumer.
mediumOData V4

10. An integration gets 403 on every POST to a new RAP V4 service, but GETs work. What is going on?

Most likely CSRF: writes require a token. The client must GET with header X-CSRF-Token: Fetch, then send the returned token and the session cookies with POST/PATCH/DELETE. The response body says "CSRF token validation failed". If the body indicates missing authorization instead, check the service start authorization and BO authorization. Also check the client uses the Web API binding (srvd_a2x) — a UI service with draft would create drafts.
hardOData V4

11. Which design rules do you apply to OData V4 APIs built with RAP?

Separate UI and API services; API without draft; expose only needed entities and operations; business aliases and stable names; version breaking changes; require ETags; clear RAP messages with field targets; support $select/$filter efficiently (CDS design, indexes); document URLs, authentication, CSRF and error format; provide change sets or deep create for atomic operations; monitor with error logs.
hardOData V4

12. You inherit an OData V4 integration landscape built on RAP. What do you review?

Binding types per consumer (UI vs Web API), draft exposure to integrations, service versions and breaking-change history, ETag enforcement, CSRF handling in clients, $select/$expand usage and paging, error handling and message quality, authorization for technical users, error log trends (/IWFND/ERROR_LOG), performance traces for heavy calls, and documentation of consumers.

Related lesson

OData V4 Part 5: Troubleshooting HTTP Errors, Metadata and Payloads

Related topics

Next practice step

Go deeper on this topic