ERPClimb logoERPClimb
Fiori on RAP and CAP Services
Fiori & SAPUI5advanced 5 min read

Fiori on RAP Part 1: Fiori Elements Apps on RAP Business Objects

Preview · a free account unlocks the full lesson

Key takeaway

Build a transactional Fiori elements app end to end on RAP: CDS data model and projection, behaviour definition with draft, metadata extensions for UI, service definition and binding, and generating the app.

Visual overview

Fiori on RAP Part 1: Fiori Elements Apps on RAP Business Objects — learning sheetFlow: CDS data model → Behaviour definition with draft → Projection + metadata extension → Service definition and V4 binding → Fiori elements app. Key ideas: THE RAP STACK; DRAFT; UI ANNOTATIONS; SERVICE DEFINITION AND BINDING. Watch out: Putting business logic in the UI instead of the behaviour implementation duplicates rules.ERPClimb.com / FIORI / LESSON 11/16 / LEARNING SHEETFiori on RAP Part 1: Fiori Elements Apps on RAP BusinessObjects1 · HOW IT FLOWS1CDS datamodel2Behaviourdefinitionwith draft3Projection+ metadataextension4Servicedefinitionand V4…5Fiorielementsapp2 · KEY IDEAS EXPLAINEDThe RAP StackA RAP business object consists of CDS viewsmodelling the data and its composition, abehaviour definition describing operations…DraftDeclaring with draft in the behaviour definitiongives drafts: users edit in a draft that is savedcontinuously and activated on Save. Fiori elements…UI AnnotationsMetadata extensions on projection views hold @UIannotations for list report and object page: lineitems, selection fields, header info, facets and…Service Definition And BindingThe service definition lists the projection viewsexposed. The service binding chooses the protocol— OData V4 for UI is recommended — and publishes…3 · REMEMBER · WATCH OUTRememberRAP provides the back end: CDS views, behaviour definitions andimplementations, service definitions and bindings.Draft handling in the behaviour definition gives Fiori elements edit,save and discard behaviour.UI annotations live in metadata extensions on projection views.!Watch outPutting business logic in the UIinstead of the behaviourimplementation duplicates rules.4 · IN A REAL PROJECTA team built a custom approval app with a freestyle UI that implemented validations in JavaScript and wrotedirectly through a generic OData service. Rebuilding it as a RAP business object with draft, validations andactions, plus a Fiori elements UI, cut UI code by most of its size and made the rules enforceable for APIs…Original ERPClimb learning sheet • Verify against your SAP release and edition

Explanation

This series connects Fiori to modern back ends, and Part 1 uses ABAP RAP.

A RAP business object consists of CDS views modeling the data and its composition, a behavior definition describing operations such as create, update, delete, actions, validations and determinations, and a behavior implementation written in ABAP. Projection views and a projection behavior then expose a subset of this for a specific app.

Declaring draft in the behavior definition gives the object draft handling: users edit in a draft that is saved continuously and activated on Save. Fiori elements recognizes draft-enabled services and provides edit, save, discard and lock handling automatically, without extra app code.

Free account

Create a free account to keep reading

You have read the opening of this lesson. A free ERPClimb account unlocks the rest of it, every other lesson and topic, and your learning history, so you can pick up exactly where you stopped. No card needed.

  • Full explanation
  • Real project scenario
  • Common mistakes
  • Best practices
  • Interview angle

One tap with Google works too. Every topic keeps its first lesson open to everyone.

Keep exploring

Check before use: lesson examples are educational, not a guarantee of correctness for your SAP edition or release. Sample code has not been executed on your SAP system. Confirm API availability, syntax, authorizations and business impact in an approved development or test environment.