Table Registration in Oracle Apps
Custom Schema: It is created by DBA person for customization purpose.
- Oracle Alerts & Flex Fields: At only product will dependent on table registration. hence we need to register table in oracle apps
- Instead of connecting to individual schema directly we will login to APPS schema (centralized) and work for any schema objects.
Table Registration Approach:
- Create oracle table in custom schema.
- Give grants to apps schema.
- create public synonym in apps schema.
- register table using the API AD_DD, Register_Table
Those records stored in FND_TABLES. - Register columns using the API AD_DD.Register_Column
Those records stored in FND_COLUMN.
NOTE: 4 & 5 points are mandatory when we are using table for flex fields & oracle alerts.
Table Registrations in oracle apps steps:
Step 1: open Toad and Connect by using login credentials
Then click on connect
Example: XXAO/XXAO@VIS
Step 2: create table in oracle apps custom top
create table XX_EMP_STAG
(First_Name varchar2(20),
Last_Name varchar2(20),
Sal number(7,2),
Deptno number(2))
then Execute (Run) in Toad using (CTRL+Enter)
Step 3: Give all grants to apps schema.
Example: Grant all on XX_EMP_STAG to apps
Then execute (Run) in Toad using (CTRL+Enter)
Step 4: connect apps schema by using login credentials
Example: username: APPS
password: APPS
database : VIS
Step 5: create public synonym
create public synonym XX_EMP_STAGSYN for AO.XX_EMP_STAG
Then compile synonym in Toad (CTRL+Enter)
Step 6: Register Table
Begin
AD_DD.register_table
('AO', -- Application short name
'XX_EMP_STAG', -- Table Name
'T', -- Table type
512, -- Next Extension
10, -- PCT free
70); -- PCT used
COMMIT;
End;
Select Total Code ( Begin to End;) and click on F5(Compile Code).
Step 7: Register Column
Begin
AD_DD.register_column('PO', -- Application short name
'XX_EMP_STAG', -- Table Name
'EMP_NAME', -- Column Name
1, -- Column Sequence
'VARCHAR2', -- Data Type
20, -- Data Type
'Y', -- Nullable
'Y', -- Translate
null, -- Precision
null); -- Scale
Table Registrations in oracle apps steps:
Step 1: open Toad and Connect by using login credentials
Then click on connect
Example: XXAO/XXAO@VIS
Step 2: create table in oracle apps custom top
create table XX_EMP_STAG
(First_Name varchar2(20),
Last_Name varchar2(20),
Sal number(7,2),
Deptno number(2))
then Execute (Run) in Toad using (CTRL+Enter)
Step 3: Give all grants to apps schema.
Example: Grant all on XX_EMP_STAG to apps
Then execute (Run) in Toad using (CTRL+Enter)
Step 4: connect apps schema by using login credentials
Example: username: APPS
password: APPS
database : VIS
Step 5: create public synonym
create public synonym XX_EMP_STAGSYN for AO.XX_EMP_STAG
Then compile synonym in Toad (CTRL+Enter)
Step 6: Register Table
Begin
AD_DD.register_table
('AO', -- Application short name
'XX_EMP_STAG', -- Table Name
'T', -- Table type
512, -- Next Extension
10, -- PCT free
70); -- PCT used
COMMIT;
End;
Select Total Code ( Begin to End;) and click on F5(Compile Code).
Step 7: Register Column
Begin
AD_DD.register_column('PO', -- Application short name
'XX_EMP_STAG', -- Table Name
'EMP_NAME', -- Column Name
1, -- Column Sequence
'VARCHAR2', -- Data Type
20, -- Data Type
'Y', -- Nullable
'Y', -- Translate
null, -- Precision
null); -- Scale
AD_DD.register_column('PO', -- Application short name
'XX_EMP_STAG', -- Table Name
'JOB', -- Column Name
2, -- Column Sequence
'VARCHAR2', -- Data Type
20, -- Data Type
'Y', -- Nullable
'Y', -- Translate
null, -- Precision
null); -- Scale
COMMIT;
END;
Select Total code & Click on F5 (Compile)
Step 8: Check Table Registration in Front End
'XX_EMP_STAG', -- Table Name
'JOB', -- Column Name
2, -- Column Sequence
'VARCHAR2', -- Data Type
20, -- Data Type
'Y', -- Nullable
'Y', -- Translate
null, -- Precision
null); -- Scale
COMMIT;
END;
Select Total code & Click on F5 (Compile)
Step 8: Check Table Registration in Front End
Application Developer --> Application --> Database --> Table
--> F11
Enter Table Name : XX_EMP_STAG
Then Ctrl+F11