What is RAP, and why did SAP build it when we already had SEGW, BOPF and CAP?
RAP is SAP's current ABAP programming model for building transactional, OData-ready business services. You model data in CDS, declare behavior in a behavior definition, and implement only what the framework does not do for you.
SAP built it to replace two older ways: SEGW services, where you hand-coded every provider method, and the BOPF-based Fiori model, which generated generic classes from metadata.
RAP uses typed ABAP syntax instead. SAP gives no general rule between RAP and CAP: it is a per-project decision.
RAP, the ABAP RESTful Application Programming Model, is the way to build business objects and expose them as services on ABAP. It is the recommended model for new development in S/4HANA, S/4HANA Cloud and the BTP ABAP environment.
What came before
- SEGW (Gateway Service Builder): you define the OData model, then write the provider methods (create, read, update, delete) yourself. Full freedom, but every service repeats the same plumbing.
- ABAP Programming Model for Fiori (CDS plus BOPF): business objects were generated from CDS annotations and metadata. BOPF produces classes with generic interfaces, and its object instances cannot be passed around like normal ABAP data.
- RAP: SAP Learning describes it as arriving with AS ABAP 7.54. A behavior definition plus a behavior implementation class replace the BOPF business object. The interfaces are typed ABAP, and a business object becomes something you can pass as a parameter or return from a method.
Why it matters
- Declarative first. You state what the object can do (
create; update; delete; action ...). In a managed object the framework supplies the transactional buffer and the standard save. - One model, many consumers. The same business object serves a Fiori elements app, a Web API, or another ABAP program through EML.
- Draft, locking, ETags and authorization are built in, so you do not rebuild them per service.
- Protocol-neutral. The service definition says what is exposed; the service binding picks OData V2 or V4.
Versus CAP. SAP's own RAP FAQ says no general recommendation can be given, because the decision is project-specific. A practical lens: RAP when your team, data and logic are in ABAP (S/4HANA, ABAP environment); CAP is SAP's separate, non-ABAP model on BTP.
BOPF today. SAP describes BOPF as in maintenance mode. Avoid it for new work, and keep existing BOPF objects until a migration is planned.
Interview angle: do not recite the acronym. Give the one-line pitch (CDS + behavior + service), the problem it replaced, and one concrete benefit such as draft or the managed buffer.
Gives the three-part pitch, names what SEGW and BOPF made painful, and says where CAP fits.
Spells out the acronym, says it is 'for Fiori apps and OData', and cannot say what it replaced.
Calling RAP 'just a way to create OData services'. OData is only one binding; the core is the business object and its transactional behavior.
- Is BOPF part of RAP?
- What does the RAP runtime do that SEGW did not?
- When would you build with CAP instead of RAP?
- Which release introduced RAP?
2 official pages, 3 prep guides and 2 technical references. Confidence: high. Checked 21 Nov 2026.
- Official page Backs the answer.
- Official page Backs the answer.
- Technical reference Backs the answer.
- Technical reference Backs the answer.
- Prep guide Gives the question.
- Prep guide Gives the question.
- Prep guide Gives the question.