CREATE OR REPLACE TRIGGER apps.xx_acct_analysis_tbl_t2
AFTER INSERT
ON gl.gl_je_headers
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
DECLARE
l_boolean BOOLEAN;
l_je_header_id NUMBER;
l_request_id NUMBER;
BEGIN
IF ( :NEW.status != 'P'
AND :NEW.actual_flag = 'A'
AND :NEW.attribute10 = 'Y'
AND :NEW.je_source = 'AutoCopy'
)
THEN
l_boolean := fnd_request.set_mode (TRUE);
l_je_header_id := :NEW.je_header_id;
l_request_id :=
fnd_request.submit_request
(application => 'SQLGL',
program => 'XX_ACCT_ANALYSIS_IMPORT',
start_time => SYSDATE,
argument1 => l_je_header_id,
argument2 => NULL
);
END IF;
END xx_acct_analysis_tbl_t2;
/
----------------------------------------------------------------
CREATE OR REPLACE TRIGGER apps.xx_acct_analysis_tbl_t1
AFTER UPDATE
ON gl.gl_je_headers
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
DECLARE
l_boolean BOOLEAN;
l_je_header_id NUMBER;
l_request_id NUMBER;
BEGIN
IF (:NEW.status = 'P' AND :OLD.status != 'P' AND :OLD.actual_flag = 'A')
THEN
l_boolean := fnd_request.set_mode (TRUE);
l_je_header_id := :OLD.je_header_id;
l_request_id :=
fnd_request.submit_request
(application => 'SQLGL',
program => 'XX_ACCT_ANALYSIS_IMPORT',
start_time => SYSDATE,
argument1 => l_je_header_id,
argument2 => NULL
);
END IF;
ENDxx_acct_analysis_tbl_t1;
/
AFTER INSERT
ON gl.gl_je_headers
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
DECLARE
l_boolean BOOLEAN;
l_je_header_id NUMBER;
l_request_id NUMBER;
BEGIN
IF ( :NEW.status != 'P'
AND :NEW.actual_flag = 'A'
AND :NEW.attribute10 = 'Y'
AND :NEW.je_source = 'AutoCopy'
)
THEN
l_boolean := fnd_request.set_mode (TRUE);
l_je_header_id := :NEW.je_header_id;
l_request_id :=
fnd_request.submit_request
(application => 'SQLGL',
program => 'XX_ACCT_ANALYSIS_IMPORT',
start_time => SYSDATE,
argument1 => l_je_header_id,
argument2 => NULL
);
END IF;
END xx_acct_analysis_tbl_t2;
/
----------------------------------------------------------------
CREATE OR REPLACE TRIGGER apps.xx_acct_analysis_tbl_t1
AFTER UPDATE
ON gl.gl_je_headers
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
DECLARE
l_boolean BOOLEAN;
l_je_header_id NUMBER;
l_request_id NUMBER;
BEGIN
IF (:NEW.status = 'P' AND :OLD.status != 'P' AND :OLD.actual_flag = 'A')
THEN
l_boolean := fnd_request.set_mode (TRUE);
l_je_header_id := :OLD.je_header_id;
l_request_id :=
fnd_request.submit_request
(application => 'SQLGL',
program => 'XX_ACCT_ANALYSIS_IMPORT',
start_time => SYSDATE,
argument1 => l_je_header_id,
argument2 => NULL
);
END IF;
ENDxx_acct_analysis_tbl_t1;
/