Show TOC

Pre-Action EnhancementsLocate this document in the navigation structure

Definition

A pre-action enhancement is an entity that is automatically executed by Business Object Processing Framework (BOPF) before a specific action of the base object is performed. If an importing parameter structure is defined on the base action, this parameter is handed over to the pre-action enhancement.

Use

You can use a pre-action enhancement to extend the functionality of a specific action that is located in the base object.

Caution
  • A pre-action enhancement can only be created in a business object or in a business object enhancement (enhancement) and must be related to a base action located in the base object.

  • If the base action cannot be executed on an instance because of an action validation, the instance is neither processed by the pre-action enhancement nor by the base action.

  • A pre-action enhancement cannot return failed instances.

All instances are processed by the base action after they were processed by the pre-action enhancement.

Example

The CUSTOMER_INVOICE business object contains the RELEASE action to release an invoice. Before an invoice can be released, it must be approved by the INVOICE_APPROVE action. This action sets the APPROVAL attribute of the invoice. To provide a customer solution that automatically approves invoices with a total amount lower than USD 1,000, the AUTO_APPROVAL pre-action enhancement is itself created in an enhancement. It runs before the RELEASE action is executed and sets the APPROVAL attribute in accordance with the invoice’s total amount.