Ask the business object to apply its rules

A purchase request may have checks, authorization rules, derived fields, and a transaction lifecycle. Updating its database table directly can bypass those behaviors. ABAP EML is the ABAP interface for interacting with RAP business objects; it is not simply a shorter UPDATE statement.

Address the business object

READ ENTITIES OF ZR_PURCHASE_REQUEST
  ENTITY Request
  ALL FIELDS WITH VALUE #( ( RequestId = 'PR-2201' ) )
  RESULT DATA(request_data).

ZR_PURCHASE_REQUEST is a fictional behavior-definition name and Request is its illustrative entity alias. In a real project, both and the generated key/field types come from the RAP artifacts. EML works with the BO’s transactional behavior and buffer, not directly with a table name.

Managed BOs provide standard CRUD behavior in the RAP runtime; unmanaged BOs require more implementation. In either case, consumers must handle responses and follow the owning transaction. Do not copy these names into a system where the corresponding objects do not exist.

Sources

Developer practice · ABAP

Practice: identify the business-object entry point

Read a request through a fictional RAP business object and count the returned rows. Do not select its persistence table directly.

Choose your ABAP environment

This choice changes the output pattern checked here: WRITE belongs in a classic executable report, while out->write( ) uses the supplied output reference in an ABAP Cloud class-run method. It does not switch the language version of the other code; check release and API availability in your target system.

Complete the task and include the output statement shown for your selected environment. Variable names can differ if you use them consistently. This browser checker checks structure only; it does not compile or run ABAP.

0 required structures detected · 0 checks