Building Services with the SAP Cloud Application Programming Model (CAP)
Course quiz
Building Services with the SAP Cloud Application Programming Model (CAP)
Keep this: job aid
CAP service build checklist
- Model only what the app owns; read SAP S/4HANA data through released APIs.
- Use cuid and managed; associations for references, compositions for contained parts.
- Reverse-domain namespace; plural capitalized entity names; flat models.
- One service per use case and audience; expose projections, not tables.
- Declare validation with @mandatory and @assert before writing handlers.
- Handlers: before to check, on to do, after to shape results; req.reject with meaningful status codes.
- cds import the API spec into srv/external and keep it in source control as the contract.
- Mock remote services locally with realistic .csv data; real credentials only in the [production] profile.
- Fiori annotations in app/ files; enable drafts for multi-step edits; add value helps.
- Test the UI with business roles, and record which CAP version the project uses.