What does IN LOCAL MODE do in EML, and when should you use it?
Say your answer out loud first.
Practise another way
IN LOCAL MODE makes an EML statement skip feature control, authorization checks and prechecks. It is meant for code inside the business object's own behavior pool, where the BO talks to itself, for example a determination that sets a read-only field.
Consumers outside the BO must not use it. It does not skip the transactional logic: validations and determinations still run, and nothing is saved until the framework commits.
IN LOCAL MODE is an addition to READ ENTITIES and MODIFY ENTITIES. It suppresses feature controls, authorization checks and prechecks for that statement.
Why it exists
- Inside a handler, the BO is the trusted caller. Authorization was already checked for the user's request, so checking again for each internal step wastes time or blocks valid logic.
- Feature control such as
field ( readonly )or an instance feature that disables an action is aimed at consumers. A determination that fills a read-only field would be rejected without local mode.
METHOD set_initial_status.
MODIFY ENTITIES OF zr_travel IN LOCAL MODE
ENTITY Travel
UPDATE FIELDS ( OverallStatus )
WITH VALUE #( FOR k IN keys
( %tky = k-%tky OverallStatus = 'O' ) )
REPORTED DATA(upd_reported).
ENDMETHOD.
Who may use it
- Handler and saver classes of the BO.
- ABP auxiliary classes declared with
auxiliary classin the BDEF, which get the same enhanced access rights. - Not consumers: an OData client, an unrelated report or another BO. They go through the normal path with all checks.
What it does not do
- It does not skip validations or determinations. Those still run on the buffer changes.
- It does not commit. The save sequence is still the framework's job.
Related addition: PRIVILEGED. It lets code call another BO bypassing authorization checks, for special cases like a technical background job. Use only when the business case is clear, and document it, since it removes a security control.
Strict mode link. With strict ( 2 ) and a modern release, SAP's static checks help catch wrong use of EML inside behavior implementations.
What to say if asked about risk: local mode is a convenience for the BO's own code. Using it in a consumer is a security bug, because the user could then change data they are not allowed to.
Says what is skipped, who may use it, and that validations and determinations still run.
Says 'it is a faster EML mode', or uses it from outside the BO to avoid authorization errors.
Using IN LOCAL MODE in a consumer program to get past an authorization failure. That hides a missing role instead of fixing it.
- Does a determination fire when you modify with IN LOCAL MODE?
- How is PRIVILEGED different?
- Can an ABP auxiliary class use IN LOCAL MODE?
- How would you write a unit test for a determination?
2 official pages. Confidence: high. Checked 21 Nov 2026.
- Official page Backs the answer.
- Official page Backs the answer.