Procedures in SAP AVC employ an imperative model by executing a specific sequence of statements to derive values. While constraints are generally preferred, some applications still require the use of procedures.

The procedure runs only once per processing cycle and does not re-evaluate within that same roundtrip.
The execution of a procedure strictly distinguishes between the left and right sides of an assignment operator:
- the right side is for reading
- the left side is for writing
The primary purpose of a procedure is to calculate a value and explicitly assign it to a characteristic.
Addtionally, procedures can actively remove a characteristic’s valuation, an action that is not possible within the declarative logic of a constraint.
In exceptional cases, a procedure can be used to indirectly exclude values from a characteristic’s domain.

The execution order for multiple procedures is controlled by an assigned sort number. They are processed in ascending order (e.g., 10, 20, 30), and this entire sequence runs only once per processing roundtrip
Within any single procedure, the system executes the statements from the first statement at the top to the last statement at the bottom. The outcome of a previous statement is available to all subsequent statements.
The execution flow of procedures is governed by a strict, two-level order that determines if and when a procedure is run:

If the expression on the right side of a procedural statement is ambiguous - for example, if a needed value is missing - the system implicitly skips that specific statement and continues execution with the next statement.
The EXIT IF syntax gives you explicit control to terminate the entire procedure based on a condition you define. All subsequent statements within that same procedure are ignored and will not be executed.
Caution
Unlike AVC’s behavior of skipping a single line, classic LO-VC will stop processing the entire procedure if it encounters a statement with a missing value.

The unidirectional nature of procedures means that the left and right sides of an assignment serve distinct functions and are governed by different rule.
Characteristic to the left of the operator:
- must refer to $SELF: the characteristic being changed must belong to the current object where the procedure is running
- is the target of the action: Its value can be set, retracted have its domain restricted
Characteristic to the right of the operator:
- can refer to $SELF, $PARENT or $ROOT
- are unchangeable: the values of characteristics on the right side are used for reading only
- must be valued: for the statement to execute correctly, any characteristic on the right side must have a value. If a value is missing, the statement is skipped.
Characteristics used within conditional logic, such as in an IF statement, must follow a specific set of rules:
- can refer to $SELF, $PARENT or $ROOT
- are unchangeable: the characteristics are used for reading only; their values cannot be modified within the condition itself
- must be valued: the condition check relies on the characteristic having an assigned value to evaluate correctly
If a characteristic used within a condition is not valued, the condition cannot be evaluated as true. As a result, the system effectively treats the condition as false.

The use of syntax exclusive to procedures means that constraints, despite being the preferred method for relationship knowledge, cannot be used in all applications. For such use cases, procedures are required.
The same applies to syntax that can be used in procedures, preconditions, and selection conditions, but not in constraints.
Hint
