The concept of IAL Objects is introduced in About Information Access Layer (IAL).
All development of IAL-Objects requires that an IAL have been installed and configured. The goal of all IAL-Objects should be to separate them from the rest of the database in order for external tools to have easier access to the information, to prepare data for presentation (include as much info as possible) and to preprocess the data so it is easier to use.
To develop IAL-Objects the process is made up of the following activities.
IAL Objects should be developed for access through any client based reporting tool.
IAL objects are defined in .ial-file, A sample is given below.
----------------------------------------------------------------------------- -- -- Component: FNDBAS -- -- Purpose: Creates the IAL Object TST_IAL_USER -- -- -- -- Date Sign History -- ------ ------ ----------------------------------------------------------- -- 170306 IFSAPP Created. ----------------------------------------------------------------------------- DEFINE OBJECT = TST_IAL_USER DEFINE MODULE = FNDBAS DEFINE AO = &AO DEFINE IAL_OWNER = &IAL_OWNER PROMPT Creating IAL Object &OBJECT ----------------------------------------------------------------------------- ---------------------------- DISABLE OBJECT --------------------------------- ----------------------------------------------------------------------------- BEGIN &AO..IAL_Object_API.Disable('&OBJECT'); END; / ----------------------------------------------------------------------------- -------------------------------- IAL VIEW ----------------------------------- ----------------------------------------------------------------------------- CREATE OR REPLACE VIEW &IAL_OWNER..&OBJECT._IAL AS SELECT description, identity, oracle_user FROM &AO..FND_USER_TAB WHERE identity='IFSAPP' WITH read only; GRANT SELECT ON &IAL_OWNER..&OBJECT._IAL TO &AO WITH GRANT OPTION / ----------------------------------------------------------------------------- ----------------------- TABLE FOR DATA REPLICATION -------------------------- ----------------------------------------------------------------------------- DECLARE dummy_ NUMBER := 0; CURSOR check_table IS SELECT 1 FROM user_tables WHERE table_name = UPPER('&OBJECT._TAB'); BEGIN OPEN check_table; FETCH check_table INTO dummy_; IF NOT (check_table%FOUND) THEN EXECUTE IMMEDIATE ('CREATE TABLE &IAL_OWNER..&OBJECT._TAB ' || ' TABLESPACE &ial_data ' || ' AS ( SELECT * FROM &IAL_OWNER..&OBJECT._IAL WHERE 1=2 )' ); END IF; CLOSE check_table; END; / ----------------------------------------------------------------------------- --------------------------- OBJECT REGISTRATION ----------------------------- ----------------------------------------------------------------------------- DECLARE ial_where_clause_ VARCHAR2(400) := 'Security_SYS.Has_System_Privilege(''ADMINISTRATOR'') = ''TRUE'''; ial_object_desc_ VARCHAR2(100) := 'Test IAL for fnd user'; BEGIN &AO..IAL_Object_API.Enable('&OBJECT'); &AO..IAL_Object_API.Add_Where_Clause('&OBJECT', ial_where_clause_); &AO..IAL_Object_API.Add_Description('&OBJECT', ial_object_desc_); END; / COMMIT /
Configure Information Access Layer
Ial-files can be created manually, but it is recommended to generate the first file using the form IAL Object Developer. This will help with the syntactic disposition of the file, which will aid in the development.
The left side includes some hints about things to remember when developing.
Note: The Sql Query Tool is very useful for writing initial select statements and for testing deployed IAL-Objects. In order to use SQL Query Tool you must log in as Appowner.
The full Oracle syntax for views are available when writing the IAL-view, but there are a few things that need to be remembered to make the file deployable.
CREATE
OR REPLACE VIEW &IAL..CUSTOMERS AS…
'It is not necessary to use a table. If it is not used, the replication options are disabled. If a table is used, it must
follow the naming convention <OBJECTNAME>_TAB
.
The CREATE TABLE
is used to declare a table, primarily to assign properties as TABLESPACE and INDEXES. The
table should be created in the form 'CREATE TABLE AS SELECT * FROM … WHERE 1=2
' and the default is to add a
WHERE
expression that results in 'no hits'. This means that the table is not filled with data at installation
time.
Indexes may be added freely whenever a good index is obvious. It is recommended to include at least primary key index.
Use the naming standard <OBJECTNAME>_PK
for primary key index, and <OBJECTNAME>_IXn
for miscellaneous indexes.
Simple column indexes can be added and removed by the Administrator using the IAL Administration
window, but if they are to be deployed as standard, use name convention <OBJECTNAME>_Xnn
(where
nn is the numeric order for columns, starting with 1). These indexes are optional.
It is not recommended to add constraints to the table since this can lead to unwanted results. Constraints should and are maintained in the application database only.
The first active part of the file contains the following statement.
begin &AO..IAL_Object_API.Disable('&OBJECT'); end; /
That statement is there to make it possible to redeploy the file without having to drop the table.
Last in the file, the IAL-object should be enabled when installed, to make it available from the IAL Administration form etc. This is done by the section
begin &AO..IAL_Object_API.Enable('&OBJECT'); end; /
which will initialize the object.
A standard IAL Object, when using a table for replication, refreshes all data (full replication) whenever it is replicated. This may lead to a great deal of overhead. For that reason, it is possible to have an IAL Object as partially replicable.
The implementation of a partially replicable IAL Object requires,
DATE
column called OBJDATE
in the IAL view (i.e. CUSTOMER_IAL
has a column
OBJDATE
)OBJDATE
by
comparing the time-stamp with last replication and by that deciding which data is newer. The IAL Object itself then
remembers the last time of replication.The IAL Object may then be refreshed with only the data that is new since last update by adding a where condition using
column OBJDATE
. Modified data is not replicated (this only works for new data). It is highly recommended that the source
column in the IFS database is indexed for quicker refresh.
When the IAL Object is installed (IAL_Object_API.Enable()
) the column OBJDATE
is used to detect whether
or not it is a partially replicable object or not. A partially replicable IAL object can of course also be used in a full
replication manner, as determined by the administrator. Default mode when installed is, as always, to use live data (not
replicated).
The Sql File Executor can also be used for installing IAL-Objects. Whenever an .ial-file is deployed, it tries to connect to the configured IAL User (<IFSINFO> instead of <IFSAPP>).
Localization of IAL object is done by creating a different set of files, one set for each language, and storing them
in the distribution tree - under a top node folder named "IAL Objects" (see deployment below)
The parts of the IAL object definition file (.IAL) that should be translated are,
OBJECT
at the top of the file. If the definition file is developed
according to standards, this change should automatically change the name of the view, table, and indexes.IAL Files should be placed together with the rest of the server files (API/APY). Build merges all ial-files into <component>.ial when building a distribution.