Write an EML statement that reads travels and their bookings. What do RESULT, LINK and FAILED give you, and does the read see unsaved changes?
Say your answer out loud first.
Practise another way
I use READ ENTITIES OF the business object, not SELECT on the table. I read the travel fields I need, then read BY backslash-Booking for the children.
I add RESULT for the data, LINK for the pairs of travel key and booking key, and FAILED for keys that could not be read.
EML reads go through the transactional buffer, so inside the same transaction they return changes that are not saved yet, which a SELECT on the CDS view would miss.
The code
READ ENTITIES OF zr_travel
ENTITY Travel
FIELDS ( TravelID OverallStatus TotalPrice )
WITH VALUE #( ( TravelUUID = travel_uuid ) )
RESULT DATA(travels)
FAILED DATA(failed).
READ ENTITIES OF zr_travel
ENTITY Travel BY \_Booking
ALL FIELDS
WITH CORRESPONDING #( travels )
RESULT DATA(bookings)
LINK DATA(links)
FAILED DATA(failed_rba).
What comes back
- RESULT: a table typed
TABLE FOR READ RESULT, with the requested fields plus the key groups such as%tky. WithFIELDS ( ... )only those fields are filled;ALL FIELDSis convenient but reads more than you usually need. - LINK: pairs of source key and target key. When you read the bookings of many travels at once, LINK is how you know which booking belongs to which travel.
- FAILED: the keys that could not be read, for example because the instance does not exist. Check it before using the result.
- Read-by-association works in both directions:
ENTITY Booking BY \_Travelreads the parent of a child.
Buffer, not database. EML works on the transactional buffer. Data is loaded into the buffer when needed, and your own unsaved creates and updates in the same transaction are visible.
A SELECT on the table or CDS view reads only what is committed, and in a draft app it does not see the draft at all. To read the draft version, fill %is_draft = if_abap_behv=>mk-on in the key (that is why %tky is the safer key to pass around).
Where you write it
- From outside the BO (a class, a test, another BO): as above. Authorization and feature checks apply.
- Inside the BO's own behavior pool: add
IN LOCAL MODEso the BO's own checks do not block its internal logic.
Newer options
READ ENTITIES OPERATIONSis the dynamic form for generic code.- Cloud release 2511 added
WITH CHANGESfor managed BOs, used in implementation classes withIN LOCAL MODE. The result adds%chg, which tells you whether an instance was created, updated or deleted in the current transaction.
Interview tip: if the interviewer says "read from the database table", say politely that EML never reads tables; it reads business object entities, and that is the point.
Writes a correct READ ENTITIES with read-by-association, explains LINK and FAILED, and states that EML sees the transactional buffer including unsaved changes and drafts via %is_draft.
Writes a SELECT, or reads by association without LINK and then guesses which child belongs to which parent.
Answering with SELECT on the table. It misses unsaved changes and drafts, skips the business object's logic, and in ABAP Cloud the table may not even be released to you.
- How do you read the draft version instead of the active one?
- When do you add IN LOCAL MODE to a read?
- What does READ ... WITH CHANGES return, and where can you use it?
1 candidate write-up, 3 official pages and 1 prep guide. Confidence: high. Checked 1 Dec 2026.
- Candidate write-up Gives the question.
- Prep guide Gives the question.
- Official page Backs the answer.
- Official page Backs the answer.
- Official page Backs the answer.