Send a focused update
The buyer changes a request’s status, but not its supplier or requested quantity. UPDATE FIELDS ( Status ) states the intended scope directly, avoiding a broad resend of fields that the caller did not mean to change.
Update through the RAP entity
MODIFY ENTITIES OF ZR_PURCHASE_REQUEST
ENTITY Request
UPDATE FIELDS ( Status )
WITH VALUE #( ( RequestId = 'PR-2205' Status = 'IN_REVIEW' ) )
FAILED DATA(failed)
REPORTED DATA(reported).
The BO’s behavior definition and implementation decide whether the transition is allowed. Inspect FAILED and REPORTED; don’t interpret a submitted EML statement as proof that the status changed or was persisted. The update participates in the RAP transactional buffer until the save sequence is triggered.
For a long-form update, field control can be represented in the derived type. Use the generated BO types in ADT and keep the requested field list aligned with the supplied values.
Sources
Developer practice · ABAP
Practice: send a status-only update
Update only the Status field of request PR-2205 to IN_REVIEW and capture the RAP responses.
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
UPDATE FIELDS ( Status )
WITH VALUE #( ( RequestId = 'PR-2205' Status = 'IN_REVIEW' ) )
FAILED DATA(failed)
REPORTED DATA(reported).
DATA(result) = 'Status update 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.