HOW TO INTEGRATE APPLICATIONS RELEASE 11 WITH CUSTOM APPLICATIONS

liangxichen發表於2006-12-06
HOW TO INTEGRATE APPLICATIONS RELEASE 11 WITH CUSTOM APPLICATIONS

Overview
--------

This article contains information on how to integrate custom Applications with
the APPS schema. It is not meant to fix and/or solve all issues, but it is a
good guideline. If custom Applications are not integrated properly, problems
can occur with alerts, reports, requests, programs, etc...

It is recommended that you develop the custom applications code by following
the standards exactly as described in the Oracle Applications Developers Guide
and the Oracle Applications User Interface Standards manual. Deviations from
these standards can have unpredictable results.

Oracle Applications Release 11 is a complete suite of over 50 products (AP, PO,
GL etc...) that uses a java-based interface. It is based on the Network
Computing Architecture (NCA). NCA is a multi-tier architecture that allows
functions to be distributed among multiple tiers of servers (desktop client,
forms server and the database server).

You will want the following documentation for reference:

Oracle Applications Developers Guide Release 11
Oracle Applications Release 11 System Administrator's Guide
Oracle Applications Release 11 Oracle Applications Installation
Oracle Applications User Interface Standards
Oracle Alerts User's Guide Release 11

Procedure
---------

Note: the following steps given are for a UNIX system, just make the
appropriate changes for your specific operating system.

1. Register your custom application with the Application Object Library. It is
recommended to use an XX as the preface to the custom schema short name so that
it does not conflict with any future Oracle Application short names.

Log into Applications as the System Administrator and navigate to:
Application --&gt Register.

For example:

Application Short Name Basepath Description
-----------------------------------------------------------------------
Custom Application XXCUS XXCUS_TOP Custom Application

Refer to "Oracle Applications Developers Guide Release 11" page 2-6.

2. Create a custom directory tree for your custom schema as the APPLMGR user.
Use the basepath parameter from the Application registration for the top level
directory. This top level directory will reside just under APPL_TOP. The
subdirectories under the custom directory may vary depending on the server type
(forms server, concurrent processing server, etc...). Make sure that the
rights/protections are open for the world (rwx).

For example:


APPL_TOP (/appl/v1100000)
|
XXCUS_TOP (/appl/v1100000/XXCUS)--&gt other product directories
|
------------------------------------------------
| | | | | | | |
bin forms html lib log mesg out reports
| |
US US

Refer to "Oracle Applications Developers Guide Release 11" page 2-2.

3. Modify the applications environmental file (example: APPLSYS.env) to include
the custom schema basepath as the APPLMGR user.

For example:

XXCUS_TOP="/appl/v1100000/XXCUS"
export XXCUS_TOP

4. Register the custom schema as an Oracle user.

a. Create the user in the RDBMS database using SQL*Plus under the system
account. Give the user a default and temporary tablespace with quotas and
then grant the CONNECT role.

For example:

$ sqlplus system/manager
SQL> create user XXCUS identified by CUST default tablespace USER_DATA
temporary tablespace TEMP quota unlimited on USER_DATA quota unlimited
on TEMP;
SQL> grant connect to XXCUS identified by CUST;

XXCUS is the product short name, CUST is the password for the custom
schema, USER_DATA and TEMP are existing tablespaces.


b. Register the user with the Application Object Library. Log into
Applications as the System Administrator and navigate to:
Security --&gt ORACLE --&gt Register.

For example:

Database
Username Password Privilege Install Group Description
--------------------------------------------------------------------------
XXCUS CUST Enabled 0 Custom Application

Refer to "Oracle Applications Release 11 System Administrator's Guide"
page 9-5.

5. Add the custom schema to a data group. Log into Applications as the System
Administrator and navigate to: Security --&gt ORACLE --&gt DataGroup.

For example:

Data Group: Standard
Description: Standard Data Group

Application Oracle ID Description
-------------------------------------------------------------
Custom Application APPS Custom Application

It is recommend that you use the STANDARD datagroup and pair the custom schema
with APPS or you can add a new data group. This depends upon your own
requirements.

Refer to "Oracle Applications Release 11 System Administrator's Guide" page
6-63.

6. Register your custom application with Alerts. Log into Applications as the
Alert Manager and navigate to System --&gt Installations.

For example:

Application Oracle Username Status
---------------------------------------------------
Custom Application XXCUS Custom


