Oracle ERP Audit Funtion in R12.2.4

Posted ORACLE EBS

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Oracle ERP Audit Funtion in R12.2.4相关的知识,希望对你有一定的参考价值。

clip_image001[4]

 

 

M1 JOB NAME:  164839

TABLE NAME: WIP_REQUIREMENT_OPERATIONS

clip_image002[4]

 

clip_image003[4]

 

clip_image004[4]

 

clip_image005[4]

 

 

Request name: AuditTrail Update Tables

clip_image006[4]

 

Output log

/etc/host.conf: line 1: bad command `: \'weblog\'
+---------------------------------------------------------------------------+
Application Object Library: Version : 12.2

Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.

FNDATUPD: AuditTrail Update Tables
+---------------------------------------------------------------------------+

Current system time is 05-MAY-2018 22:13:10

+---------------------------------------------------------------------------+

----->Expand Rows
INSERT INTO FND_AUDIT_COLUMNS (TABLE_APP_ID, TABLE_ID,COLUMN_ID,STATE,SEQUENCE_ID, SCHEMA_ID, LAST_UPDATE_DATE,LAST_UPDATED_BY, LAST_UPDATE_LOGIN,CREATED_BY,CREATION_DATE) VALUES (  706, 51419, 75741, \'P\', -1, 900, SYSDATE,0,0,0,SYSDATE)

UPDATE FND_AUDIT_TABLES T  SET T.STATE = \'P\'  WHERE T.TABLE_APP_ID =  706   AND T.TABLE_ID =  51419

commit

INSERT INTO FND_AUDIT_COLUMNS (TABLE_APP_ID, TABLE_ID,COLUMN_ID,STATE,SEQUENCE_ID, SCHEMA_ID, LAST_UPDATE_DATE,LAST_UPDATED_BY, LAST_UPDATE_LOGIN,CREATED_BY,CREATION_DATE) VALUES (  706, 51419, 75742, \'P\', -1, 900, SYSDATE,0,0,0,SYSDATE)

UPDATE FND_AUDIT_TABLES T  SET T.STATE = \'P\'  WHERE T.TABLE_APP_ID =  706   AND T.TABLE_ID =  51419

commit

INSERT INTO FND_AUDIT_COLUMNS (TABLE_APP_ID, TABLE_ID,COLUMN_ID,STATE,SEQUENCE_ID, SCHEMA_ID, LAST_UPDATE_DATE,LAST_UPDATED_BY, LAST_UPDATE_LOGIN,CREATED_BY,CREATION_DATE) VALUES (  706, 51419, 78406, \'P\', -1, 900, SYSDATE,0,0,0,SYSDATE)

UPDATE FND_AUDIT_TABLES T  SET T.STATE = \'P\'  WHERE T.TABLE_APP_ID =  706   AND T.TABLE_ID =  51419

commit

INSERT INTO FND_AUDIT_COLUMNS (TABLE_APP_ID, TABLE_ID,COLUMN_ID,STATE,SEQUENCE_ID, SCHEMA_ID, LAST_UPDATE_DATE,LAST_UPDATED_BY, LAST_UPDATE_LOGIN,CREATED_BY,CREATION_DATE) VALUES (  706, 51419, 143757, \'P\', -1, 900, SYSDATE,0,0,0,SYSDATE)

UPDATE FND_AUDIT_TABLES T  SET T.STATE = \'P\'  WHERE T.TABLE_APP_ID =  706   AND T.TABLE_ID =  51419

commit

commit

DELETE FROM FND_AUDIT_TABLES WHERE STATE = \'X\'

DELETE FROM FND_AUDIT_COLUMNS C WHERE C.STATE = \'P\' AND  NOT EXISTS (SELECT NULL FROM FND_AUDIT_TABLES T WHERE  T.TABLE_APP_ID = C.TABLE_APP_ID AND T.TABLE_ID = C.TABLE_ID AND T.STATE !=\'X\')

----->Create New Table
GRANT ALL ON WIP_REQUIREMENT_OPERATIO_A to APPS
----->Adding ROW_KEY
**Starts**05-MAY-2018 22:13:12
**Ends**05-MAY-2018 22:13:13
----->Alter Shadow Table
ALTER TABLE WIP_REQUIREMENT_OPERATIO_A ADD (REPETITIVE_SCHEDULE_ID NUMBER )
commit

DELETE FROM FND_AUDIT_COLUMNS C  WHERE C.TABLE_APP_ID= 706 AND C.TABLE_ID =  51419 AND C.COLUMN_ID =  78406 AND C.SCHEMA_ID =  900

INSERT INTO FND_AUDIT_COLUMNS (TABLE_APP_ID,TABLE_ID,COLUMN_ID,STATE,SEQUENCE_ID,SCHEMA_ID,LAST_UPDATE_DATE,LAST_UPDATED_BY,LAST_UPDATE_LOGIN,CREATED_BY,CREATION_DATE) VALUES (      706,  51419,  78406, \'K\',  0,  900, SYSDATE,0,0,0,SYSDATE) 

commit

----->Adding ROW_KEY
**Starts**05-MAY-2018 22:13:13
**Ends**05-MAY-2018 22:13:13
----->Alter Shadow Table
ALTER TABLE WIP_REQUIREMENT_OPERATIO_A ADD (OPERATION_SEQ_NUM NUMBER )
commit

DELETE FROM FND_AUDIT_COLUMNS C  WHERE C.TABLE_APP_ID= 706 AND C.TABLE_ID =  51419 AND C.COLUMN_ID =  75742 AND C.SCHEMA_ID =  900

INSERT INTO FND_AUDIT_COLUMNS (TABLE_APP_ID,TABLE_ID,COLUMN_ID,STATE,SEQUENCE_ID,SCHEMA_ID,LAST_UPDATE_DATE,LAST_UPDATED_BY,LAST_UPDATE_LOGIN,CREATED_BY,CREATION_DATE) VALUES (      706,  51419,  75742, \'K\',  1,  900, SYSDATE,0,0,0,SYSDATE) 

commit

----->Adding ROW_KEY
**Starts**05-MAY-2018 22:13:13
**Ends**05-MAY-2018 22:13:13
----->Alter Shadow Table
ALTER TABLE WIP_REQUIREMENT_OPERATIO_A ADD (INVENTORY_ITEM_ID NUMBER )
commit

DELETE FROM FND_AUDIT_COLUMNS C  WHERE C.TABLE_APP_ID= 706 AND C.TABLE_ID =  51419 AND C.COLUMN_ID =  143757 AND C.SCHEMA_ID =  900

INSERT INTO FND_AUDIT_COLUMNS (TABLE_APP_ID,TABLE_ID,COLUMN_ID,STATE,SEQUENCE_ID,SCHEMA_ID,LAST_UPDATE_DATE,LAST_UPDATED_BY,LAST_UPDATE_LOGIN,CREATED_BY,CREATION_DATE) VALUES (      706,  51419,  143757, \'K\',  2,  900, SYSDATE,0,0,0,SYSDATE) 

commit

----->Adding ROW_KEY
**Starts**05-MAY-2018 22:13:13
**Ends**05-MAY-2018 22:13:13
----->Alter Shadow Table
ALTER TABLE WIP_REQUIREMENT_OPERATIO_A ADD (WIP_ENTITY_ID NUMBER )
commit

DELETE FROM FND_AUDIT_COLUMNS C  WHERE C.TABLE_APP_ID= 706 AND C.TABLE_ID =  51419 AND C.COLUMN_ID =  75741 AND C.SCHEMA_ID =  900

INSERT INTO FND_AUDIT_COLUMNS (TABLE_APP_ID,TABLE_ID,COLUMN_ID,STATE,SEQUENCE_ID,SCHEMA_ID,LAST_UPDATE_DATE,LAST_UPDATED_BY,LAST_UPDATE_LOGIN,CREATED_BY,CREATION_DATE) VALUES (      706,  51419,  75741, \'K\',  3,  900, SYSDATE,0,0,0,SYSDATE) 

commit

----->Update Pending Columns
commit

----->Drop Triggers
DROP TRIGGER WIP_REQUIREMENT_OPERATIO_AI
Oracle error 4080: ORA-04080: trigger \'WIP_REQUIREMENT_OPERATIO_AI\' does not exist
ORA-06512: at "SYSTEM.AD_DDL", line 188
ORA-06512: at line 1 has been detected in afuddl() [3_xdd].
do_ddl(APPLSYS, FND, 8, $statement$, WIP_REQUIREMENT_OPERATIO_AI): private_do_ddl(APPS, APPLSYS, APPLSYS, 8, $statement$, WIP_REQUIREMENT_OPERATIO_AI): do_acd_trigger(0,  APPS, $statement$): : do_apps_ddl(APPS, $statement$): : substr($statement$,1,255)=\'DROP TRIGGER WIP_REQUIREMENT_OPERATIO_AI\'
DROP PROCEDURE WIP_REQUIREMENT_OPERATIO_AIP
Oracle error 4043: ORA-04043: object WIP_REQUIREMENT_OPERATIO_AIP does not exist
ORA-06512: at "SYSTEM.AD_DDL", line 188
ORA-06512: at line 1 has been detected in afuddl() [3_xdd].
do_ddl(APPLSYS, FND, 8, $statement$, WIP_REQUIREMENT_OPERATIO_AIP): private_do_ddl(APPS, APPLSYS, APPLSYS, 8, $statement$, WIP_REQUIREMENT_OPERATIO_AIP): do_acd_trigger(0,  APPS, $statement$): : do_apps_ddl(APPS, $statement$): : substr($statement$,1,255)=\'DROP PROCEDURE WIP_REQUIREMENT_OPERATIO_AIP\'
DROP TRIGGER WIP_REQUIREMENT_OPERATIO_AD
Oracle error 4080: ORA-04080: trigger \'WIP_REQUIREMENT_OPERATIO_AD\' does not exist
ORA-06512: at "SYSTEM.AD_DDL", line 188
ORA-06512: at line 1 has been detected in afuddl() [3_xdd].
do_ddl(APPLSYS, FND, 8, $statement$, WIP_REQUIREMENT_OPERATIO_AD): private_do_ddl(APPS, APPLSYS, APPLSYS, 8, $statement$, WIP_REQUIREMENT_OPERATIO_AD): do_acd_trigger(0,  APPS, $statement$): : do_apps_ddl(APPS, $statement$): : substr($statement$,1,255)=\'DROP TRIGGER WIP_REQUIREMENT_OPERATIO_AD\'
DROP PROCEDURE WIP_REQUIREMENT_OPERATIO_ADP
Oracle error 4043: ORA-04043: object WIP_REQUIREMENT_OPERATIO_ADP does not exist
ORA-06512: at "SYSTEM.AD_DDL", line 188
ORA-06512: at line 1 has been detected in afuddl() [3_xdd].
do_ddl(APPLSYS, FND, 8, $statement$, WIP_REQUIREMENT_OPERATIO_ADP): private_do_ddl(APPS, APPLSYS, APPLSYS, 8, $statement$, WIP_REQUIREMENT_OPERATIO_ADP): do_acd_trigger(0,  APPS, $statement$): : do_apps_ddl(APPS, $statement$): : substr($statement$,1,255)=\'DROP PROCEDURE WIP_REQUIREMENT_OPERATIO_ADP\'
DROP TRIGGER WIP_REQUIREMENT_OPERATIO_AU
Oracle error 4080: ORA-04080: trigger \'WIP_REQUIREMENT_OPERATIO_AU\' does not exist
ORA-06512: at "SYSTEM.AD_DDL", line 188
ORA-06512: at line 1 has been detected in afuddl() [3_xdd].
do_ddl(APPLSYS, FND, 8, $statement$, WIP_REQUIREMENT_OPERATIO_AU): private_do_ddl(APPS, APPLSYS, APPLSYS, 8, $statement$, WIP_REQUIREMENT_OPERATIO_AU): do_acd_trigger(0,  APPS, $statement$): : do_apps_ddl(APPS, $statement$): : substr($statement$,1,255)=\'DROP TRIGGER WIP_REQUIREMENT_OPERATIO_AU\'
DROP PROCEDURE WIP_REQUIREMENT_OPERATIO_AUP
Oracle error 4043: ORA-04043: object WIP_REQUIREMENT_OPERATIO_AUP does not exist
ORA-06512: at "SYSTEM.AD_DDL", line 188
ORA-06512: at line 1 has been detected in afuddl() [3_xdd].
do_ddl(APPLSYS, FND, 8, $statement$, WIP_REQUIREMENT_OPERATIO_AUP): private_do_ddl(APPS, APPLSYS, APPLSYS, 8, $statement$, WIP_REQUIREMENT_OPERATIO_AUP): do_acd_trigger(0,  APPS, $statement$): : do_apps_ddl(APPS, $statement$): : substr($statement$,1,255)=\'DROP PROCEDURE WIP_REQUIREMENT_OPERATIO_AUP\'
DROP TRIGGER WIP_REQUIREMENT_OPERATIO_AC
Oracle error 4080: ORA-04080: trigger \'WIP_REQUIREMENT_OPERATIO_AC\' does not exist
ORA-06512: at "SYSTEM.AD_DDL", line 188
ORA-06512: at line 1 has been detected in afuddl() [3_xdd].
do_ddl(APPLSYS, FND, 8, $statement$, WIP_REQUIREMENT_OPERATIO_AC): private_do_ddl(APPS, APPLSYS, APPLSYS, 8, $statement$, WIP_REQUIREMENT_OPERATIO_AC): do_acd_trigger(0,  APPS, $statement$): : do_apps_ddl(APPS, $statement$): : substr($statement$,1,255)=\'DROP TRIGGER WIP_REQUIREMENT_OPERATIO_AC\'
DROP TRIGGER WIP_REQUIREMENT_OPERATIO_AH
Oracle error 4080: ORA-04080: trigger \'WIP_REQUIREMENT_OPERATIO_AH\' does not exist
ORA-06512: at "SYSTEM.AD_DDL", line 188
ORA-06512: at line 1 has been detected in afuddl() [3_xdd].
do_ddl(APPLSYS, FND, 8, $statement$, WIP_REQUIREMENT_OPERATIO_AH): private_do_ddl(APPS, APPLSYS, APPLSYS, 8, $statement$, WIP_REQUIREMENT_OPERATIO_AH): do_acd_trigger(0,  APPS, $statement$): : do_apps_ddl(APPS, $statement$): : substr($statement$,1,255)=\'DROP TRIGGER WIP_REQUIREMENT_OPERATIO_AH\'
DROP TRIGGER WIP_REQUIREMENT_OPERATIO_AT
Oracle error 4080: ORA-04080: trigger \'WIP_REQUIREMENT_OPERATIO_AT\' does not exist
ORA-06512: at "SYSTEM.AD_DDL", line 188
ORA-06512: at line 1 has been detected in afuddl() [3_xdd].
do_ddl(APPLSYS, FND, 8, $statement$, WIP_REQUIREMENT_OPERATIO_AT): private_do_ddl(APPS, APPLSYS, APPLSYS, 8, $statement$, WIP_REQUIREMENT_OPERATIO_AT): do_acd_trigger(0,  APPS, $statement$): : do_apps_ddl(APPS, $statement$): : substr($statement$,1,255)=\'DROP TRIGGER WIP_REQUIREMENT_OPERATIO_AT\'
----->Create Standard Triggers
CREATE OR REPLACE PROCEDURE
WIP_REQUIREMENT_OPERATIO_AIP(A0 IN NUMBER,A1 IN NUMBER,A2 IN NUMBER,A3 IN NUMBER,E0 IN NUMBER,E1 IN NUMBER,E2 IN NUMBER,E3 IN NUMBER )
AS
ROWKEY number;
NXT number;
CMT number;
NUSER varchar2(100);
nls_date_fmt VARCHAR2(40);
BEGIN
select value into nls_date_fmt from v$NLS_PARAMETERS where parameter=\'NLS_DATE_FORMAT\';
execute IMMEDIATE \'alter session set nls_date_format="MM/DD/YYYY HH24:MI:SS"\';
NXT:=FND_AUDIT_SEQ_PKG.NXT;
CMT:=FND_AUDIT_SEQ_PKG.CMT;
ROWKEY:=(TO_NUMBER(TO_CHAR(SYSDATE,\'YYYYMMDDHH24MISS\'))*100000 +MOD(NXT,100000)) * 100000 + USERENV(\'SESSIONID\');
NUSER:=FND_AUDIT_SEQ_PKG.USER_NAME;
INSERT INTO WIP_REQUIREMENT_OPERATIO_A
VALUES(SYSDATE,\'I\',NUSER,NULL,USERENV(\'SESSIONID\'),NXT,CMT,ROWKEY,E0,E1,E2,E3);
execute IMMEDIATE \'alter session set nls_date_format="\'||nls_date_fmt||\'"\';

END WIP_REQUIREMENT_OPERATIO_AIP;

CREATE OR REPLACE PROCEDURE
WIP_REQUIREMENT_OPERATIO_AUP (A0 IN NUMBER,A1 IN NUMBER,A2 IN NUMBER,A3 IN NUMBER,E0 IN NUMBER,E1 IN NUMBER,E2 IN NUMBER,E3 IN NUMBER)
AS
NXT NUMBER;
CMT NUMBER;
NUSER varchar2(100);
newtransaction_TYPE VARCHAR2(1);
newTRUE_NULLS VARCHAR2(250);
tmpPRIMCHANGE NUMBER;
nls_date_fmt VARCHAR2(40);
I0 NUMBER;
I1 NUMBER;
I2 NUMBER;
I3 NUMBER;
BEGIN
select value into nls_date_fmt from v$NLS_PARAMETERS where parameter=\'NLS_DATE_FORMAT\';
execute IMMEDIATE \'alter session set nls_date_format="MM/DD/YYYY HH24:MI:SS"\';

NUSER:=FND_AUDIT_SEQ_PKG.USER_NAME;
SELECT 0+decode(E0,A0,0,1)+decode(E1,A1,0,1)+decode(E2,A2,0,1)+decode(E3,A3,0,1) into tmpPRIMCHANGE FROM SYS.DUAL;
IF tmpPRIMCHANGE>=1 THEN
SELECT decode(A0,NULL,\'Y\',\'N\')
||decode(A1,NULL,\'Y\',\'N\')
||decode(A2,NULL,\'Y\',\'N\')
||decode(A3,NULL,\'Y\',\'N\') INTO newTRUE_NULLS FROM SYS.DUAL;
IF(newTRUE_NULLS=\'NNNN\')THEN
newTRUE_NULLS:=NULL;END IF;
NXT:=FND_AUDIT_SEQ_PKG.NXT;
CMT:=FND_AUDIT_SEQ_PKG.CMT;
INSERT INTO WIP_REQUIREMENT_OPERATIO_A
VALUES(SYSDATE,\'D\',NUSER,newTRUE_NULLS,
USERENV(\'SESSIONID\'),NXT,CMT,(TO_NUMBER(TO_CHAR(SYSDATE,\'YYYYMMDDHH24MISS\'))*100000+MOD(NXT,100000)) * 100000 + USERENV(\'SESSIONID\'),
A0,A1,A2,A3);
NXT:=FND_AUDIT_SEQ_PKG.NXT;
CMT:=FND_AUDIT_SEQ_PKG.CMT;
NUSER:=FND_AUDIT_SEQ_PKG.USER_NAME;
INSERT INTO WIP_REQUIREMENT_OPERATIO_A
VALUES(SYSDATE,\'I\',NUSER,NULL,USERENV(\'SESSIONID\'),NXT,CMT,(TO_NUMBER(TO_CHAR(SYSDATE,\'YYYYMMDDHH24MISS\'))*100000+MOD(NXT,100000)) * 100000 + USERENV(\'SESSIONID\'),
E0,E1,E2,E3);
ELSE
SELECT decode(A0,NULL,decode(E0,NULL,\'N\',\'Y\'),\'N\')
||decode(A1,NULL,decode(E1,NULL,\'N\',\'Y\'),\'N\')
||decode(A2,NULL,decode(E2,NULL,\'N\',\'Y\'),\'N\')
||decode(A3,NULL,decode(E3,NULL,\'N\',\'Y\'),\'N\') INTO newTRUE_NULLS FROM SYS.DUAL;
IF(newTRUE_NULLS=\'NNNN\')THEN newTRUE_NULLS:=NULL;END IF;
IF(newTRUE_NULLS is not NULL)THEN
NXT:=FND_AUDIT_SEQ_PKG.NXT;
CMT:=FND_AUDIT_SEQ_PKG.CMT;
INSERT INTO WIP_REQUIREMENT_OPERATIO_A
VALUES(SYSDATE,\'U\',NUSER,newTRUE_NULLS,USERENV(\'SESSIONID\'),NXT,CMT,(TO_NUMBER(TO_CHAR(SYSDATE,\'YYYYMMDDHH24MISS\'))*100000+MOD(NXT,100000)) * 100000 + USERENV(\'SESSIONID\'),
E0,E1,E2,E3);
END IF;
END IF;

execute IMMEDIATE \'alter session set nls_date_format="\'||nls_date_fmt||\'"\';
END WIP_REQUIREMENT_OPERATIO_AUP;

CREATE OR REPLACE PROCEDURE
WIP_REQUIREMENT_OPERATIO_ADP(A0 IN NUMBER,A1 IN NUMBER,A2 IN NUMBER,A3 IN NUMBER,E0 IN NUMBER,E1 IN NUMBER,E2 IN NUMBER,E3 IN NUMBER)
AS
NXT NUMBER;
CMT NUMBER;
NUSER varchar2(100);
newTRUE_NULLS VARCHAR2(250);
nls_date_fmt VARCHAR2(40);
BEGIN
select value into nls_date_fmt from v$NLS_PARAMETERS where parameter=\'NLS_DATE_FORMAT\';
execute IMMEDIATE \'alter session set nls_date_format="MM/DD/YYYY HH24:MI:SS"\';
NXT:=FND_AUDIT_SEQ_PKG.NXT;
CMT:=FND_AUDIT_SEQ_PKG.CMT;
NUSER:=FND_AUDIT_SEQ_PKG.USER_NAME;
SELECT decode(A0,NULL,\'Y\',\'N\')
||decode(A1,NULL,\'Y\',\'N\')
||decode(A2,NULL,\'Y\',\'N\')
||decode(A3,NULL,\'Y\',\'N\') INTO newTRUE_NULLS FROM SYS.DUAL;
IF(newTRUE_NULLS=\'NNNN\') THEN
newTRUE_NULLS:= NULL;
END IF;
INSERT INTO WIP_REQUIREMENT_OPERATIO_A
VALUES(SYSDATE,\'D\',NUSER,newTRUE_NULLS,
USERENV(\'SESSIONID\'),NXT,CMT,(TO_NUMBER(TO_CHAR(SYSDATE,\'YYYYMMDDHH24MISS\'))*100000+MOD(NXT,100000)) * 100000 + USERENV(\'SESSIONID\'),
A0,A1,A2,A3);
execute IMMEDIATE \'alter session set nls_date_format="\'||nls_date_fmt||\'"\';
END WIP_REQUIREMENT_OPERATIO_ADP;

CREATE OR REPLACE TRIGGER WIP_REQUIREMENT_OPERATIO_AH BEFORE INSERT ON WIP_REQUIREMENT_OPERATIONS BEGIN IF fnd_global.audit_active THEN fnd_audit_pkg.audit_on := TRUE;ELSE fnd_audit_pkg.audit_on := FALSE;END IF;END;
CREATE OR REPLACE TRIGGER WIP_REQUIREMENT_OPERATIO_AI AFTER INSERT ON WIP_REQUIREMENT_OPERATIONS FOR EACH ROW BEGIN IF fnd_audit_pkg.audit_on THEN WIP_REQUIREMENT_OPERATIO_AIP(:old.REPETITIVE_SCHEDULE_ID,:old.OPERATION_SEQ_NUM,:old.INVENTORY_ITEM_ID,:old.WIP_ENTITY_ID,:new.REPETITIVE_SCHEDULE_ID,:new.OPERATION_SEQ_NUM,:new.INVENTORY_ITEM_ID,:new.WIP_ENTITY_ID);END IF;END;
CREATE OR REPLACE TRIGGER WIP_REQUIREMENT_OPERATIO_AT BEFORE UPDATE OF REPETITIVE_SCHEDULE_ID,OPERATION_SEQ_NUM,INVENTORY_ITEM_ID,WIP_ENTITY_ID ON WIP_REQUIREMENT_OPERATIONS BEGIN IF fnd_global.audit_active THEN fnd_audit_pkg.audit_on := TRUE;ELSE fnd_audit_pkg.audit_on := FALSE;END IF;END;
CREATE OR REPLACE TRIGGER WIP_REQUIREMENT_OPERATIO_AU AFTER UPDATE OF REPETITIVE_SCHEDULE_ID,OPERATION_SEQ_NUM,INVENTORY_ITEM_ID,WIP_ENTITY_ID ON WIP_REQUIREMENT_OPERATIONS FOR EACH ROW BEGIN IF fnd_audit_pkg.audit_on THEN WIP_REQUIREMENT_OPERATIO_AUP(:old.REPETITIVE_SCHEDULE_ID,:old.OPERATION_SEQ_NUM,:old.INVENTORY_ITEM_ID,:old.WIP_ENTITY_ID,:new.REPETITIVE_SCHEDULE_ID,:new.OPERATION_SEQ_NUM,:new.INVENTORY_ITEM_ID,:new.WIP_ENTITY_ID);END IF;END;
CREATE OR REPLACE TRIGGER WIP_REQUIREMENT_OPERATIO_AC BEFORE DELETE ON WIP_REQUIREMENT_OPERATIONS BEGIN IF fnd_global.audit_active THEN fnd_audit_pkg.audit_on := TRUE;ELSE fnd_audit_pkg.audit_on := FALSE;END IF;END;
CREATE OR REPLACE TRIGGER WIP_REQUIREMENT_OPERATIO_AD AFTER DELETE ON WIP_REQUIREMENT_OPERATIONS FOR EACH ROW BEGIN IF fnd_audit_pkg.audit_on THEN WIP_REQUIREMENT_OPERATIO_ADP(:old.REPETITIVE_SCHEDULE_ID,:old.OPERATION_SEQ_NUM,:old.INVENTORY_ITEM_ID,:old.WIP_ENTITY_ID,:new.REPETITIVE_SCHEDULE_ID,:new.OPERATION_SEQ_NUM,:new.INVENTORY_ITEM_ID,:new.WIP_ENTITY_ID);END IF;END;
----->Create Views
VIEW WIP_REQUIREMENT_OPERATIO_AV1
VIEW WIP_REQUIREMENT_OPERATIO_AC1
-->REPETITIVE_SCHEDULE_ID
-->OPERATION_SEQ_NUM
-->INVENTORY_ITEM_ID
-->WIP_ENTITY_ID
UPDATE FND_AUDIT_TABLES T  SET T.STATE = \'E\'  WHERE T.TABLE_ID =  51419 AND T.TABLE_APP_ID =  706 AND NOT EXISTS (  SELECT NULL FROM FND_AUDIT_COLUMNS C  WHERE C.TABLE_APP_ID = T.TABLE_APP_ID  AND C.TABLE_ID = T.TABLE_ID  AND C.STATE = \'P\'  AND C.SCHEMA_ID != -1)

commit

commit

----->Delete Invalid Columns
commit

update fnd_audit_groups g  set g.state=\'E\' where g.state = \'R\' and not exists  (select NULL from fnd_audit_tables t where  t.audit_group_id = g.audit_group_id  and t.audit_group_app_id = g.application_id  and t.state != \'E\')

commit

----->Update Triggers
commit

+---------------------------------------------------------------------------+
Start of log messages from FND_FILE
+---------------------------------------------------------------------------+
+---------------------------------------------------------------------------+
End of log messages from FND_FILE
+---------------------------------------------------------------------------+


+---------------------------------------------------------------------------+
No completion options were requested.

Output file size:
0


Output is not being printed because:
The print option has been disabled for this report.

+---------------------------------------------------------------------------+
Concurrent request completed successfully
Current system time is 05-MAY-2018 22:13:16

+---------------------------------------------------------------------------+

 

Auto creating table:  SELECT * FROM wip_requirement_operatio_a;

 

Add cols

clip_image007[4]

 

clip_image008[4]

 

Update cols

没审计 Per Assembly 字段,所以审计表不会记录更新操作

clip_image009[4]

 

增加审计字段

clip_image010[4]

 

clip_image011[4]

 

clip_image012[4]

 

 

Delete cols

clip_image013[4]

 

 

clip_image014[4]

 

End Audit Funtion.

以上是关于Oracle ERP Audit Funtion in R12.2.4的主要内容,如果未能解决你的问题,请参考以下文章

[Oracle]Audit--认识Audit

[Oracle]Audit--认识Audit

ORACLE AUDIT

《Oracle 稽核方式解析 [audit]》

Oracle Audit 功能的使用和说明

oracle审计的格式