ERPClimb logoERPClimb
Login
All topics
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

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?

How to study Behavior Definitions

Behavior Definitions has 5 lessons (4 intermediate, 1 advanced) with about 50 minutes of reading in total. Start with the lesson that matches your level, then read the real project scenario and common mistakes in each one before moving on. After the lessons, say the 10 interview questions out loud in your own words, then check yourself against the model answer in each question (shown once you open it). Use the 18 mock questions to check recall. Finish with the 1 code lab scenario: read the buggy code first, say what is wrong, and only then open the optimized version.

Mock test questions covered

Try answering each one before you open the mock test; the answer options and scoring are in the Mock Questions tab.

  • An external reference may be set when a request is created but never changed afterwards. Which field characteristic expresses this?
  • A recalculation action must be callable by other handlers of the BO but never by UI or API consumers. How is it declared?
  • How does a projection BDEF make the base action approve available to its service?
  • Why would you create an interface BDEF on top of a RAP business object?
  • What does strict ( 2 ) in a BDEF do?
  • Document numbers must be gap-free and assigned only when the save is certain. Which BDEF numbering option fits?
  • A field in a behavior definition is declared with the static field characteristic 'readonly'. If the field should sometimes be editable depending on business logic (e.g., only before an order is confirmed), what must the developer do?
  • Totals must always be recalculated when item quantities change, whatever channel changes them. Which BDEF element fits?
  • When a RAP business object's behavior definition includes the statement 'with draft;', which of the following is required and automatically enabled?
  • In a RAP behavior definition, what is the purpose of the 'mapping for' addition?
  • In a RAP behavior definition, determinations can be triggered either 'on save' or 'on modify'. Which statement correctly characterizes the difference between these two trigger points in the RAP save sequence?
  • How should a BDEF prevent request items from being created without a parent request?
  • In a composition hierarchy where a root entity is declared with 'lock master' and a dependent child entity is declared with 'lock dependent by _Association', what does this configuration achieve?
  • What role does the 'etag master' field designation play in a RAP behavior definition?
  • In a RAP behavior definition, an operation such as update is declared with the addition 'authorization: none'. What effect does this have?

Code lab scenarios

  • Reported Without Failed — a Validation That Warns But Never BlocksUsers report that a "blank customer" error message appears on save, but the document saves anyway with the blank customer still in it. The validation clearly runs — the message shows up — so why doesn''t it stop the save?

Related topics

Interview questions on this topic