Refer to "Oracle Alert User's Guide Release 11" page 8-21

7. Create your custom tables, indexes, views and sequences. It is suggested
that you add WHO columns to your custom tables so that Oracle Applications can
keep track of customizations.

Register your custom schema's tables (including flexfields) with the PL/SQL
package AD_DD. You use the procedure AD_DD.register_table for the custom schema
tables and AD_DD.register_column for the custom schema table columns.

execute ad_dd.register_table (appl short name, table name, table type,
next extent, % free, % used)

For example:

$ sqlplus apps/apps
SQL> execute ad_dd.register_table ('XXCUS', 'CUST_TABLE' , 'T',8, 10, 90)

where appl short name='XXCUS', table name='CUST_TABLE',
table type='T', next extent=8, % free=10, % used=90


execute ad_dd.register_column (appl short name, table name, column name,
column seq, column type, column width, null,
translate)
For example:

$ sqlplus apps/apps
SQL> execute ad_dd.register_column ('XXCUS', 'CUST_TABLE' , 'CUST_NO',1,
'NUMBER',5,'N', 'N')

where appl short name='XXCUS', table name='CUST_TABLE',
column name='CUST_NO', column seq=1, column type='NUMBER',
column width=5, null='N', translate='N'

Refer to "Oracle Applications Developers Guide Release 11" page 3-2.

8. Run the custom schema against the APPS_DDL and APPS_ARRAY_DDL packages. Run
the scripts $AD_TOP/admin/sql/adaddls.pls, adaaddls.pls, adaddlb.pls and then
adaaddlb.pls (in this order) under SQL*Plus:

$ sqlplus apps/apps
SQL> @$AD_TOP/admin/sql/adaddls.pls system_pword custom_schema
custom_schema_pword
SQL> @$AD_TOP/admin/sql/adaaddls.pls system_pword custom_schema
custom_schema_pword
SQL> @$AD_TOP/admin/sql/adaddlb.pls system_pword custom_schema
custom_schema_pword
SQL> @$AD_TOP/admin/sql/adaaddlb.pls system_pword custom_schema
custom_schema_pword

9. Integrate your database objects with the APPS schema by granting APPS the
access to your custom schema's objects.

a) Grant all privileges from each custom data object to APPS.

For example:

$ sqlplus xxcus/cust
SQL> grant all on CUST_TABLE to APPS

b) Create a synonym in APPS to each custom data object.

For example:

$ sqlplus apps/apps
SQL> create synonym APPS.CUST_TABLE for XXCUS.CUST_TABLE

c) Create custom code objects in APPS

For example:

$ sqlplus apps/apps
SQL> create function CUST_FUNCTION?

Refer to "Oracle Applications Release 11 Oracle Applications Installation" page
A-7.

10. Build your custom forms, menus and libraries as the APPLMGR user. Use the
TEMPLATE form located in $AU_TOP/forms/US directory as the required starting
point for your development work for your custom forms. Follow the form
development steps (which incorporate the development standards) that are
described in the Oracle Application Developers Guide. You will modify the form
as needed, move the generated form to its proper directory, register the form
with the Oracle Application Object Library and then add it to a menu.

The following examples assume you are developing on the forms server.If the
forms are being developed on a Windows client refer to Note:73880.1

a. Make a copy of the TEMPLATE form and then rename it as the APPLMGR user.

For example:

$ cd $AU_TOP/forms/US
$ cp TEMPLATE.frm test.frm

b. In the forms designer attach any additional libraries to your custom
form. The TEMPLATE form already has the APPCORE, APPDAYPK, FNDSQF, GLOBE
and CUSTOM libraries attached. The only Oracle Applications library that you
should modify is the CUSTOM library. All the libraries need to reside in
directory $AU_TOP/resource and make sure that your FORM45_PATH includes
$AU_TOP/resource so that your form can find the libraries, $AU_TOP/forms/US
to locate forms, $AU_TOP/plsql and $ORACLE_HOME/forms45.

c. Modify the form as desired following the development standards. You will
be setting the properties of container and widget objects, creating window
layout, coding table handler, item handler, event handler and code logic,
enabling querying behavior, coding messaging, adding flexfield logic and
coding any other appropriate logic.

Refer to "Oracle Applications Developers Guide Release 11" page 1-16.

