A delete is a business operation, not a table command
Deleting a request may require checking its lifecycle, child records, or authorization. Submit the operation through the RAP BO so its behavior can decide whether deletion is allowed.
Address the instance by its key
MODIFY ENTITIES OF ZR_PURCHASE_REQUEST
ENTITY Request
DELETE FROM VALUE #( ( RequestId = 'PR-2206' ) )
FAILED DATA(failed)
REPORTED DATA(reported).
The key name is illustrative; use the actual key components from the BO. Inspect the response tables to determine whether the instance was accepted for deletion. The statement changes the transactional state; it does not mean the database has already committed.
Never replace this with a direct DELETE FROM against a RAP object’s persistence table. That bypasses BO behavior and can break consistency.
Sources
Developer practice · ABAP
Practice: delete a request by key
Submit an EML delete for request PR-2206 and capture FAILED and REPORTED.
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
DELETE FROM VALUE #( ( RequestId = 'PR-2206' ) )
FAILED DATA(failed)
REPORTED DATA(reported).
DATA(result) = 'Delete request submitted'.
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.