Model a business transition as an action
Approval is a named business operation, not just permission to set Status = 'APPROVED'. An action gives the BO a place to validate preconditions, record an approver, and report a meaningful result.
Declare the operation
action approve result [1] $self;
The declaration belongs in the BDEF body; the implementation is written in the behavior pool. A consumer invokes the action through EML and handles its result and response tables. The exact action parameter and result types must fit the business contract.
Use an action when the operation represents behavior beyond generic CRUD. Do not model every field assignment as a custom action; standard update may be clearer for a simple editable field. Authorization and feature control still need deliberate design.
Sources
Developer practice · ABAP
Practice: declare an approval action
Declare a RAP action named approve that returns the updated request instance.
Complete the task using the syntax and structure described above. 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
action approve result [1] $self;