d. Generate the form on the forms server as the APPLMGR user. Make sure that
the $FORMS45_PATH is set and that the current directory is $AU_TOP/forms/us.

f45gen userid=apps/appspwd module=
.fmb
output_file=/forms//
.fmx
module_type=form batch=no compile_all=special

For example:

$ f45gen userid=apps/apps module=TEMP.fmb
output_file=/appl/v1100000/XXCUS/forms/US/TEMP.fmx
module_type=form batch=no compile_all=special

where form name=TEMP,schema_top=/appl/v1100000/XXCUS and language=US

e. Test the form by itself. Create either a static html file that calls your
form directly (instead of the usual signon form) or create a dynamic html
file and cartridge.

f. Register your form. Log into Applications as the Application Developer
responsibility and navigate to: Application --&gt Form.

For example:

Form Application User Form Name Description
------------------------------------------------------------------------
TEST Custom Application TEST Custom Form

Refer to "Oracle Applications Developers Guide Release 11" page 11-20.

g. Register the form as a function. If needed, register subfunctions per the
functionality that you require. Log into Applications as the Application
Developer responsibility and navigate to: Application --&gt Function. Click
on "Description" in the popup list.

For example:
-------------
| Description |
-------------

User
Function Function Name Type Description
-----------------------------------------------------------------------
TEST TEST FORM Custom Application

Now click on "Form" in the popup list.

------
| Form |
------

Function Form Application Parameters
-----------------------------------------------------------------------
TEST TEST Custom Application

Note: the Application field will be grayed out. It will automatically be
filled in when you enter the form name in the Form field.

Refer to "Oracle Applications Developers Guide Release 11" page 11-22

h. Add your custom functions (forms and subfunctions) to an existing menu or
create a new one. The menu will be tied to a responsibility. Log into
Applications as the Application Developer responsibility and navigate to:
Application --&gt Menu.

For example:

Menu: XXCUS_MAIN
User Menu Name: XXCUS_MAIN
Description: Main Custom Menu

Navigator
Seq Prompt Submenu Function Description
----------------------------------------------------------------------
1 Custom TEST Custom Form
2 Requests Standard Request Submi Administer Requests

Refer to "Oracle Applications Developers Guide Release 11" page 11-26.

i. Create a custom request group that will hold your custom and/or standard
requests for your custom responsibility. Log into Applications as the System
Administrator and navigate to: Security --&gt Responsibility --&gt Request.

For example:

Group: XXCustom
Application: Custom Application
Code:
Description: Custom Application

Requests
--------
Type Name Application
-------------------------------------------------------------
Program Custom Report 1 Custom Application
Program Custom Report 2 Custom Application

Refer to "Oracle Applications Release 11 System Administrator's Guide" page
6-46.

j) Create a custom responsibility for your custom schema. Log into
Applications as the System Administrator and navigate to:
Security --&gt Responsibility --&gt Define. Be sure to add the responsibility to
a user.

For example:
-----------------
Responsibility Name: XXCustom | Effective Dates |
Application: Custom Application -----------------
Responsibility Key: From: 05-JAN-1999
Description: Custom Responsibility To:

----------------- ------------
| Available From | | Data Group |
----------------- -------------
x Oracle Application Name: Standard
Oracle Self Service Web Applications Application: Custom Application

---------------
Menu: XXCUS_MAIN | Request Group |
---------------
Web Host Name: Name: XXCUS
Web Agent Name: Application: Custom Application

-------------------------------
| Function and Menu Exclusions |
-------------------------------
Type Name Description

Refer to "Oracle Applications Release 11 System Administrator's Guide" page
2-9.

k. Test the form from within Applications.

11. Build online help for your custom applications as the APPLMGR user.

a. Make sure that your custom form refers to your custom application short
name in the call to the FND_STANDARD.FORM_INFO routine in the PRE-FORM
trigger.

For example, in the forms designer open your custom form and navigate to:
Triggers --&gt PRE-FORM. XXCUS is the custom application short name and
BLOCKNAME is the name of the window:

begin
FND_STANDARD.FORM_INFO('$Revision: 99 $', 'Template Form', 'XXCUS'
'$Date: 99/05/25 12:01:01 $', '$Author: John Doe $');
app_standard.event('PRE_FORM');
app_window.set_window_position('BLOCKNAME','FIRST_WINDOW');
end;

