0% found this document useful (0 votes)
101 views

Creating and Maintaining Custom Tables in R12.2.x

Uploaded by

ganeshmohan92
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
101 views

Creating and Maintaining Custom Tables in R12.2.x

Uploaded by

ganeshmohan92
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Creating and maintaining Custom Tables in

R12.2.x
1. To create a custom table in custom schema – XXCUSTOM

CREATE TABLE XXCUSTOM.TABLE_NAME (COL1 NUMBER,….);

2. To generate editioning view and synonym for the table execute below
script

exec AD_ZD_TABLE.UPGRADE('XXCUSTOM','TABLE_NAME');

This will create two new objects:

(i) An editioned view (having # in the end) in XXCUSTOM schema (e.g.


XXCUSTOM.TABLE_NAME#)
(ii) A synonym (same as table_name) in APPS schema (APPS.TABLE_NAME)

3. If you alter the table definition in future then after running the alter table
command, run below script to regenerate the editioning view and sync the
table changes -

exec AD_ZD_TABLE.PATCH('XXCUSTOM','TABLE_NAME');

4. To see the objects across all editions, please query all_objects_ae or


user_objects_ae

SELECT * FROM all_objects_ae WHERE OBJECT_NAME like 'TABLE_NAME%';

5. To issue Grants/Revokes use below commands (Please request DBA team


to execute below commands):

Connect to XXCUSTOM schema and run below commands -


grant <grant> on XXCUSTOM.TABLE_NAME to APPS WITH GRANT OPTION;
grant <grant> on XXCUSTOM.TABLE_NAME# to APPS WITH GRANT OPTION;

Connect to APPS and run below commands to perform Grant or Revoke


operations –
execute
APPS.AD_ZD.GRANT_PRIVS('<grant>','TABLE_NAME','<SCHEMA_RECEIVING_
GRANT');

execute
APPS.AD_ZD.REVOKE_PRIVS('<grant>',
'TABLE_NAME','SCHEMA_TOBE_REVOKED');

Oracle Document : Developing and Deploying Customizations in Oracle E-


Business Suite Release 12.2 (Doc ID 1577661.1)
Creating Materialized Views in R12.2.x
- In 12.1.3 where we create a materialized views with simple CREATE
statement but in 12.2.x, we need to do below steps –

- Create a logical view


- Use ad_zd_mview upgrade script to create a materialized view.
- Oracle internally creates required edition materialized view.

e.g.
- Create a logical view. Basically, create a normal view but suffixed by the #
CREATE OR REPLACE VIEW APPS.XYZ_VIEW_NAME# AS
<query>;

- Upgrade to materialized view. The first parameter is the schema name and
second is the view name without #

BEGIN
AD_ZD_MVIEW.UPGRADE('APPS', 'XYZ_VIEW_NAME');
END;

- Verify all components

SELECT * FROM dba_objects WHERE object_name LIKE 'XYZ_VIEW_NAME%';

You should see below 3 components

- XYZ_VIEW_NAME# : LOGICAL VIEW


- XYZ_VIEW_NAME : TABLE
- XYZ_VIEW_NAME : MATERIALIZED VIEW
To access the materialized view just query on XYZ_VIEW_NAME (without #
suffix)
SELECT * FROM XYZ_VIEW_NAME;

Oracle Forms & Oracle Reports

Oracle Forms:
There is no major change in the Oracle Forms.

Oracle Reports:
In 12.1.3, we would place the .rdf file the $XXCUST_TOP directory.

But In 12.2.x, we now have 2 file systems (fs1 and fs2). When we migrating
the .rdf files, we need to place the .rdf file into both file systems.

You might also like