Submit a create operation to the BO
Creating a request means more than inserting a row: the RAP BO may validate fields, derive values, or assign a key. EML expresses the create request in terms of the business object.
Name the fields and a request-local ID
MODIFY ENTITIES OF ZR_PURCHASE_REQUEST
ENTITY Request
CREATE FIELDS ( RequestId SupplierId Status )
WITH VALUE #( ( %cid = 'new-2203'
RequestId = 'PR-2203'
SupplierId = 'SUP-043'
Status = 'OPEN' ) )
MAPPED DATA(mapped)
FAILED DATA(failed)
REPORTED DATA(reported).
%cid identifies this operation’s content within the EML request, especially when a final key is not available yet. MAPPED, FAILED, and REPORTED are not optional success decorations; they describe how the BO handled the request. The operation first changes the RAP transactional state; persistence is a later transaction step.
This fictional entity and field set must be replaced with actual generated types from a BO. Do not assume every BO permits the requested fields or client-supplied key.
Sources
Developer practice · ABAP
Practice: create a draft request instance
Use EML to submit a new request with a content ID, request ID, supplier, and OPEN status.
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
Write your solution, then check its structure.
One possible solution
MODIFY ENTITIES OF ZR_PURCHASE_REQUEST
ENTITY Request
CREATE FIELDS ( RequestId SupplierId Status )
WITH VALUE #( ( %cid = 'new-2203'
RequestId = 'PR-2203'
SupplierId = 'SUP-043'
Status = 'OPEN' ) )
MAPPED DATA(mapped)
FAILED DATA(failed)
REPORTED DATA(reported).
DATA(result) = 'Create request sent to the BO'.
WRITE result.out->write( result ).These are context-specific output examples. In your own program, use the result variable from your solution and the output mechanism available in that program.