Sunday, October 11, 2009

How to Integrate Applications Release R12 with Custom Applications

This is our requirement.



SCHEMA NAME : XXCUST
TOP NAME : XXCUST_TOP
Application : XXCUST Custom Application
Data Group : Standard
Request Group : XXCUST Request Group
Menu : XXCUST_CUSTOM_MENU
Responsibility : XXCUST Custom



Assumptions:
APPL_TOP: /d01/oracle/VIS/apps/apps_st/appl
Instance Name: VIS
Server OS: linux


There are 14 simple steps to achieve this.
1) Make the directory structure for your custom application files.

cd $APPL_TOP
mkdir XXCUST
mkdir XXCUST/12.0.0
mkdir XXCUST/12.0.0/admin
mkdir XXCUST/12.0.0/admin/sql
mkdir XXCUST/12.0.0/admin/odf
mkdir XXCUST/12.0.0/sql
mkdir XXCUST/12.0.0/bin
mkdir XXCUST/12.0.0/reports
mkdir XXCUST/12.0.0/reports/US
mkdir XXCUST/12.0.0/forms
mkdir XXCUST/12.0.0/forms/US
mkdir XXCUST/12.0.0/lib
mkdir XXCUST/12.0.0/out
mkdir XXCUST/12.0.0/log

2) Add the custom module into the environment

cd $APPL_TOP
echo "XXCUST_TOP=/d01/oracle/VIS/apps/apps_st/appl/XXCUST/12.0.0" >customVIS_linux.env
echo "export XXCUST_TOP " >> customVIS_linux.env
Source the environment file (/d01/oracle/VIS/apps/apps_st/appl/APPSVIS_linux.env )

Make entry to the application context file
vi $INST_TOP/appl/admin/VIS_linux.xml

/d01/oracle/VIS/apps/apps_st/appl/XXCUST/12.0.0

cd $INST_TOP/admin/install
sh adgentopfile.sh

3) create tablespace XXCUST datafile '/d01/oracle/VIS/db/apps_st/data/XXCUST01.dbf'
size 500M

4) create user XXCUST identified by XXCUST
default tablespace XXCUST
temporary tablespace temp
quota unlimited on XXCUST;
grant connect, resource to XXCUST;


5) Register your Oracle Schema.
Login to Applications with System Administrator responsibility
Navigate to Application-->Register
Application = XXCUST Custom Application
Short Name = XXCUST
Basepath = XXCUST_TOP
Description = XXCUST Custom Application


6) Register Oracle User
Naviate to Security-->Oracle-->Register
Database User Name = XXCUST
Password = XXCUST
Privilege = Enabled
Install Group = 0
Description = XXCUST Custom Application User

7) Add Application to a Data Group
Navigate to Security-->Oracle-->DataGroup


8) Create custom request group
This will act as a placeholder for any custom reports we wish to make available for the Custom Responsibility (which is defined at a later stage)
Navigate to Security-->responsibility-->Request
Group = XXCUST Request Group
Application = XXCUST Custom
Code = XXCUST
Description = XXCUST Custom Requests
At this statge, We are not going to define any requests, but you can add request in the later point of time if its required.

9) Create custom menu
This will act as a placeholder for any menu items we wish to make available for the Custom Responsibility (which is defined at a later stage).

Navigate to Application-->Menu
Menu = XXCUST_CUSTOM_MENU
User Menu Name = XXCUST Custom Application Menu
Menu Type =
Description = XXCUST Custom Application Menu
Seq = 100
Prompt = View Requests
Submenu =
Function = View All Concurrent Requests
Description = View Requests
Seq = 110
Prompt = Run Requests
Submenu =
Function = Requests: Submit
Description = Submit Requests

10) Create new responsibility. Navigate to Security-->Responsibility-->Define
Responsibility Name = XXCUST Custom
Application = XXCUST Custom
Responsibility Key = XXCUSTRESP
Description = XXCUST Custom Responsibility
Available From = Oracle Applications
Data Group Name = Standard
Data Group Application = XXCUST Custom Application
Menu = XXCUST Custom Application Menu
Request Group Name = XXCUST Request Group

11) Add responsibility to user
Navigate to Security-->User-->Define
Add XXCUST Custom responsibility to users as required.

12) Other considerations
You are now ready to create your database Objects, custom Reports, Forms, Packages, etc
Create the source code files in the XXCUST_TOP directory appropriate for the type of object. For example forms would be located in $XXCUST_TOP/forms/US or

package source code in $XXCUST_TOP/admin/sql for example.

Database Objects, such as tables, indexes and sequences should be created in the XXCUST schema, and then you need to
   a) Grant all privilege from each custom data object to the APPS schema.
      For example : logged in as XXCUST user
      grant all privileges on XX_TABLE to apps;
   b) Create a synonym in APPS for each custom data object
      For example : logged in as APPS user
      create synonym XX_TABLE for XXCUST.XX_TABLE;

13) Login to sysadmin, Application Developer Responsibility

In the backend compile your form
su - applmgr
cd $AU_TOP/forms/US
cp TEMPLATE.fmb XXSAMPLE.fmb
frmcmp_batch Userid=apps/apps module=XXSAMPLE.fmb output_file=/d01/oracle/VIS/apps/apps_st/appl/XXCUST/12.0.0/forms/US/XXSAMPLE.fmx compile_all=special  batch=yes

Application > Form (Register the form)

Application > Menu (Attach the function to a menu)

Open new session, source environment file, and stop middle tier services, run autoconfig

Open new session, source environment file, check for custom top in topfile.txt in $APPL_TOP/admin, start the middle tier services.

   cd $ADMIN_SCRIPTS_HOME
   sh adstpall.sh apps/apps
   sh adautocfg.sh
   sh adstrtal.sh apps/apps
   cat $APPL_TOP/admin/topfile.txt
   You can find the entry as lke this, XXCUST /d01/oracle/VIS/apps/apps_st/appl

14) Menu that is added to a particular responsibility is given to specific user
Security > User >
Attach our custom responsibility to the user.

Common Errors and Solution:

1. Function not available to this responsibility. Change responsibility or contact your system administrator.

Solution
Restart the forms server
cd $ADMIN_SCRIPTS_HOME
sh adstpall.sh apps/apps
sh adstrtal.sh apps/apps

Thanks & Regards,
Anto Joe Natesh I

1 comment:

Anonymous said...

good solution for beginners

--Amol