RAP_CDS_ODATAintermediate
Behavior Definitions
Master RAP behavior definitions as the contract for CRUD, field control, actions, determinations, validations, locks, authorization, ETags and feature control. Learn how to make the BO behavior explicit before writing implementation logic.
Overview
Master RAP behavior definitions as the contract for CRUD, field control, actions, determinations, validations, locks, authorization, ETags and feature control. Learn how to make the BO behavior explicit before writing implementation logic.
Lessons in this topic
- Behavior Definitions Part 1: Reading a BDEF as the BO ContractLearn to read any behavior definition line by line: the header, the entity header, and the entity body — and understand the BDEF as the executable contract of a RAP business object.
- Behavior Definitions Part 2: CRUD, Field Control, Numbering, Locking and AuthorizationMaster the syntax options for standard operations, field characteristics, numbering, locking and authorization — including internal operations, prechecks, readonly:update, mandatory:create and authorization:none.
- Behavior Definitions Part 3: Actions, Functions, Determinations and ValidationsDeclare business logic in the BDEF correctly: instance, static, factory and internal actions, actions with parameters, functions, determinations with the right triggers, validations, determine actions and side effects.
- Behavior Definitions Part 4: Associations, Compositions and Draft DeclarationsDeclare the relationships of a business object correctly in the BDEF: composition associations with create-by-association, read-by-association, dependent locking and authorization, and every declaration needed to enable draft.
- Behavior Definitions Part 5: Projection Behavior, Strict Mode and Stable ContractsUnderstand the BDEF layers above the base BO — projection BDEFs for services and interface BDEFs for stable reuse — plus strict mode and the rules that keep a released RAP contract stable over time.
Interview questions covered
- You join a project with an unfamiliar RAP BO. How do you understand what it allows in five minutes, just by reading its BDEF?
- What is a behavior definition, and what goes into its header, entity header and entity body?
- Explain field characteristics in a BDEF: readonly, readonly : update, mandatory, mandatory : create and features : instance. When would you use each?
- What do 'precheck', 'internal' and 'authorization : none' mean on BDEF operations, and what risks come with them?
- Which kinds of actions and functions can you declare in a BDEF? Give a use case for each.
- Users see outdated totals in a Fiori app after changing item quantities, and someone proposes a 'Recalculate' button. What would you do instead?
- Why do child entities in a RAP BDEF usually have no create operation of their own, and what must the child declare?
- After enabling draft, adding an item in the Fiori app fails. The header has 'with draft' and draft tables exist. What do you check?
- What is the difference between a projection BDEF and an interface BDEF, and when do you need each?
- A consumed RAP API must change: an optional field becomes mandatory and an action parameter changes. How do you handle it?