Applying Hold Using OE_HOLDS_PUB.apply_holds ORA-04092: cannot ROLLBACK in a trigger
(Doc ID 2174304.1)
Last updated on FEBRUARY 07, 2018
Applies to:Oracle Order Management - Version 12.2.5 and later
Information in this document applies to any platform.
12.2.5 - API to apply holds, fired from a trigger
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
p_api_version => 1.0
p_init_msg_list => FND_API.G_TRUE
p_commit => FND_API.G_FALSE
p_validation_level => FND_API.G_VALID_LEVEL_FULL
p_order_tbl => lp_order_tbl
p_hold_id => l_hold_id--rec_hold.hold_id
p_hold_until_date => NULL
p_hold_comment => NULL
x_return_status => l_chr_return_status
x_msg_count => l_num_msg_count
x_msg_data => l_chr_msg_data);
## 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.
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