Home » Applications » Oracle Fusion Apps & E-Business Suite » neglect the insert (DB 10g )
neglect the insert [message #485988] Sun, 12 December 2010 09:30 Go to next message
alaa_fouad2004
Messages: 64
Registered: January 2009
Member
Dear all

thers is program insert lines in table called xx .
I create trigger on table xx before insert to validate values which will insert if this value not correct I want to negelct this insertion .
I want the command which I put in this trigger after this validation to neglect this insertion

CREATE OR REPLACE TRIGGER APPS.PROMOTION_TRIG
BEFORE INSERT
ON ONT.OE_ORDER_LINES_ALL
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
DECLARE
tmpVar NUMBER;

BEGIN
   select count(*)
   into tmpVar
    from qp_pricing_attr_get_v gets, qp_qualifiers_v qual
where qual.LIST_HEADER_ID=gets.LIST_HEADER_ID
and qual.LIST_HEADER_ID=229557
and gets.PRODUCT_ATTR_VALUE=:new.INVENTORY_ITEM_ID
and qual.QUALIFIER_ATTR_VALUE=:new.SOLD_TO_ORG_ID
and exists
(
select 'x'
from oe_order_lines_all linn
where request_date between trunc(request_date,'MONTH') and last_day(request_date)
and linn.SOLD_TO_ORG_ID=qual.QUALIFIER_ATTR_VALUE
and linn.INVENTORY_ITEM_ID=gets.PRODUCT_ATTR_VALUE

)        ;

if tmpVar>=1 then 

    neglect command ????????????????????????????????????

end if;


   
END ;

Alaa Fouad

[Updated on: Sun, 12 December 2010 09:37]

Report message to a moderator

Re: neglect the insert [message #485992 is a reply to message #485988] Sun, 12 December 2010 10:20 Go to previous messageGo to next message
Littlefoot
Messages: 19648
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Your "neglect command" is
raise_application_error
See the documentation.
Re: neglect the insert [message #486208 is a reply to message #485992] Tue, 14 December 2010 05:04 Go to previous messageGo to next message
alaa_fouad2004
Messages: 64
Registered: January 2009
Member
HI THIS RAISE_APPLICATION_ERROR WILL STOP THE OTHER INSERTION LINES WHICH WANT TO CONTINUE TO INSERT IT .
I want to skip some lines without stop the insertion of other lines .
Re: neglect the insert [message #487313 is a reply to message #486208] Fri, 24 December 2010 15:03 Go to previous message
vamsi kasina
Messages: 2096
Registered: October 2003
Location: Riyadh, Saudi Arabia
Senior Member
Raise it and catch it in outer block.
Check whether save exceptions helps you or not.

By
Vamsi
Previous Topic: Payment Process Request
Next Topic: ORACLE SCM FUNCTIONAL FAQs
Goto Forum:
  


Current Time: Wed Oct 01 05:02:56 CDT 2014

Total time taken to generate the page: 0.12856 seconds