Update on After Insert Trigger
Dear All,
I Want to update gl date and trx date with sysdate only for sales return on ra_interface_lines_all.
But when I run this script it has error, Please help what's wrong with my script.
CREATE OR REPLACE TRIGGER AR.RA_INTERFACE_TRIGGER
AFTER INSERT
ON AR.RA_INTERFACE_LINES_ALL
REFERENCING NEW AS NEW OLD AS OLD
DECLARE
temp VARCHAR2 (10);
BEGIN
IF ra_interface_lines_all.quantity < 0
THEN
UPDATE ra_interface_lines_all
SET trx_date = TRUNC(sysdate),
gl_date = TRUNC(sysdate)
where RA_INTERFACE_LINES_ALL.interface_line_attribute6 = :new.interface_line_attribute6 ;
END IF;