My Oracle Support Banner

Applying Hold Using OE_HOLDS_PUB.apply_holds ORA-04092: cannot ROLLBACK in a trigger (Doc ID 2174304.1)

Last updated on JUNE 25, 2023

Applies to:

Oracle Order Management - Version 12.2.5 and later
Information in this document applies to any platform.

Symptoms

12.2.5 - API to apply holds, fired from a trigger

## ISSUE
Applying hold using OE_HOLDS_PUB.apply_holds from the after insert or update trigger ... leads to error

## STEPS TO REPRODUCE
We are trying to apply hold from the after insert or update trigger of the oe_order_lines_all table using the below code


## ERROR MESSAGE
We are getting the below error message and the hold is not getting applied.
  Exception ORA-04092: cannot ROLLBACK in a trigger
  ORA-04092: cannot SET SAVEPOINT in a trigger

## WHERE DID IT WORK CORRECTLY?
The issue (error) is in R12.2.5 instance.
We are able to apply hold in 11i instance using the same code.

## TEST RESULTS
- For testing purpose instead of 'OE_HOLDS_PUB.apply_holds' we called a package and did a manual insert into 'oe_hold_sources_all' and 'oe_order_holds_all' table.
- This time the hold got applied from the oe_order_lines_all trigger.
- So the issue is while applying hold using 'OE_HOLDS_PUB.apply_holds' from the trigger.
- No other custom triggers is causing the issue.
- We want to use the API only instead of manual insert.


Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.