EML Part 3: IN LOCAL MODE — What It Bypasses and When It Is Safe
Preview · a free account unlocks the full lesson
Understand 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.
In this lessonShow sectionsHide sections
Explanation
Parts 1 and 2 used EML from outside the BO. Inside a behavior implementation, though, the code almost always writes READ/MODIFY ENTITIES … IN LOCAL MODE, and this part explains why.
IN LOCAL MODE exists to solve a specific problem: the BO itself must sometimes do things its consumers aren't allowed to do. An approve action sets Status, but Status is declared "field ( readonly )". A determination sets TotalAmount, which is also read-only.
An action might change an approved request's status to closed, even though feature control disables update for approved requests. And internal operations, such as "internal action recalcTotal", are only callable by the BO itself. Without local mode, RAP would apply the same checks to this internal code as it applies to an external caller, and reject these changes outright.
What IN LOCAL MODE actually skips is narrow: authorization checks, both global and instance, for that particular EML statement; feature control, both static and instance, including read-only fields and disabled operations; and it also makes it possible to call internal operations.
What it does not skip matters just as much: determinations and validations still run as triggered, so the BO's own business rules still apply; locks and ETag handling from the framework are unaffected; draft handling still works, with %tky deciding draft versus active; and the save sequence is unchanged, meaning the change still only sits in the buffer until commit. So local mode really means "the BO trusts itself" — not "anything goes."
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
- Code example
- 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
Interview questions on this topic
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.