RAP_CDS_ODATAintermediate
EML
Use RAP Entity Manipulation Language to read and modify RAP business objects directly from ABAP with type-safe operations. Learn READ/MODIFY ENTITIES, create-by-association, actions, MAPPED/FAILED/REPORTED, local mode and transaction handling with COMMIT ENTITIES.
Overview
Use RAP Entity Manipulation Language to read and modify RAP business objects directly from ABAP with type-safe operations. Learn READ/MODIFY ENTITIES, create-by-association, actions, MAPPED/FAILED/REPORTED, local mode and transaction handling with COMMIT ENTITIES.
Lessons in this topic
- EML Part 1: What EML Is — READ, MODIFY and COMMIT ENTITIESLearn Entity Manipulation Language (EML) — the ABAP statements to read, change and commit RAP business objects — with the short and long forms, response parameters, and where EML is used.
- EML Part 2: %cid, %cid_ref, MAPPED, FAILED and REPORTEDMaster the correlation and response side of EML: %cid and %cid_ref for linking new instances, deep creates, MAPPED for final keys, FAILED with %fail-cause, and REPORTED messages — and how to evaluate them correctly.
- EML Part 3: IN LOCAL MODE — What It Bypasses and When It Is SafeUnderstand exactly what IN LOCAL MODE skips — authorization and feature control — what it does not skip, why it is needed inside a behavior pool, and why using it to call other business objects is wrong.
- EML Part 4: Cross-BO Calls, COMMIT ENTITIES and ROLLBACK ENTITIESCall other business objects safely with EML: changing a second BO from inside your BO, orchestrating several BOs from a program, where COMMIT ENTITIES and ROLLBACK ENTITIES belong, and what happens when one of them fails.
- EML Part 5: Testing RAP with EML and Transactional ConsistencyUse EML to prove that a RAP business object behaves correctly and consistently: test structure, isolating tests, checking permissions and messages, testing draft and bulk behavior, and simulation for pre-checks.
Interview questions covered
- A mass-upload program inserts purchase requests directly into the BO tables. Requests appear in the app without status or number and some violate rules. How do you rewrite it?
- What is EML, which statements does it have, and why should programs use EML instead of updating tables directly?
- Explain %cid, %cid_ref, MAPPED, FAILED and REPORTED using a deep create of a header with two items.
- Your EML MODIFY returns no FAILED entries, but the data is not saved. Why, and how should the program evaluate results?
- What does IN LOCAL MODE skip, what does it not skip, and why is it needed inside a behavior pool?
- A purchase request action must create a budget reservation in a finance BO, but the user lacks finance authorization. A developer wants to use IN LOCAL MODE or write the table directly. What do you advise?
- How do two RAP business objects stay consistent when an action in one creates data in the other?
- A program creates records in two RAP BOs and commits after each. When the second fails, orphans remain. How do you fix the program?
- Why must EML-based tests of validations call COMMIT ENTITIES, and how do you keep such tests isolated?
- Design a test suite for a RAP business object before go-live. What must it cover?