Tuesday 9 June 2015

Some Coding Standards or tips to create Custom Table in Oracle Apps

If you are creating a custom table in Oracle apps you can follow some below coding standards or Tips.

1) Create the custom table in Custom schema not in apps schema.
2) Avoid the length of the table name to 30. ( 30 char is the max. allowed for table name. It is better to create the table name max to 29 char)
3) The table name should start with XX_(It is better to use the schema name with XX. Eg. If you are creating a table in XXINV schema then create the table starts with XXINV_tablename)
4) Avoid using the datatype LONG and LONGRAW if it is that much necessary.
5) Avoid using the Hash(#) in the table name.
6) Avoid the length of table column name to Max i.e 30
7) Avoid the Hash(#) in the column name.
8) Avoid use the Alphanumeric table names.
9) Avoid unique table name.
Eg: You have created table1 with length of table name is 29 char and avoid to create table2 with same name as table1 till 29th char and only the change in 30th char.
10) The custom table should have WHO columns.
The who columns in Oracle Apps
     1) created_by
     2)Creation_date
     3)Last_update_date
     4)Last_updated_by
     5)last_update_login
11) Avoid using LOB data fields if it is not necessary.
12) Create a view for the custom table in the same custom schema and the column should match with both the table and the view.
13) Create a SYNONYM for the view in apps schema.
14) Don’t create the SYNONYM on custom schema. Create the SYNONYM for the View which is referring to the custom table. 
15) Register the custom table to Apps using AD_DD package. To register table you can go through  Script to Register Custom Table using AD_DD Package



No comments: