I have a table PURCHORDER that is located in the schema LAWSON.
I had a trigger running on that table.
CREATE OR REPLACE TRIGGER PROCURE."LAWSON_PO_ISSUED_FLAG_UPD_TRG"
AFTER UPDATE OF "ISSUED_FLAG"
ON "LAWSON"."PURCHORDER"
REFERENCING NEW AS N OLD AS O
FOR EACH ROW
BEGIN
IF ( uppero.issued_flag) = 'N' AND uppern.issued_flag) = 'Y' AND uppern.revised_fl) <> 'Y' AND uppern.released_fl) = 'Y') THEN
INSERT into PROCURE.RECPO (company, po_number, vendor, buyer_code) values o.company, .po_number, .vendor, .buyer_code);
END IF;
END;
I copied it and made changes to create a new trigger on a different field in the same table
CREATE OR REPLACE TRIGGER PROCURE."LAW_PO_LEA_RELEASED_FL_UPD_TRG"
AFTER UPDATE OF "RELEASED_FL"
ON "LAWSON"."PURCHORDER"
REFERENCING NEW AS N OLD AS O
FOR EACH ROW
BEGIN
IF ( uppero.released_fl) = 'N' AND uppern.released_fl) = 'Y' AND uppero.po_code) = 'LEA' AND uppero.closed_fl) = 'N' AND
uppero.cancelled_fl) = 'N' AND uppero.tot_order_amt) > 0) THEN
INSERT into PROCURE.PO_LEASE (company, po_number, tot_order_amt, nbr_lines, closed_lines, buyer_code, closed_fl)
values o.company, .po_number, .tot_order_amt, .nbr_lines, .closed_lines, .buyer_code, .closed_fl);
END IF;
END;
The issue is that this second trigger never fires. Can anybody see what I am doing wrong?
Thank you.
I had a trigger running on that table.
CREATE OR REPLACE TRIGGER PROCURE."LAWSON_PO_ISSUED_FLAG_UPD_TRG"
AFTER UPDATE OF "ISSUED_FLAG"
ON "LAWSON"."PURCHORDER"
REFERENCING NEW AS N OLD AS O
FOR EACH ROW
BEGIN
IF ( uppero.issued_flag) = 'N' AND uppern.issued_flag) = 'Y' AND uppern.revised_fl) <> 'Y' AND uppern.released_fl) = 'Y') THEN
INSERT into PROCURE.RECPO (company, po_number, vendor, buyer_code) values o.company, .po_number, .vendor, .buyer_code);
END IF;
END;
I copied it and made changes to create a new trigger on a different field in the same table
CREATE OR REPLACE TRIGGER PROCURE."LAW_PO_LEA_RELEASED_FL_UPD_TRG"
AFTER UPDATE OF "RELEASED_FL"
ON "LAWSON"."PURCHORDER"
REFERENCING NEW AS N OLD AS O
FOR EACH ROW
BEGIN
IF ( uppero.released_fl) = 'N' AND uppern.released_fl) = 'Y' AND uppero.po_code) = 'LEA' AND uppero.closed_fl) = 'N' AND
uppero.cancelled_fl) = 'N' AND uppero.tot_order_amt) > 0) THEN
INSERT into PROCURE.PO_LEASE (company, po_number, tot_order_amt, nbr_lines, closed_lines, buyer_code, closed_fl)
values o.company, .po_number, .tot_order_amt, .nbr_lines, .closed_lines, .buyer_code, .closed_fl);
END IF;
END;
The issue is that this second trigger never fires. Can anybody see what I am doing wrong?
Thank you.