b. Create a subdirectory for your help files using the application short
name. This subdirectory will reside under the directory path specified by
the profile HELP_BASE_URL plus the language that you are working under.

c. Create a subdirectory under your help files subdirectory to hold the
links files. The links allow Oracle Applications to find the correct help
files.

d. Create your online help html files. Include the html target tags of the
form near the beginning of the file. The target name is comprised of the
form name and the window name.

d. Create your online help html files. Include the html target tags of the
form near the beginning of the file. The target name is comprised of the form
name and the window name.

For example, create a file called $OA_DOC/US/XXCUS/custom.htm using an html
editor. The target tag with form name=CUSTOM and window name=BLOCKNAME
would be custom.BLOCKNAME:











e. Create your links file. The links file stores the connection between the
target and target in the destination html file. You will have one links file
for each form and it will be named after the form. Copy an existing Oracle
Applications links file to your links subdirectory and modify it.

For example, copy an existing links file to your custom links subdirectory,
modify $OA_DOC/US/XXCUS/links/custom.htm using an html editor. The target
is CUSTOM_BLOCKNAME (form name=CUSTOM and window name=BLOCKNAME), the html help
file is custom.htm with a target tag of custom.BLOCKNAME:







f. If desired, a link to your custom application can be added to the Oracle
Applications online help file, library.htm

Refer to "Oracle Applications Developers Guide Release 11" page 24-26.

12. Create your message dictionary.

a. Make sure you have a message (mesg) subdirectory under your custom
applications basepath.

b. Define your messages following the message standards. Login as the
Application Developer and navigate to: Application --&gt Messages.

For example:

Name Language Application Number
--------------------------------------------------------------
XXCUS_UPDATE US Custom Application 1

Current Message Text
--------------------------------------------------------------
Custom Applications update message

c. Create the message files. From the operating system run the Message
Dictionary Generator program (FNDMDGEN) as the APPLMGR user.

FNDMDGEN apps/appspword 0 Y DB_TO_RUNTIME

For example:

$ FNDMDGEN apps/apps 0 Y US XXCUS DB_TO_RUNTIME

where Language=US and Application Short Name=XXCUS

The FNDMDGEN program will generate a message file named .msb in
place it in the custom applications basepath mesg directory.

d. If needed make a copy of the generated file (located on the server) and
transfer the copy to the appropriate mesg directory for the custom
application on the client system.

e. Code the logic to set up messages. You will use calls to the FND_MESSAGE
package to retrieve and set up messages for display.

f. Code the logic to display messages. You will either display the message
to a user on the client or write it to a file on the server. You will use
calls to the FND_MESSAGE package to display messages.

Refer to "Oracle Applications Developers Guide Release 11" page 12-2.

13. Set up your concurrent processing for your Custom Schema.

a. Write the concurrent program execution file and place it in the
appropriate directory. You can use a variety of methods such as C, Pro*C,
SQL*Plus, PL/SQL, Oracle Reports or a host language program (a shell
script).

b. Define the concurrent program executable with the Oracle Application
Object Library. This links the execution file and the method used to execute
it with a defined concurrent program. Log into Applications as the System
Administrator and navigate to: Concurrent --&gt Program --&gt Executable.

For example:

Executable: XXCUS
Short Name: XXCUS
Application: Custom Application
Description: Custom Program for Updates
Execution Method: Spawned
Execution File Name: XXCUSUPT
Subroutine Name:

c. Define the concurrent program with the Oracle Application Object Library
along with any program parameters or any incompatibilities. Log into
Applications as the System Administrator and navigate to:
Concurrent --&gt Program --&gt Executable.

For example:

Program: Custom Update x Enabled
Short Name: XXCUS
Application: Custom Application
Description: Custom Program for Updates

Executable
----------
Name: XXCUS Options
Method: Spawned Priority

Request Output
------- ------
Type: Format: Text
Use in SRS x Save
Allow Disabled Values x Print
Enable Trace Columns:
x Restart on System Failure Rows:
NLS Compliant style Style:
Style Required
Printer:

d. Add the request functionality for your concurrent program. The program
can be called from the run reports form, from a trigger within an
application form or from a Pro*C program. To use the run reports form, just
add the submit request window to your custom menu so that you have access to
the Standard Request Submission interface (SRS).
[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/59792/viewspace-881970/,如需轉載,請註明出處,否則將追究法律責任。

相關文章