What is the significance of Determination in the RAP framework?

A determination is an optional component of business object behavior that alters instances of business objects based on specific trigger conditions. This are implemented in behavior pool through a dedicated method name specified in BDEF under local handler class.
Determinations are defined in the entity behavior definition with the following statement:
determination <determination_name> <trigger time> { <trigger_conditions> }.
Let’s understand each one step by step
<determination_name> : The name you provide to your determination. The method will get created with this name under local class of Behavior pool
<trigger time> : For determinations, the following trigger times are available
on modify : The determination is executed immediately after data changes take place in the transactional buffer so that the result is available during the transaction.
on save  : The determination is executed immediately after data changes take place in the transactional buffer so that the result is available during the transaction.
<trigger_conditions>  : It is mandatory to provide at least one trigger condition within the curly brackets. We have 4 options for <trigger_condition>.
create : Determination is executed when an instance is created.
update : Determination is executed when an instance is updated
delete : Determination is executed when an instance is deleted
field <field1>, <field2> : Determination is executed when the value of one of the specified fields is changed by a create or update operation.
Multiple trigger conditions can we combined together.
Key Points
⊙ The execution order of determination is not fixed. If there is more than one determination triggered by the same condition, you cannot know which determination is executed first.
⊙ Determination handler methods have a response parameter reported which allows you to report messages in the determination implementation which are not visible in method definition.
⊙ Click on Ctrl + 1 to get suggestion for adding implementation method in local class of behavior pool class
Exceptions:
⊙ For determinations defined as on save, trigger condition update; works only in combination with the trigger condition create
You have successfully learned how to implement how to implement determination in ABAP RAP.

Leave a Comment

Your email address will not be published. Required fields are marked *