
In BOPF, a determination is an entity of a business object node that is used to provide functions that are automatically executed as soon as a certain trigger condition is fulfilled. A determination is triggered internally on the basis of changes made to the node instance of a business object. The trigger conditions are checked by BOPF at different points during the transaction cycle, depending on the determination times and the changing operations on the relevant node instances. For each determination, it is necessary to specify both the points of time and the changes that form the trigger condition. Changes can include creating, updating, deleting, or loading node instances. You can use a determination primarily to compute data that is derived from the values of other attributes. The determined attributes and the determining attributes of the trigger condition either belong to the same node or to different nodes.
After changing the quantity of invoice items, the trigger conditions of the CALCULATE_ITEM_AMOUNT determination and the CALCULATE_TOTAL_AMOUNT determination are both fulfilled. The CALCULATE_ITEM_AMOUNT determination calculates the amount of the changed item (price x quantity), whereas the CALCULATE_TOTAL_AMOUNT determination sums up the amounts of all items to the total amount of the invoice.
Depending on the use case in question, BOPF checks the triggers of a determination at several points during the transaction.
A determination time defines at what time in the transaction cycle the trigger condition of that determination should be evaluated. For example, the re-calculation of the invoice amount should take place every time after a modification is performed (determination time: After Modify), but only if there are instances of the ITEM node that were updated (trigger: Update).
The following list shows which trigger operations are evaluated at which determination times:
Trigger > -------------------------------Determination Time |
Create |
Update |
Delete |
Load |
Determine |
|---|---|---|---|---|---|
| After Modification | X | X | X | ||
| Calculate Transient Attributes | X | X | X | X | |
| During Check and Determine | X | ||||
| Before Save | X | X | X | ||
| Draw Number During Save | X | X | X | ||
| During Save | X | X | X | ||
| After Successful Save | X | X | X | ||
| After Cleanup Transaction | X | X | X | ||
| After Failed Save | X | X | X |
If, in the example above, you do not define any dependencies between the determinations, the system might calculate the total amount before the item amount. Therefore, you must specify the
CALCULATE_ITEM_AMOUNT determination as a predecessor of the CALCULATE_TOTAL_AMOUNT determination.To specify whether a determination is a predecessor or a successor of another determination, you define a determination dependency. If there is more than one determination to be executed, the dependencies of the determinations are considered when BOPF checks the trigger conditions of determinations.
Example
The following dependency is defined in such a way that the item amount is calculated before the total amount.
| Node: Determination | Dependency |
| ROOT: CALCULATE_TOTAL_AMOUNT | Determination depends on CALCULATE_ITEM_AMOUNT |
| ROOT > ITEM: CALCULATE_ITEM_AMOUNT | Determination must be executed before CALCULATE_TOTAL_AMOUNT |
Dependency defines the execution order of determinations:

Examples of valid execution orders are:
4, 1, 3, 2, 5 (for example, the determination DET 2 is always executed before the execution of DET 5)
1, 2, 5, 4, 3 (for example, DET 1 is always executed before the execution of DET 2).
Depending on which category of nodes comes into play when executing determinations, there are two different determination types available:
The determination logic is encapsulated within an ABAP class that implements the determination interface /BOBF/IF_FRW_DETERMINATION.
More on this: Understanding the Determination API