custom table registration api in oracle application

Upload: pmarun83

Post on 01-Jun-2018

227 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/9/2019 Custom Table Registration API in Oracle Application

    1/4

    Custom Table Registration API in Oracle

    Application

    Custom Table Registration API in Oracle Application

    This Post (document) provides you with information you need to register tables to be used inOracle Alerts and Flex fields with Oracle Applications. e will be learning about Procedures in

    the A!"!! Pac#age$

    Procedure %&'T&%"TA*+&$

    Procedure %&'T&%",O+-/$

    Procedure !&+&T&"TA*+&$

    Procedure !&+&T&",O+-/

    And &xample of -sing the A!"!! Pac#age.

    Introduction

    Though Oracle Applications comes with thousands of seeded database tables$ there can benumerous applications in which one might be re0uired to create a custom table to be used. n

    most of the applications all you need is to create a table in a schema and use it directly in your

    applications. Flex fields and Oracle Alert are the only features or products that re0uire thecustom tables to be registered in Oracle Applications (Application Ob1ect +ibrary) before they

    can be used.

    2ou register your custom application tables using a P+34+ procedure in the A!"!! pac#age.

    Therefore you only need to register those tables (and all of their columns) that will be used withflex fields or Oracle Alert.

    2ou can also use the A!"!! AP to delete the registrations of tables and columns from Oracle

    Application Ob1ect +ibrary tables should you later modify your tables. f you alter the table later$

    then you may need to include revised or new calls to the table registration routines. To alter a

    registration you should first delete the registration$ and then re5register the table or column.%emember$ you should delete the column registration first$ then the table registration. 2ou should

    include calls to the table registration routines in a P+34+ script. Though you create your tablesin your own application schema$ you should run the A!"!! procedures against the APP

    schema. 2ou must commit your changes for them to ta#e effect.

    The A!"!! AP does not chec# for the existence of the registered table or column in the

    database schema$ but only updates the re0uired AO+ tables. 2ou must ensure that the tables and

    http://www.dataqapps.com/custom-table-registration-api-in-oracle-application/http://www.dataqapps.com/custom-table-registration-api-in-oracle-application/http://www.dataqapps.com/custom-table-registration-api-in-oracle-application/http://www.dataqapps.com/custom-table-registration-api-in-oracle-application/
  • 8/9/2019 Custom Table Registration API in Oracle Application

    2/4

    columns registered actually exist and have the same format as that defined using the A!"!!

    AP. 2ou need not register views.

    Procedures in the AD_DD Package

    1. Procedure REI!TER_TA"#E

    procedure register"table ( p"appl"short"name in varchar6$

    p"tab"name in varchar6$p"tab"type in varchar6$

    p"next"extent in number default 786$

    p"pct"free in number default 89$

    p"pct"used in number default :9);

    $. Procedure REI!TER_CO#%&'

    procedure register"column (p"appl"short"name in varchar6$

    p"tab"name in varchar6$

    p"col"name in varchar6$p"col"se0 in number$

    p"col"type in varchar6$

    p"col"width in number$p"nullable in varchar6$

    p"translate in varchar6$

    p"precision in number default null$

    p"scale in number default null);

    (. Procedure DE#ETE_TA"#E

    procedure delete"table (p"appl"short"name in varchar6$

    p"tab"name in varchar6);

    ). Procedure DE#ETE_CO#%&'

    procedure delete"column (p"appl"short"name in varchar6$

    p"tab"name in varchar6$p"col"name in varchar6);

    *ARIA"#E

    'A&E! DE!CRIPTIO'p"appl"short"nam

    e

    The application short name of the application that owns the table

    (usually your custom application).

    p"tab"name The name of the table (in uppercase letters).

    p"tab"type-se

  • 8/9/2019 Custom Table Registration API in Oracle Application

    3/4

    future updates to the table (8>??). The sum of p"pct"free and

    p"pct"used must be less than 899.

    p"pct"usedinimum percentage of used space in each data bloc# of the table(8>??). The sum of p"pct"free and p"pct"used must be less than

    899.

    p"col"name The name of the column (in uppercase letters).p"col"se0

    The se0uence number of the column in the table (the order in

    which the column appears in the table definition).

    p"col"type The column type (

    p"nullable-se

  • 8/9/2019 Custom Table Registration API in Oracle Application

    4/4

    BEGIN

    AD_DD!REGISTER_COLUMN ("#ND$, "TEST_DESC$,%RESOURCE_NAME$, 1, "VARCHAR2&,

    150, "Y$, "N$)AD_DD!REGISTER_COLUMN ("#ND$, "TEST_DESC$,%RESOURCE_TYPE$, 2, "VARCHAR2&,

    100, "Y$, "N$)

    AD_DD!REGISTER_COLUMN ("#ND$, "TEST_DESC$,%ATTRIBUTE_CATEGORY$, 3,"VARCHAR2&, 40, "Y$, "N$)

    AD_DD!REGISTER_COLUMN ("#ND$, "TEST_DESC$,%ATTRIBUTE1&, 4, "VARCHAR2&, 150,

    "Y$, "N$)AD_DD!REGISTER_COLUMN ("#ND$, "TEST_DESC$,%ATTRIBUTE2&, 5, "VARCHAR2&, 150,

    "Y$, "N$)

    AD_DD!REGISTER_COLUMN ("#ND$, "TEST_DESC$,%ATTRIBUTE3&, 6, "VARCHAR2&, 150,

    "Y$, "N$)AD_DD!REGISTER_COLUMN ("#ND$, "TEST_DESC$,%ATTRIBUTE4&, ', "VARCHAR2&, 150,

    "Y$, "N$)

    AD_DD!REGISTER_COLUMN ("#ND$, "TEST_DESC$,%ATTRIBUTE5&, , "VARCHAR2&, 150,

    "Y$, "N$)AD_DD!REGISTER_COLUMN ("#ND$, "TEST_DESC$,%ATTRIBUTE6&, , "VARCHAR2&, 150,

    "Y$, "N$)END