0% found this document useful (0 votes)
49 views71 pages

Quick References 22032016

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views71 pages

Quick References 22032016

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 71

JAVA____________________________________________________________________________3

tar__________________________________________________________________________________________3
Error________________________________________________________________________________________3
problem to get jbo_03_01.dtd_____________________________________________________________________3
Decompiling Java class file using jad_______________________________________________________________3
Error Solving_______________________________________________________________________________4
What does the Application Technology include ?___________________________________________________4
XML-20108: (Fatal Error) Start of root element expected.______________________________________________4
Setup –> Profile Options_________________________________________________________________5
Database_________________________________________________________________________6
Recompile Database Objects______________________________________________________________6
1. From Database Tier___________________________________________________________________________6
2. From application tier (using adadmin)____________________________________________________________6
3. From SQL (Individual objects)__________________________________________________________________6
How to identify database port from front end?________________________________________________________7
Port__________________________________________________________________________________8
Single Query__________________________________________________________________________________8
Scanning a range of ports________________________________________________________________________8
How to find the TNS details from front end?_________________________________________________9
FORMS_________________________________________________________________________11
How to compile Forms in 11i and R12_____________________________________________________________11
APPS___________________________________________________________________________12
How to Make Help Diagnostics Examine be Password Protected OR Not?________________________________12
How to create dbc file__________________________________________________________________________12
AUTOCONIG________________________________________________________________________________13
How to know the DBC file being accessed?_________________________________________________________14
R 12.1.3 How to Clear Cache, Bounce Apache___________________________________________15
 HOWTO - CLEAR CACHE________________________________________________________________15
 HOWTO - CLEAR Browser Cache__________________________________________________________16
 HOWTO - RESTART APACHE____________________________________________________________16
 To bounce the OC4J container there is a specific script:__________________________________________18
For 11i users : How To Clear Server Cache and Bounce Apache (Web Server)?____________________________20
11i OU Context setting__________________________________________________________________20
PATCHES AND BUGS_________________________________________________________________21
MS DOS_________________________________________________________________________25
SET COMMAND_____________________________________________________________________________25
UNIX___________________________________________________________________________26
How to check number of forms users at any time?____________________________________________________26
Find command_______________________________________________________________________________26
TKPROF:___________________________________________________________________________________26
PL/SQL Sample Codes_____________________________________________________________28
Update______________________________________________________________________________________28
Purchasing___________________________________________________________________________________28
Inventory____________________________________________________________________________________29
Internal requisition and Sales Orders:______________________________________________________________29
Organizational Queries:________________________________________________________________________29
Relation between Ledger , Legal entity, Operating Unit information in Oracle Apps R12_____________________30
HRMS______________________________________________________________________________________31

1
To Know Scheduled concurrent programs__________________________________________________________31
Receiving Tables______________________________________________________________________________32
Purchasing______________________________________________________________________33
Retroactive dates problem_______________________________________________________________________33
Purchase Order information from General Ledger____________________________________________________33
ASN Queries:-________________________________________________________________________________33
What happens when we submit ASN from portal.__________________________________________________34
Supplier User Queries:_________________________________________________________________________34
ENGLISH_______________________________________________________________________43
Security notes____________________________________________________________________43
Create Custom Top________________________________________________________________45
Run Commands___________________________________________________________________62
SQL loader_______________________________________________________________________62
Reset system password_____________________________________________________________62
To know the version of Linux____________________________________________________________________64
[appl123@bb02 ~]$ cat /etc/*-release_____________________________________________________64
Red Hat Enterprise Linux Server release 5.4 (Tikanga)_____________________________________64
[appl123@bb02 ~]$_______________________________________________________________________64
Useful SQL Queries_______________________________________________________________64
Applet/JRE problem in R12__________________________________________________________70

2
JAVA
tar
Create the tar file using command below
tar -cvf xxEmailPersonalize.tar ./oracle/*
This file xxEmailPersonalize.tar can be FTPed to the new environment,

from where you can unzip this by command

tar –xvf xxEmailPersonalize.tar ./

Error
jar xvf bc4jmt.jar

ReqApproverVO.xml<Line 2, Column 81>: XML-20108: (Fatal Error) Start of root


element expected.

Solution

add
<stub />
in the las leg.

problem to get jbo_03_01.dtd

get bc4jmt.jar from foler /u01/applvis12/apps/tech_st/10.1.3/BC4J/lib.


put this file into D:\JdevR1213\jdevbin\jdk\bin>.

jar xvf bc4jmt.jar

Decompiling Java class file using jad

D:\>jad DetailDataInputCO.class
Parsing DetailDataInputCO.class... Generating DetailDataInputCO.jad

Error Solving
Exception Details.

3
oracle.apps.fnd.framework.OAException: Application: FND, Message Name:
FND_GENERIC_MESSAGE. Tokens: MESSAGE = java.sql.SQLException: ORA-
06550: line 1, column 39:
PLS-00103: Encountered the symbol "?" when expecting one of the following:

Append following to .dbc file:


JDBC\:processEscapes=true

What does the Application Technology include ?

The Application Technology includes: Oracle Application Framework


(JDeveloper, etc), Oracle Application Object Library, Oracle Workflow,
Oracle Report Manager, Oracle WEB ADI, Oracle Alert, Oracle Applications
Technology Stack, Oracle XML Publisher, etc.

select * from ad_applied_patches where PATCH_NAME in ('9239090', '8919491');

fetches 2 records
Error: oracle.apps.icx.por.req.server.RequisitionAM: Application Module
oracle.apps.icx.por.req.server.RequisitionAM has an invalid View Instance
OpenWorklistVO.

XML-20108: (Fatal Error) Start of root element expected.

ReqApproverVO.xml<Line 2, Column 81>: XML-20108: (Fatal Error) Start of root


element expected.

add
<stub />
in the las leg.

Setup –> Profile Options


• Personalize Self-Service Defn
– Yes to allow ‘Personalize’ button to appear at the top of the page
• FND: Personalization Region Link Enabled
– Yes to display all the regional links above each region
– Minimal to display key regional links
• Disable Self-Service Personal
– Yes will disable all personalizations at any level
• FND: Diagnostics
– Turns on ‘About this Page’
• FND: Personalization Document Root Path (new in 11.5.10)

4
– Required to migrate personalizations
– Set this profile option to a tmp directory with open (777) permissions
• FND:OA:Enable Defaults
– Allows defaulting through personalizations to take place

5
Database
Recompile Database Objects
Check for invalid database objects and recompile if necessary. Invalid objects
may cause the load to fail. Contact your System Administrator for more
information.

1. From Database Tier


a) Login as database tier user
b) cd $@$AD_TOP/admin/sql
c) sqlplus system/manager@visr12

SQL> @ advrfapp.sql

This creates a report called <APPS schema name>.lst in


$APPL_TOP/admin/ SID>/ out directory.

This report shows:


 invalid objects in APPS schema
 missing objects in APPS schema
This task must be run:
 when there are customizations in APPS schema;
 after upgrade, applying a maintenance pack;
 before conversion to Multi Org or Multi Reporting Currencies
(MRC);
 after an import/ export;
 if an error is coming from AD_DDL package.

2. From application tier (using adadmin)


a) Login as application tier user (avisr12 in my case)
b) Set environment variable (under INSTALL_DIR/apps/apps_st/appl/APPS [sid]_
[hostname] .env)
c) admin
d) option 3 “compile/reload Applications Database Entities menu
e) option 1 “Compile Apps Schema”

3. From SQL (Individual objects)


a) Identity Invalid Object “SQL> select object_name, owner, object_type from
all_objects where status like ‘INVALID’ ”
b) SQL> alter [object] [object_name] compile;

SQL> select owner, count(*) from dba_objects where status='INVALID' group by


owner;

6
How to identify database port from front end?
System administrator Autoconfig

Click on edit parameters link in database tier.

In System, click on expand 

7
Port
Single Query
C:\PortQryV2>portqry -n estudiodell07.oracle.co.uk -e 1523

portqry -n r01.lntinfotech.com -e 1521

portqry -n db01.lntinfotech.com -e 1521

Scanning a range of ports

You can also query a range of ports:

portqry -n server1.dpetri.net -p tcp -r 21:143

8
portqry -n 172.28.10.231 -p tcp -r 1521:1550

How to find the TNS details from front end?

APPS_JDBC_URL
jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(LOAD_BALANCE=YES)
(FAILOVER=YES)(ADDRESS=(PROTOCOL=tcp)(HOST=db01.lntinfotech.com)(PORT=1525)))
(CONNECT_DATA=(SID=VISR12)))

9
AD_APPS_JDBC_URL
(DESCRIPTION=(ADDRESS_LIST=(LOAD_BALANCE=YES)(FAILOVER=YES)
(ADDRESS=(PROTOCOL=tcp)(HOST=db01.lntinfotech.com)(PORT=1525)))
(CONNECT_DATA=(SID=VISR12)))

10
FORMS

How to compile Forms in 11i and R12

Compile Forms in 11i

$ f60gen module=<formname>.fmb userid=apps/<apps_pwd>


output_file=$XX_TOP/forms/US/<formname>.fmx

Compile Forms in R12

$ frmcmp_batch <formname>.fmb userid=apps/<apps_pwd>


output_file=$XX_TOP/12.0.0/form/US/<formname>.fmx module_type=form compile_all=special

11
APPS
How to Make Help Diagnostics Examine be Password Protected OR Not?
1. Login to Applications and choose the System Administrator responsibility.
2. Navigate to Profile System.
3. Search on %diagn%
4. Select 'Utilities: Diagnostics'.
5. Set this to 'No'.
6. Log out then log in to Applications.
7. To disable password protection set profile to 'Yes'.

What is GWYUID ?
GWYUID , stands for Gateway User ID and password. Usually like
APPLSYSPUB/PUB

Where GWYUID defined & what is its used in Oracle Applications ?

GWYUID is defined in dbc i.e. Database Connect Descriptor file. It is used to


connect to database by think clients.

What is difference between GUEST_USER_PWD (GUEST/ORACLE) &


GWYUID ?

GUEST_USER_PWD(Guest/Oracle) is used by JDBC Thin Client where as GWYUID


is used by Thick Clients like via Forms Connections.

How to create dbc file


(in linux, not working in Unix)
Go to $FND_TOP/secure
/u01/applvis12/apps/apps_st/appl/fnd/12.0.0/secure

Execute following command

java oracle.apps.fnd.security.AdminAppServer apps/appsr01 ADD FNDNAM=apps


GWYUID=applsyspub/pub TWO_TASK=VISR12 SECURE_PATH=$FND_TOP/secure
GUEST_USER_PWD=guest/oracle APPS_JDBC_DRIVER_TYPE=THIN
DB_HOST=r01.lntinfotech.com DB_PORT=1521

ADD executed successfully -


/u01/applvis12/apps/apps_st/appl/fnd/12.0.0/secure/VISR12.dbc

The .dbc file is in $FND_SECURE (rather than $FND_TOP/secure)

12
AUTOCONIG
$ cd $INST_TOP/admin
$ ls
install log out scripts
$ cd sc*
$ ls
adalnctl.sh adcmctl.sh adformsrvctl.sh adopmnctl.sh adstrtal.sh gsmstart.sh javacache.log
mwactl.sh
adapcctl.sh adexecsql.pl adoacorectl.sh adpreclone.pl cmclean.sql ieo jtffmctl.sh
mwactlwrpr.sh
adautocfg.sh adformsctl.sh adoafmctl.sh adstpall.sh core java.sh msc sqlnet.log

$ adautocfg.sh
Enter the APPS user password:

The log file for this session is located at:


/u03/appvis12/inst/apps/VISR12_db01/admin/log/01051653/adconfig.log

AutoConfig is configuring the Applications environment...

AutoConfig will consider the custom templates if present.


Using CONFIG_HOME location : /u03/appvis12/inst/apps/VISR12_db01
Classpath : /u03/appvis12/apps/apps_st/comn/java/lib/appsborg2.zip:/u03/appvis12/apps/
apps_st/comn/java/classes

Using Context file : /u03/appvis12/inst/apps/VISR12_db01/appl/admin/VISR12_db01.xml

Context Value Management will now update the Context file

Updating Context file...COMPLETED

Attempting upload of Context file and templates to database...COMPLETED

Configuring templates from all of the product tops...


Configuring AD_TOP........COMPLETED
Configuring FND_TOP.......COMPLETED
Configuring ICX_TOP.......COMPLETED
Configuring MSC_TOP.......COMPLETED
Configuring IEO_TOP.......COMPLETED
Configuring BIS_TOP.......COMPLETED
Configuring AMS_TOP.......COMPLETED
Configuring CCT_TOP.......COMPLETED
Configuring WSH_TOP.......COMPLETED
Configuring CLN_TOP.......COMPLETED
Configuring OKE_TOP.......COMPLETED
Configuring OKL_TOP.......COMPLETED
Configuring OKS_TOP.......COMPLETED
Configuring CSF_TOP.......COMPLETED

13
Configuring IGS_TOP.......COMPLETED
Configuring IBY_TOP.......COMPLETED
Configuring JTF_TOP.......COMPLETED
Configuring MWA_TOP.......COMPLETED
Configuring CN_TOP........COMPLETED
Configuring CSI_TOP.......COMPLETED
Configuring WIP_TOP.......COMPLETED
Configuring CSE_TOP.......COMPLETED
Configuring EAM_TOP.......COMPLETED
Configuring FTE_TOP.......COMPLETED
Configuring ONT_TOP.......COMPLETED
Configuring AR_TOP........COMPLETED
Configuring AHL_TOP.......COMPLETED
Configuring OZF_TOP.......COMPLETED
Configuring IES_TOP.......COMPLETED
Configuring CSD_TOP.......COMPLETED
Configuring IGC_TOP.......COMPLETED

AutoConfig completed successfully.


$ pwd
/u03/appvis12/inst/apps/VISR12_db01/admin/scripts
$ cd $FND_SECURE
$ pwd
/u03/appvis12/inst/apps/VISR12_db01/appl/fnd/12.0.0/secure
$

This creates .dbc file under /u03/appvis12/inst/apps/VISR12_db01/appl/fnd/12.0.0/secure

How to know the DBC file being accessed?

Step 1. Open Internet Explorer or Firefox


Step 2. Type in the url eg: http://r01.lntinfotech.com:8000/OA_HTML/RF.jsp?
Step 3. This should bring the login page (AppsLogin)
Step 4. Click on “About this page” — bottom left
Step 5. Click on “Page Context” (3rd tab)
Here we will get the following details:
o Database Hostname
o DBC file being accessed
o JDBC Port
o SID being used to connect to the database

14
The DBC file being accessed provides, the full path of the dbc file (ie.,
$FND_SECURE or $INST_TOP/appl/fnd/12.0.0/.dbc). The expanded path will have
the hostname. That is the mid-tier we are connected to.

R 12.1.3 How to Clear Cache, Bounce Apache


(when requested for tools like iSupport, iStore [888616.1])

 HOWTO - CLEAR CACHE


(this will clear cache at the Application Server level)

Note: Clearing _pages directory is no longer a recommended solution.

Clearing the _pages in R12 creates blank login page issue, as in R12 the jsp files
does not get compiled automatically.

15
Instead should use the following, which is safer:

Navigate to Functional Administrator responsibility > Core Services > Caching


Framework > Global Configuration > Clear cache

 HOWTO - CLEAR Browser Cache


(this will ensure that when the browser is again used that a 'trip' to the Server is
necessary to refresh the data rather than using code, images, etc. local to the
server)

For Internet Explorer :

- go to menu Tools => Internet Options?, - select 'General' tab,


- click on button 'Delete Files' in 'Temporary Internet files' zone
- close all IE windows and restart new browser session.

For Firefox:

- go to menu Tools => 'Clear Private Data...' to clear the entire cache
or
- go to menu Tools => Options.
- Privacy Tab
- Within here there are two links to "Clear Recent History" and "Remove
Individual Cookies"

 HOWTO - RESTART APACHE

(This totally stops the mid-tier services and restarts)

Use putty SSH to login


login as: applvis12
[email protected]'s password:
Last login: Fri Dec 9 07:51:47 2011 from 192.169.4.0

For bb02 /u03/appl123/inst/apps/VIS123_bb02/admin/scripts


$ pwd
/home/applvis12
$cd $INST_TOP/admin/scripts
$ cd /u01/applvis12/inst/apps/VISR12_r01/admin/scripts
$ pwd
/u01/applvis12/inst/apps/VISR12_r01/admin/scripts
$ adapcctl.sh status

You are running adapcctl.sh version 120.7.12010000.2

Checking status of OPMN managed Oracle HTTP Server (OHS) instance ...

16
Processes in Instance: VISR12_r01.r01.lntinfotech.com
---------------------------------+--------------------+---------+---------
ias-component | process-type | pid | status
---------------------------------+--------------------+---------+---------
OC4JGroup:default_group | OC4J:oafm | 30388 | Alive
OC4JGroup:default_group | OC4J:forms | 30317 | Alive
OC4JGroup:default_group | OC4J:oacore | 4021 | Alive
HTTP_Server | HTTP_Server | 29892 | Alive

adapcctl.sh: exiting with status 0


adapcctl.sh: check the logfile
/u01/applvis12/inst/apps/VISR12_r01/logs/appl/admin/log/adapcctl.txt for more
information ..

$ adapcctl.sh stop

You are running adapcctl.sh version 120.7.12010000.2


Stopping OPMN managed Oracle HTTP Server (OHS) instance ...
opmnctl: stopping opmn managed processes...
adapcctl.sh: exiting with status 0
adapcctl.sh: check the logfile
/u01/applvis12/inst/apps/VISR12_r01/logs/appl/admin/log/adapcctl.txt for more
information ..

[applvis12@R01 scripts]$ adapcctl.sh status

You are running adapcctl.sh version 120.7.12010000.2


Checking status of OPMN managed Oracle HTTP Server (OHS) instance ...
Processes in Instance: VISR12_r01.r01.lntinfotech.com
---------------------------------+--------------------+---------+---------
ias-component | process-type | pid | status
---------------------------------+--------------------+---------+---------
OC4JGroup:default_group | OC4J:oafm | 30388 | Alive
OC4JGroup:default_group | OC4J:forms | 30317 | Alive
OC4JGroup:default_group | OC4J:oacore | 4021 | Alive
HTTP_Server | HTTP_Server | N/A | Down

adapcctl.sh: exiting with status 0


adapcctl.sh: check the logfile
/u01/applvis12/inst/apps/VISR12_r01/logs/appl/admin/log/adapcctl.txt for more
information ..

After 2-3 mins

$ adapcctl.sh start

You are running adapcctl.sh version 120.7.12010000.2


Starting OPMN managed Oracle HTTP Server (OHS) instance ...

17
12/09/11-08:21:12 :: Removing gantt cache directory
12/09/11-08:21:12 :: Successfully removed the gantt cache
directory:/u01/applvis12/apps/apps_st/comn/webapps/oacore/html/cabo/images/cache/
gantt
opmnctl: opmn is already running.
opmnctl: starting opmn managed processes...
adapcctl.sh: exiting with status 0
adapcctl.sh: check the logfile
/u01/applvis12/inst/apps/VISR12_r01/logs/appl/admin/log/adapcctl.txt for more
information ..

$ adapcctl.sh status

You are running adapcctl.sh version 120.7.12010000.2


Checking status of OPMN managed Oracle HTTP Server (OHS) instance ...
Processes in Instance: VISR12_r01.r01.lntinfotech.com
---------------------------------+--------------------+---------+---------
ias-component | process-type | pid | status
---------------------------------+--------------------+---------+---------
OC4JGroup:default_group | OC4J:oafm | 30388 | Alive
OC4JGroup:default_group | OC4J:forms | 30317 | Alive
OC4JGroup:default_group | OC4J:oacore | 4021 | Alive
HTTP_Server | HTTP_Server | 24955 | Alive
adapcctl.sh: exiting with status 0
adapcctl.sh: check the logfile
/u01/applvis12/inst/apps/VISR12_r01/logs/appl/admin/log/adapcctl.txt for more
information ..

In R12 the command to stop and start apache only takes action on Apache web
server and not on the OC4J container that executes the JVM.

 To bounce the OC4J container there is a specific script:


In R12, the command to stop and start apache only takes action on Apache web
server and not on the OC4J container that executes the JVM. To bounce the OC4J
container there is a specific script:

$INST_TOP/admin/scripts/adoacorectl.sh

Therefore when making a modification to a JAVA class in R12 for the web
application, in order to have that change recognized, it is needed to bounce
OC4J using adoacorectl.sh script.
Bouncing oacore OC4J engine may also be needed if you make modifications to
system properties. Example for JTT based applications: jtt system properties.
$ pwd
 $INST_TOP 

18
/u01/applvis12/inst/apps/VISR12_r01/admin/scripts
[applvis12@R01 scripts]$ adoacorectl.sh stop
You are running adoacorectl.sh version 120.13
Stopping OPMN managed OACORE OC4J instance ...
adoacorectl.sh: exiting with status 0
adoacorectl.sh: check the logfile
/u01/applvis12/inst/apps/VISR12_r01/logs/appl/admin/log/adoacorectl.txt for
more information ...

$ adoacorectl.sh status
You are running adoacorectl.sh version 120.13
Checking status of OPMN managed OACORE OC4J instance ...

Processes in Instance: VISR12_r01.r01.lntinfotech.com


---------------------------------+--------------------+---------+---------
ias-component | process-type | pid | status
---------------------------------+--------------------+---------+---------
OC4JGroup:default_group | OC4J:oafm | 30388 | Alive
OC4JGroup:default_group | OC4J:forms | 30317 | Alive
OC4JGroup:default_group | OC4J:oacore | N/A | Down
HTTP_Server | HTTP_Server | 23575 | Alive
adoacorectl.sh: exiting with status 0
adoacorectl.sh: check the logfile
/u01/applvis12/inst/apps/VISR12_r01/logs/appl/admin/log/adoacorectl.txt for
more information ...
$ adoacorectl.sh start
You are running adoacorectl.sh version 120.13

Starting OPMN managed OACORE OC4J instance ...


adoacorectl.sh: exiting with status 0
adoacorectl.sh: check the logfile
/u01/applvis12/inst/apps/VISR12_r01/logs/appl/admin/log/adoacorectl.txt for
more information ...

$ adoacorectl.sh status
You are running adoacorectl.sh version 120.13
Checking status of OPMN managed OACORE OC4J instance ...
Processes in Instance: VISR12_r01.r01.lntinfotech.com
---------------------------------+--------------------+---------+---------
ias-component | process-type | pid | status
---------------------------------+--------------------+---------+---------
OC4JGroup:default_group | OC4J:oafm | 30388 | Alive
OC4JGroup:default_group | OC4J:forms | 30317 | Alive
OC4JGroup:default_group | OC4J:oacore | 25362 | Alive
HTTP_Server | HTTP_Server | 23575 | Alive
adoacorectl.sh: exiting with status 0

19
adoacorectl.sh: check the logfile
/u01/applvis12/inst/apps/VISR12_r01/logs/appl/admin/log/adoacorectl.txt for
more information ...
$

For 11i users : How To Clear Server Cache and Bounce Apache (Web Server)?
(note:295484.1)
To clear HTML cache :

cd $COMMON_TOP/_pages

Direcetory is :
/global/oracle/your_sid/apps/apps_st/comn/_pages

Here are the java classes to clear.


Do rm * in _pages directory after having checked there are only compiled classes in this directory

11i OU Context setting


begin
dbms_application_info.set_client_info(0);
end;

20
PATCHES AND BUGS
select bug_number, to_char(creation_date,'DD-MON-RRRR HH:MM:SS')
DATE_APPLIED
from ad_bugs where bug_number in ('4658981')

BUG_NUMBER DATE_APPLIED
4658981 30-NOV-2007 12:11:02

To Know the Level of AP patchset. Run this select:

select patch_level
from fnd_product_installations
where application_id = 200;

select * from ad_applied_patches where PATCH_NAME ='4634594'

21
How To Add Responsibility to USER using pl/sql?
If you have the Apps Password, its quite easy to create a FND_USER for yourself
by using the API. I find this script very useful when development environment
gets cloned from Production (that is when i do not have FND_USER in
Production).

Please note that:-

1. You will be allocated System Administrator by this script. Hence you can
assign whatever responsibilities that you desire latter, after logging in.
2. The password will be set to oracle
3. You need apps password to run this script. Alternately you need execute
permission on fnd_user_pkg from the user where this script will be run. If using
some other user, please use apps.fnd_user_pkg.createuser
4. You need a COMMIT. I have not included the commit within this script.
5. When running this script, you will be prompted to enter a user name.

Using the pl/sql you can add responsibility to any USER without having
Application System Administrator Rights.

First, get value for ‘Responsablity_Application_Short_Name’ and


‘Responsibility_Key’ Parameters you need to run following sql Statement by
Using APPS User Name

SELECT FAV.APPLICATION_SHORT_NAME,
FAV.APPLICATION_NAME,FRV.RESPONSIBILITY_KEY, FRV.RESPONSIBILITY_NAME
FROM FND_APPLICATION_VL FAV, FND_RESPONSIBILITY_VL FRV
WHERE FRV.APPLICATION_ID=FAV.APPLICATION_ID
ORDER BY FRV.RESPONSIBILITY_NAME

To add Responsibility of “Receivables Manager” to User Jiltin

BEGIN
fnd_user_pkg.addresp
(‘JILTIN’,‘AR’,‘RECEIVABLES_MANAGER’,‘STANDARD’,‘Add Responsibility to USER
using pl/sql’,SYSDATE,SYSDATE + 100);
COMMIT;
DBMS_OUTPUT.put_line (‘Responsibility Added Successfully’);
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ( ‘ Responsibility is not added due to ‘” SQLCODE”
SUBSTR (SQLERRM, 1, 100));
ROLLBACK;
END;
Another sample script to add System Administrator

22
DECLARE
v_session_id INTEGER := userenv(’sessionid’);
v_user_name VARCHAR2(30) := upper(‘&Enter_User_Name’);
BEGIN
–Note, can be executed only when you have apps password.
– Call the procedure to Creaet FND User
fnd_user_pkg.createuser(x_user_name => v_user_name
,x_owner => ”
,x_unencrypted_password => ‘oracle’
,x_session_number => v_session_id
,x_start_date => SYSDATE – 10
,x_end_date => SYSDATE + 100
,x_last_logon_date => SYSDATE – 10
,x_description => ‘www.notesbit.com’
,x_password_date => SYSDATE – 10
,x_password_accesses_left => 10000
,x_password_lifespan_accesses => 10000
,x_password_lifespan_days => 10000
,x_employee_id => 30 /*Change this id by running below SQL*/
/*

SELECT person_id
,full_name
FROM per_all_people_f
WHERE upper(full_name) LIKE ‘%’ ” upper(’full_name’) ” ‘%’
GROUP BY person_id
,full_name
*/

,x_email_address => ‘[email protected]


,x_fax => ”
,x_customer_id => ”
,x_supplier_id => ”);
fnd_user_pkg.addresp(username => v_user_name
,resp_app => ‘SYSADMIN’
,resp_key => ‘SYSTEM_ADMINISTRATOR’
,security_group => ‘STANDARD’
,description => ‘Auto Assignment’
,start_date => SYSDATE – 10
,end_date => SYSDATE + 1000);
END;
/
Following are the reference for the pl/sql package
begin
fnd_user_pkg.addresp(
‘&User_Name’, /*Application User Name */
‘&Responsablity_Application_Short_Name’, /*get from Query Below */

23
‘&Responsibility_Key’,/*get from Query Below */
‘&Security_Group’, /* Most of cases it is ‘STANDARD’ so you can hard code
it */
‘&Description’, /* Any comments you want */
‘&Start_Date’, /* Sysdate From Today */
‘&End_Date’ ); /* Sysdate + 365 Rights for Next One Year*/
commit;
dbms_output.put_line(‘Responsibility Added Successfully’);
exception
when others then
dbms_output.put_line(‘ Responsibility is not added due to ‘ ” SQLCODE
” substr(SQLERRM, 1, 100));
Rollback;
end;
/

24
MS DOS

SET COMMAND

SET EXP_OBJECT=/oracle/apps/icx/lov/webui/ReqSupplierLovRN

ECHO %EXP_OBJECT %
ECHO %CLASSPATH%

25
UNIX
How to check number of forms users at any time?

Forms Connections initiate f60webmx connections so you can use


ps -ef | grep f60webmx | wc -l

Find command

1) cd $JAVA_TOP/oracle/apps/pos
2) find . * -print -exec strings {} \; | grep Header >>
/home/murthyg/FileVersions.txt

find ./ -name “MPOPRPOP.rdf” -print


./bcm004/applmgr/PROD/modpo/1.0.0/reports/US/MPOPRPOP.rdf

strings -a POSREGWB.pls | grep '$Header'


strings -a POSSPMB.pls | grep '$Header'
strings -a POSSREGB.pls | grep '$Header'

narayam:ERP2:>strings -a $POS_TOP/patch/115/sql/POSREGWB.pls |grep


'$Header'

strings -a $POS_TOP/patch/115/sql/POSSREGB.pls |grep '$Header'

/* $Header: POSREGWB.pls 115.48.11510.9 2005/09/08 18:47:18 gdwivedi ship


$ */

narayam:ERP2:>strings -a $POS_TOP/patch/115/sql/POSSPMB.pls |grep


'$Header'

/* $Header: POSSPMB.pls 115.11.11510.2 2005/08/15 23:47:58 gdwivedi ship $


*/

narayam:ERP2:>strings -a $POS_TOP/patch/115/sql/POSSREGB.pls |grep


'$Header'

/*$Header: POSSREGB.pls 115.25.11510.4 2005/10/06 18:55:55 gdwivedi ship $


*/

26
TKPROF:
cmd
c:\
ftp DETUX4.AAM.NET
lcd
bi
get
put

ls -l *APPSPERF*

/m001/app/oracle/admin/ERP3/udump/cp erp3_ora_14582_APPSPERF.trc /home/murthyg

ERP3:/home/murthyg>tkprof erp3_ora_14205_MARYHESSTHYS.trc
erp3_ora_14205_MARYHESSTHYS.prof
TKPROF: Release 9.2.0.5.0 - Production on Mon Feb 25 08:53:26 2008
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

ERP3:/home/murthyg> ls
2266.tkp erp3_ora_2416_MARYHESSTHYS.trc
2266.trc erp3_ora_2633_MARYHESSTHYS.prof
SR7482.tkp erp3_ora_2633_MARYHESSTHYS.trc
debug.log murthyg.tkp
erp3_ora_14205_MARYHESSTHYS.prof murthyg.trc
erp3_ora_14205_MARYHESSTHYS.trc salman.tkp
erp3_ora_2416_MARYHESSTHYS.prof
ERP3:/home/murthyg>

27
PL/SQL Sample Codes

Update
update hr_all_organization_units
set date_to=To_date('11/22/2004','MM/DD/YYYY')
where organization_id=274

Purchasing
select * from po_headers_all where segment1='269679'
select * from mtl_system_items_b where segment1='A97L-0218-0239#320E-
201'

select * from PO_REQUISITIONS_INTERFACE_ALL where item_id=233951


and org_id=716
and KANBAN_CARD_ID=317966

select * from po_requisition_headers_all where requisition_header_id=8520240


select * from po_requisition_lines_all where item_id=233951
and source_type_code='INVENTORY'
and org_id=717

CREATE TABLE PO_REQUISITIONS_INTERFACE_N AS select * from


PO_REQUISITIONS_INTERFACE_ALL where Process_flag='IN PROCESS' AND ORG_ID=354
AND item_id IN (407817)

Insert Into PO_REQUISITIONS_INTERFACE_ALL Select * From PO_REQUISITIONS_INTERFACE_N

select * from PO_REQUISITIONS_INTERFACE_ALL where item_id=233951


and org_id=716
and KANBAN_CARD_ID=317966
select * from po_interface_errors where interface_TRANSACTION_ID in
(36770123,36770131,36770135)

select count(*) from po_lines_all where po_header_id=414774


and retroactive_date between (sysdate-6) and ( sysdate-1)

select * from po_headers_all where segment1='189155'


345689
select * from po_lines_all where po_header_id=345689 and line_num='31'
1328222
select * from po_releases_all where po_header_id=345689 and
release_num='240'

28
1121472
select * from po_line_locations_all where po_header_id=345689 and
PO_RELEASE_ID=1121472 and shipment_num='90'

Inventory

select * from mtl_kanban_cards where KANBAN_CARD_NUMBER='271981'

Internal requisition and Sales Orders:

select * from oe_order_headers_all where order_number=8390


select * from oe_order_lines_all where HEADER_ID=2912915
in table oe_order_lines_all, ORIG_SYS_DOCUMENT_REF is the requisition number.

select * from po_headers_all where segment1='189155'


345689
select * from po_lines_all where po_header_id=345689 and line_num='31'
1328222
select * from po_releases_all where po_header_id=345689 and
release_num='247'
1148966
select * from po_line_locations_all where po_header_id=345689 and
PO_RELEASE_ID=1148966 and shipment_num='1'

Organizational Queries:

BG
select * from hr_all_organization_units haou, hr_organization_information hoi
where haou.organization_id=hoi.organization_id
and org_information_context='Business Group Information'

LE
select * from hr_legal_entities where BUSINESS_GROUP_ID=202

OU
select * from hr_operating_units where BUSINESS_GROUP_ID=202

INV

29
select * from org_organization_definitions where BUSINESS_GROUP_ID=202

select * from MTL_ITEM_SUB_INVENTORIES_ALL_V where


INVENTORY_ITEM_ID=464911 and organization_id=679
select * from MTL_SECONDARY_INVENTORIES_FK_V where organization_id=679

select * from hr_all_organization_units haou, hr_organization_information hoi


where haou.organization_id=hoi.organization_id
--and haou.organization_id=204
and hoi.org_information1='HR_ORG'

Relation between Ledger , Legal entity, Operating Unit information in Oracle


Apps R12

Information can be retrieved from the table:


XLE_LE_OU_LEDGER_V

Query for Ledger, OU, Legal Enity, balancing segment:


SELECT hrl.country, hroutl_bg.NAME bg, hroutl_bg.organization_id,
lep.legal_entity_id, lep.NAME legal_entity,
hroutl_ou.NAME ou_name, hroutl_ou.organization_id org_id,
hrl.location_id,
hrl.location_code,
glev.FLEX_SEGMENT_VALUE
FROM xle_entity_profiles lep,
xle_registrations reg,
hr_locations_all hrl,
hz_parties hzp,
fnd_territories_vl ter,
hr_operating_units hro,
hr_all_organization_units_tl hroutl_bg,
hr_all_organization_units_tl hroutl_ou,
hr_organization_units gloperatingunitseo,
gl_legal_entities_bsvs glev
WHERE lep.transacting_entity_flag = 'Y'
AND lep.party_id = hzp.party_id
AND lep.legal_entity_id = reg.source_id
AND reg.source_table = 'XLE_ENTITY_PROFILES'
AND hrl.location_id = reg.location_id
AND reg.identifying_flag = 'Y'
AND ter.territory_code = hrl.country
AND lep.legal_entity_id = hro.default_legal_context_id
AND gloperatingunitseo.organization_id = hro.organization_id
AND hroutl_bg.organization_id = hro.business_group_id
AND hroutl_ou.organization_id = hro.organization_id
AND glev.legal_entity_id = lep.legal_entity_id

30
HRMS
Employee and User id :
select * from fnd_user where employee_id in (select person_id from per_people_f
where full_name ='BURNEY, LINDA C')
select * from per_people_f where PERSON_ID IN (select employee_id from
fnd_user WHERE USER_ID IN (69168384,25077))

SELECT * FROM PER_ALL_ASSIGNMENTS_F WHERE PERSON_ID=781


SELECT * FROM PER_ALL_PEOPLE_F WHERE PERSON_ID=781

To Know Scheduled concurrent programs


SELECT cr.request_id ,
fu.user_name requested_by ,
DECODE (cp.user_concurrent_program_name, 'Report Set', 'Report Set:'
|| cr.description, cp.user_concurrent_program_name )
user_concurrent_program_name ,
fr.responsibility_name ,
argument_text ,
cr.resubmit_interval ,
NVL2 (cr.resubmit_interval, 'PERIODICALLY', NVL2 (cr.release_class_id, 'ON
SPECIFIC DAYS', 'ONCE') ) schedule_type ,
DECODE (NVL2 (cr.resubmit_interval, 'PERIODICALLY', NVL2
(cr.release_class_id, 'ON SPECIFIC DAYS', 'ONCE') ), 'PERIODICALLY', 'EVERY '
|| cr.resubmit_interval
|| ' '
|| cr.resubmit_interval_unit_code
|| ' FROM '
|| cr.resubmit_interval_type_code
|| ' OF PREV RUN', 'ONCE', 'AT :'
|| TO_CHAR (cr.requested_start_date, 'DD-MON-RR HH24:MI'), 'EVERY: '
|| fcr.class_info ) SCHEDULE ,
requested_start_date ,
fcr.date1 from_date,
fcr.date2 to_date ,
fcr.class_info
FROM fnd_concurrent_programs_tl cp ,
fnd_concurrent_requests cr ,
fnd_user fu ,
fnd_conc_release_classes fcr ,
fnd_responsibility_vl fr
WHERE cp.application_id = cr.program_application_id
AND cp.concurrent_program_id = cr.concurrent_program_id
AND cr.requested_by = fu.user_id
AND cr.phase_code = 'P'
AND cr.requested_start_date > SYSDATE

31
AND cp.LANGUAGE = 'US'
AND fcr.release_class_id(+) = cr.release_class_id
AND fcr.application_id(+) = cr.release_class_app_id
AND fr.responsibility_id = cr.responsibility_id
AND cp.user_concurrent_program_name LIKE :user_concurrent_program_name
AND fu.user_name LIKE :user_name;

Receiving Tables

There are two (2) main tables associated with the Receiving Open Interface:
RCV_HEADERS_INTERFACE, which should contain one row per receipt number,
and RCV_TRANSACTIONS_INTERFACE, which may contain one or more
transactions per header.

How can you view the error messages, for any rows that failed to
import successfully?

There are a couple of methods that can be used to accomplish this:


1) Run the Receiving Interface Errors Report.
Navigation: Reports/Run
Select the Receiving Interface Errors Report
2) If the desire is to see the errors directly from the PO_INTERFACE_ERRORS
table (this is where any errors are written to), the following statements can be
executed in SQL*Plus using the APPS schema:

Select interface_type, a.interface_transaction_id, column_name, error_message,


processing_date from po_interface_errors a, rcv_headers_interface b where
a.interface_transaction_id = b.header_interface_id and processing_status_code
in ('ERROR','PRINT');

select * from RCV_TRANSACTIONS_INTERFACE


where INTERFACE_TRANSACTION_ID=20574875

32
Purchasing
Retroactive dates problem

Some companies buy items based on a tentative price initially, later a


negotiated price is reached to make payment.

select *
from po_line_locations_all
where po_header_id = 499199
and retroactive_date is not null

UPDATE po_line_locations_all
SET START_DATE='01-APR-2007'
WHERE PO_HEADER_ID=382685
AND LINE_lOCATION_ID iN (4926801,4926804,4926809,4926810,4926811) ;
commit;

Purchase Order information from General Ledger


Perform the following navigation in order to see the Purchase Order information
from General Ledger.

1. Go to the Navigation: General Ledger -> Inquiry


2. Mention the source as 'Cost Management' and Category as 'Receiving'
3. Click on find.
4. Journals that are raised against PO will be visible.
5. Open the appropriate Journal
6. Click on the 'Drill-down' tab in the right corner side.
7. This will open the Journal accounting entries in HTML page.
8. Select the appropriate Accounting entry and click on the 'View transaction'
9. We can see the transaction form, that containing Purchase Order number and
other details etc.

ASN Queries:-
select * from RCV_HEADERS_INTERFACE where shipment_num='48488'
select * from po_interface_errors where REQUEST_ID= 46527200(Requiest id for
con. Program Receiving Transaction Processor)
select * from RCV_SHIPMENT_HEADERS where SHIPMENT_HEADER_ID=823860
RCV_SHIPMENT_HEADERS/RCV_SHIPMENT_LINES
select * from po_interface_errors where interface_TRANSACTION_ID in
(36770123,36770131,36770135)

select * from po_interface_errors where request_id=49138113

33
select * from RCV_TRANSACTIONS_INTERFACE where
processing_request_id=49138113
and group_id=6371075

select * from RCV_SHIPMENT_HEADERS where SHIPMENT_NUM='6208-1-2007'

What happens when we submit ASN from portal.


submit Receiving Transaction Processor from purchasing super user
responsibility.
Table RCV_SHIPMENT_HEADERS gets populated.
ASN Status in portal changes to Expected.
Shipment is visible through the Manage shipments screen.
Upon receipt against ASN, ASN status in portal changes to FULLY RECEIVED.(no
program was run).

Supplier User Queries:


select * from fnd_user where user_name in ('[email protected]' ,
'[email protected]','AMANDA [email protected]');

select * from hz_parties where party_id=13730

select * from po_vendor_contacts where


--mail_stop like '%kennametal%'
vendor_site_id in (
select vendor_site_id from po_vendor_sites_all where vendor_id in(
select vendor_id from po_vendors where vendor_name='ROBIN INDUSTRIES INC'
))
select * from po_vendors
select * from POS_SUPPLIER_REGISTRATIONS

select DISTINCT duns_number from PO_VENDOR_SITES_ALL


select * from po_VENDOR_SITES

SELECT * FROM HZ_PARtIES

/* Formatted on 2007/12/06 22:15 (Formatter Plus v4.7.0) */


SELECT fndregistrationseo.registration_id,
fndregistrationseo.registration_key, fndregistrationseo.application_id,
fndregistrationseo.party_id, fndregistrationseo.registration_type,
fndregistrationseo.requested_user_name,

34
fndregistrationseo.assigned_user_name,
fndregistrationseo.registration_status,
fndregistrationseo.exists_in_fnd_user_flag,
fndregistrationseo.user_title, fndregistrationseo.first_name,
fndregistrationseo.middle_name, fndregistrationseo.last_name,
fndregistrationseo.email, fndregistrationseo.phone,
fndregistrationseo.phone_extension, fndregistrationseo.fax,
fndregistrationseo.language_code, fndregistrationseo.date_requested,
fndregistrationseo.last_update_date,
fndregistrationseo.last_updated_by, fndregistrationseo.created_by,
fndregistrationseo.creation_date, fndregistrationseo.last_update_login,
fndregdetsuppliername.registration_id AS registration_id1,
fndregdetsuppliername.application_id AS application_id1,
fndregdetsuppliername.registration_type AS registration_type1,
fndregdetsuppliername.field_name, fndregdetsuppliername.field_type,
fndregdetsuppliername.field_format,
fndregdetsuppliername.field_value_string,
fndregdetsuppliername.field_value_number,
fndregdetsuppliername.field_value_date,
fndregdetsuppliername.last_update_date AS last_update_date1,
fndregdetsuppliername.last_updated_by AS last_updated_by1,
fndregdetsuppliername.created_by AS created_by1,
fndregdetsuppliername.creation_date AS creation_date1,
fndregdetsuppliername.last_update_login AS last_update_login1,
fndregdetsuppliernum.registration_id AS registration_id2,
fndregdetsuppliernum.application_id AS application_id2,
fndregdetsuppliernum.registration_type AS registration_type2,
fndregdetsuppliernum.field_name AS field_name1,
fndregdetsuppliernum.field_type AS field_type1,
fndregdetsuppliernum.field_format AS field_format1,
fndregdetsuppliernum.field_value_string AS field_value_string1,
fndregdetsuppliernum.field_value_number AS field_value_number1,
fndregdetsuppliernum.field_value_date AS field_value_date1,
fndregdetsuppliernum.last_update_date AS last_update_date2,
fndregdetsuppliernum.last_updated_by AS last_updated_by2,
fndregdetsuppliernum.created_by AS created_by2,
fndregdetsuppliernum.creation_date AS creation_date2,
fndregdetsuppliernum.last_update_login AS last_update_login2,
fndregdetsourcing.registration_id AS registration_id3,
fndregdetsourcing.application_id AS application_id3,
fndregdetsourcing.registration_type AS registration_type3,
fndregdetsourcing.field_name AS field_name2,
fndregdetsourcing.field_type AS field_type2,
fndregdetsourcing.field_format AS field_format2,
fndregdetsourcing.field_value_string AS field_value_string2,
fndregdetsourcing.field_value_number AS field_value_number2,
fndregdetsourcing.field_value_date AS field_value_date2,

35
fndregdetsourcing.last_update_date AS last_update_date3,
fndregdetsourcing.last_updated_by AS last_updated_by3,
fndregdetsourcing.created_by AS created_by3,
fndregdetsourcing.creation_date AS creation_date3,
fndregdetsourcing.last_update_login AS last_update_login3,
fndregdetisp.registration_id AS registration_id4,
fndregdetisp.application_id AS application_id4,
fndregdetisp.registration_type AS registration_type4,
fndregdetisp.field_name AS field_name3,
fndregdetisp.field_type AS field_type3,
fndregdetisp.field_format AS field_format3,
fndregdetisp.field_value_string AS field_value_string3,
fndregdetisp.field_value_number AS field_value_number3,
fndregdetisp.field_value_date AS field_value_date3,
fndregdetisp.last_update_date AS last_update_date4,
fndregdetisp.last_updated_by AS last_updated_by4,
fndregdetisp.created_by AS created_by4,
fndregdetisp.creation_date AS creation_date4,
fndregdetisp.last_update_login AS last_update_login4,
fndregdetjobtitle.registration_id AS registration_id5,
fndregdetjobtitle.application_id AS application_id5,
fndregdetjobtitle.registration_type AS registration_type5,
fndregdetjobtitle.field_name AS field_name4,
fndregdetjobtitle.field_type AS field_type4,
fndregdetjobtitle.field_format AS field_format4,
fndregdetjobtitle.field_value_string AS field_value_string4,
fndregdetjobtitle.field_value_number AS field_value_number4,
fndregdetjobtitle.field_value_date AS field_value_date4,
fndregdetjobtitle.last_update_date AS last_update_date5,
fndregdetjobtitle.last_updated_by AS last_updated_by5,
fndregdetjobtitle.created_by AS created_by5,
fndregdetjobtitle.creation_date AS creation_date5,
fndregdetjobtitle.last_update_login AS last_update_login5,
fndregdetnote.registration_id AS registration_id6,
fndregdetnote.application_id AS application_id6,
fndregdetnote.registration_type AS registration_type6,
fndregdetnote.field_name AS field_name5,
fndregdetnote.field_type AS field_type5,
fndregdetnote.field_format AS field_format5,
fndregdetnote.field_value_string AS field_value_string5,
fndregdetnote.field_value_number AS field_value_number5,
fndregdetnote.field_value_date AS field_value_date5,
fndregdetnote.last_update_date AS last_update_date6,
fndregdetnote.last_updated_by AS last_updated_by6,
fndregdetnote.created_by AS created_by6,
fndregdetnote.creation_date AS creation_date6,
fndregdetnote.last_update_login AS last_update_login6,

36
fndregdetuseraccess.registration_id AS registration_id7,
fndregdetuseraccess.application_id AS application_id7,
fndregdetuseraccess.registration_type AS registration_type7,
fndregdetuseraccess.field_name AS field_name6,
fndregdetuseraccess.field_type AS field_type6,
fndregdetuseraccess.field_format AS field_format6,
fndregdetuseraccess.field_value_string AS field_value_string6,
fndregdetuseraccess.field_value_number AS field_value_number6,
fndregdetuseraccess.field_value_date AS field_value_date6,
fndregdetuseraccess.last_update_date AS last_update_date7,
fndregdetuseraccess.last_updated_by AS last_updated_by7,
fndregdetuseraccess.created_by AS created_by7,
fndregdetuseraccess.creation_date AS creation_date7,
fndregdetuseraccess.last_update_login AS last_update_login7,
fndregdetrestrictaccess.registration_id AS registration_id8,
fndregdetrestrictaccess.application_id AS application_id8,
fndregdetrestrictaccess.registration_type AS registration_type8,
fndregdetrestrictaccess.field_name AS field_name7,
fndregdetrestrictaccess.field_type AS field_type7,
fndregdetrestrictaccess.field_format AS field_format7,
fndregdetrestrictaccess.field_value_string AS field_value_string7,
fndregdetrestrictaccess.field_value_number AS field_value_number7,
fndregdetrestrictaccess.field_value_date AS field_value_date7,
fndregdetrestrictaccess.last_update_date AS last_update_date8,
fndregdetrestrictaccess.last_updated_by AS last_updated_by8,
fndregdetrestrictaccess.created_by AS created_by8,
fndregdetrestrictaccess.creation_date AS creation_date8,
fndregdetrestrictaccess.last_update_login AS last_update_login8,
fndregdetapproverid.registration_id AS registration_id9,
fndregdetapproverid.application_id AS application_id9,
fndregdetapproverid.registration_type AS registration_type9,
fndregdetapproverid.field_name AS field_name8,
fndregdetapproverid.field_type AS field_type8,
fndregdetapproverid.field_format AS field_format8,
fndregdetapproverid.field_value_string AS field_value_string8,
fndregdetapproverid.field_value_number AS field_value_number8,
fndregdetapproverid.field_value_date AS field_value_date8,
fndregdetapproverid.last_update_date AS last_update_date9,
fndregdetapproverid.last_updated_by AS last_updated_by9,
fndregdetapproverid.created_by AS created_by9,
fndregdetapproverid.creation_date AS creation_date9,
fndregdetapproverid.last_update_login AS last_update_login9,
fndregdetinvitedflag.registration_id AS registration_id10,
fndregdetinvitedflag.application_id AS application_id10,
fndregdetinvitedflag.registration_type AS registration_type10,
fndregdetinvitedflag.field_name AS field_name9,
fndregdetinvitedflag.field_type AS field_type9,

37
fndregdetinvitedflag.field_format AS field_format9,
fndregdetinvitedflag.field_value_string AS field_value_string9,
fndregdetinvitedflag.field_value_number AS field_value_number9,
fndregdetinvitedflag.field_value_date AS field_value_date9,
fndregdetinvitedflag.last_update_date AS last_update_date10,
fndregdetinvitedflag.last_updated_by AS last_updated_by10,
fndregdetinvitedflag.created_by AS created_by10,
fndregdetinvitedflag.creation_date AS creation_date10,
fndregdetinvitedflag.last_update_login AS last_update_login10,
fndregadvplanner.registration_id AS registration_id11,
fndregadvplanner.application_id AS application_id11,
fndregadvplanner.registration_type AS registration_type11,
fndregadvplanner.field_name AS field_name10,
fndregadvplanner.field_type AS field_type10,
fndregadvplanner.field_format AS field_format10,
fndregadvplanner.field_value_string AS field_value_string10,
fndregadvplanner.last_update_date AS last_update_date11,
fndregadvplanner.last_updated_by AS last_updated_by11,
fndregadvplanner.created_by AS created_by11,
fndregadvplanner.creation_date AS creation_date11,
fndregadvplanner.last_update_login AS last_update_login11,
osntpname.field_value_string AS osn_tp_name,
osnehubid.field_value_number AS osn_ehub_id,
osnrequestid.field_value_number AS osn_request_id,
osnrequestinternalid.field_value_number AS osn_request_internalid
FROM fnd_registrations fndregistrationseo,
fnd_registration_details fndregdetsuppliername,
fnd_registration_details fndregdetsuppliernum,
fnd_registration_details fndregdetsourcing,
fnd_registration_details fndregdetisp,
fnd_registration_details fndregdetjobtitle,
fnd_registration_details fndregdetnote,
fnd_registration_details fndregdetuseraccess,
fnd_registration_details fndregdetrestrictaccess,
fnd_registration_details fndregdetapproverid,
fnd_registration_details fndregdetinvitedflag,
fnd_registration_details fndregadvplanner,
fnd_registration_details osntpname,
fnd_registration_details osnehubid,
fnd_registration_details osnrequestid,
fnd_registration_details osnrequestinternalid
WHERE ( ( ( ( ( ( ( ( ( ( (fndregistrationseo.registration_id =
fndregdetsuppliername.registration_id
)
AND (fndregistrationseo.application_id =
fndregdetsuppliername.application_id
)

38
)
AND (fndregistrationseo.registration_type =
fndregdetsuppliername.registration_type
)
)
AND ( ( (fndregdetsuppliername.registration_id =
fndregdetsuppliernum.registration_id
)
AND (fndregdetsuppliername.application_id =
fndregdetsuppliernum.application_id
)
)
AND (fndregdetsuppliername.registration_type =
fndregdetsuppliernum.registration_type
)
)
)
AND ( ( (fndregdetsuppliernum.registration_id =
fndregdetsourcing.registration_id
)
AND (fndregdetsuppliernum.application_id =
fndregdetsourcing.application_id
)
)
AND (fndregdetsuppliernum.registration_type =
fndregdetsourcing.registration_type
)
)
)
AND ( ( (fndregdetsourcing.registration_id =
fndregdetisp.registration_id
)
AND (fndregdetsourcing.application_id =
fndregdetisp.application_id
)
)
AND (fndregdetsourcing.registration_type =
fndregdetisp.registration_type
)
)
)
AND ( ( (fndregdetisp.registration_id =
fndregdetjobtitle.registration_id
)
AND (fndregdetisp.application_id =
fndregdetjobtitle.application_id
)

39
)
AND (fndregdetisp.registration_type =
fndregdetjobtitle.registration_type
)
)
)
AND ( ( (fndregdetjobtitle.registration_id =
fndregdetnote.registration_id
)
AND (fndregdetjobtitle.application_id =
fndregdetnote.application_id
)
)
AND (fndregdetjobtitle.registration_type =
fndregdetnote.registration_type
)
)
)
AND ( ( (fndregdetnote.registration_id =
fndregdetuseraccess.registration_id
)
AND (fndregdetnote.application_id =
fndregdetuseraccess.application_id
)
)
AND (fndregdetnote.registration_type =
fndregdetuseraccess.registration_type
)
)
)
AND ( ( (fndregdetuseraccess.registration_id =
fndregdetrestrictaccess.registration_id
)
AND (fndregdetuseraccess.application_id =
fndregdetrestrictaccess.application_id
)
)
AND (fndregdetuseraccess.registration_type =
fndregdetrestrictaccess.registration_type
)
)
)
AND ( ( (fndregdetrestrictaccess.registration_id =
fndregdetapproverid.registration_id
)
AND (fndregdetrestrictaccess.application_id =
fndregdetapproverid.application_id

40
)
)
AND (fndregdetrestrictaccess.registration_type =
fndregdetapproverid.registration_type
)
)
)
AND ( ( (fndregdetapproverid.registration_id =
fndregdetinvitedflag.registration_id
)
AND (fndregdetapproverid.application_id =
fndregdetinvitedflag.application_id
)
)
AND (fndregdetapproverid.registration_type =
fndregdetinvitedflag.registration_type
)
)
AND ( fndregadvplanner.registration_id(+) =
fndregistrationseo.registration_id
AND fndregadvplanner.application_id(+) =
fndregistrationseo.application_id
AND fndregadvplanner.registration_type(+) =
fndregistrationseo.registration_type
)
AND ( osntpname.registration_id(+) = fndregistrationseo.registration_id
AND osntpname.application_id(+) = fndregistrationseo.application_id
AND osntpname.registration_type(+) =
fndregistrationseo.registration_type
)
AND ( osnehubid.registration_id(+) = fndregistrationseo.registration_id
AND osnehubid.application_id(+) = fndregistrationseo.application_id
AND osnehubid.registration_type(+) =
fndregistrationseo.registration_type
)
AND ( osnrequestid.registration_id(+) =
fndregistrationseo.registration_id
AND osnrequestid.application_id(+) = fndregistrationseo.application_id
AND osnrequestid.registration_type(+) =
fndregistrationseo.registration_type
)
AND ( osnrequestinternalid.registration_id(+) =
fndregistrationseo.registration_id
AND osnrequestinternalid.application_id(+) =
fndregistrationseo.application_id
AND osnrequestinternalid.registration_type(+) =
fndregistrationseo.registration_type

41
)
AND fndregistrationseo.application_id = 177
AND fndregdetsuppliername.field_name = 'Supplier Name'
AND fndregdetsuppliernum.field_name = 'Supplier Number'
AND fndregdetsourcing.field_name = 'Sourcing'
AND fndregdetisp.field_name = 'ISP'
AND fndregdetjobtitle.field_name = 'Job Title'
AND fndregdetnote.field_name = 'Note'
AND fndregdetuseraccess.field_name = 'User Access'
AND fndregdetrestrictaccess.field_name = 'Restrict Access'
AND fndregdetapproverid.field_name = 'Approver ID'
AND fndregdetinvitedflag.field_name = 'Invited Flag'
AND fndregadvplanner.field_name(+) = 'CollaborativePlanning'
AND osntpname.field_name(+) = 'OSN TP Name'
AND osnehubid.field_name(+) = 'OSN EHub ID'
AND osnrequestid.field_name(+) = 'OSN Request ID'
AND osnrequestinternalid.field_name(+) = 'OSN Request InternalID'
--and Upper(REQUESTED_USER_NAME)='[email protected]'
-- and Upper(EMAIL)='[email protected]'
and Upper( fndregdetsuppliername.field_value_string)='PTI ASSEMBLY AND
MACHINING LLC'

Creating and dropping indexes


alter session set ddl_lock_timeout = 1000000; -- WHEN DROP FAILS, USE THIS.

drop index GMD.GMD_PARAMETERS_DTL_N1

CREATE INDEX GMD.GMD_PARAMETERS_DTL_N1 ON


GMD.GMD_PARAMETERS_DTL (PARAMETER_NAME ASC, PARAMETER_VALUE ASC,
PARAMETER_TYPE ASC)
LOGGING
TABLESPACE APPS_TS_TX_IDX
PCTFREE 10
INITRANS 11
STORAGE
(
INITIAL 131072
NEXT 131072
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
)
NOPARALLEL

42
ENGLISH
please let me know for any issues.

Hope this explains, if not we can have a chat later.


Please accept my sincere apologies for this late cancellation.

Apologies to any inconvenience. Many thanks,

Theses workshops were conducted with the objective of proving that a Project
Trial Balance can be generated without using a Project Segment in the COA.
********************
This has been a week full of great memories and emotions as I began transitioning and packing. As most of
you
know, this is my last week at AAM and EDS. I have taken the Early Retirement Offer, and will be moving on.
I sincerely appreciate all the support you have provided me over the years and the hard work which has made
all
of us successful. It has been a pleasure working with each and every one of you.
I will treasure the memories I have from working here during the last ten years. Keep up the good work and
enjoy
being part of a great Team!
Keep me in mind for any future AAM/ERP reunions.
My personal e-mail address is ……………. for future reference.

*******************

Security notes
Basingstoke notes

$ cd ../..
$ ls
admin dbab2i dbab8i interface misc ood_repository root sys
autofs dbab3i dev lib mnt opt sbin tmp
bin dbab6i etc lib64 oem proc selinux usr
boot dbab7i home media ohsadmin ptsadmin srv var
$ pbrun impanalyst password-manager dbab3i

CREATE
OR REPLACE PACKAGE get_pwd AS FUNCTION decrypt ( KEY IN VARCHAR2 ,VALUE IN
VARCHAR2 ) RETURN VARCHAR2;
END get_pwd;

CREATE OR REPLACE
PACKAGE BODY get_pwd
AS
FUNCTION decrypt(
KEY IN VARCHAR2 ,
VALUE IN VARCHAR2 )
RETURN VARCHAR2

43
AS
LANGUAGE JAVA NAME
'oracle.apps.fnd.security.WebSessionManagerProc.decrypt(java.lang.String,j
ava.lang.String) return java.lang.String';
END get_pwd;
/
SELECT
(SELECT get_pwd.decrypt (UPPER (
(SELECT fnd_vault.get('FND', 'GUEST_USER_PWD') FROM dual
)), usertable.encrypted_foundation_password)
FROM DUAL
) AS apps_password
FROM fnd_user usertable
WHERE usertable.user_name LIKE UPPER (
(SELECT SUBSTR (fnd_vault.get('FND', 'GUEST_USER_PWD') ,1 , INSTR
(fnd_vault.get('FND', 'GUEST_USER_PWD'), '/') - 1 )
FROM DUAL
))

SELECT usertable.user_name ,
(SELECT get_pwd.decrypt (UPPER (
(SELECT
(SELECT get_pwd.decrypt (UPPER (
(SELECT UPPER (fnd_vault.get('FND', 'GUEST_USER_PWD')) FROM DUAL
)), usertable.encrypted_foundation_password)
FROM DUAL
) AS apps_password
FROM fnd_user usertable
WHERE usertable.user_name LIKE UPPER (
(SELECT SUBSTR (fnd_vault.get('FND', 'GUEST_USER_PWD') ,1 , INSTR
(fnd_vault.get('FND', 'GUEST_USER_PWD'), '/') - 1 )
FROM DUAL
))
)) ,usertable.encrypted_user_password)
FROM DUAL
) AS encrypted_user_password
FROM fnd_user usertable
WHERE usertable.user_name LIKE UPPER ('BSTSKUMAR')

44
Create Custom Top
HOW TO INTEGRATE APPLICATIONS RELEASE R12 WITH CUSTOM
APPLICATIONS

SCHEMA NAME : XXERP


TOP NAME : XXERP_TOP
Application : XXERP Custom Application
Data Group : Standard
Request Group : XXERP Request Group
Menu : XXERP_CUSTOM_MENU
Responsibility : XXERP Custom

Assumptions:
APPL_TOP: /d01/oracle/PROD/apps/apps_st/appl
Instance Name: PROD
Server Name: linux7

1) Make the directory structure for your custom application files.


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

((((((((((((((((
login as: applvis12
[email protected]'s password:
Last login: Mon Jan 9 22:08:33 2012 from 172.29.18.0
[applvis12@R01 ~]$ cd $APPL_TOP
[applvis12@R01 appl]$ pwd
/u01/applvis12/apps/apps_st/appl
[applvis12@R01 appl]$ mkdir XXERP
mkdir XXERP/12.0.0
mkdir XXERP/12.0.0/admin
mkdir XXERP/12.0.0/admin/sql
mkdir XXERP/12.0.0/admin/odf

45
mkdir XXERP/12.0.0/sql
mkdir XXERP/12.0.0/bin
mkdir XXERP/12.0.0/reports
mkdir XXERP/12.0.0/reports/US
mkdir XXERP/12.0.0/forms
mkdir XXERP/12.0.0/forms/US
mkdir XXERP/12.0.0/lib
mkdir XXERP/12.0.0/out
mkdir XXERP/12.0.0/log
[applvis12@R01 appl]$ mkdir XXERP/12.0.0
[applvis12@R01 appl]$ mkdir XXERP/12.0.0/admin
[applvis12@R01 appl]$ mkdir XXERP/12.0.0/admin/sql
[applvis12@R01 appl]$ mkdir XXERP/12.0.0/admin/odf
[applvis12@R01 appl]$ mkdir XXERP/12.0.0/sql
[applvis12@R01 appl]$ mkdir XXERP/12.0.0/bin
[applvis12@R01 appl]$ mkdir XXERP/12.0.0/reports
[applvis12@R01 appl]$ mkdir XXERP/12.0.0/reports/US
[applvis12@R01 appl]$ mkdir XXERP/12.0.0/forms
[applvis12@R01 appl]$ mkdir XXERP/12.0.0/forms/US
[applvis12@R01 appl]$ mkdir XXERP/12.0.0/lib
[applvis12@R01 appl]$ mkdir XXERP/12.0.0/out
[applvis12@R01 appl]$ mkdir XXERP/12.0.0/log
[applvis12@R01 appl]$ ls
ad ax cse ebi gl icx itg oke pos wms
admin az csf ec gma ieb izu oki pqh wps
ahl ben csi ecx gmd iec ja okl pqp wsh
ak bic csl edr gme iem je oks prp wsm
alr bil csm ego gmf ieo jg okx psa xdo
ame bim csp eng gmi ies jl ont psb xdp
ams bis csr eni gml ieu jmf opi psp xla
amv biv cua fa gmo iex jtf ota pv xle
amw bix cuf fem gmp igc jtm ozf qa xnb
ap bne cug ff gms igf lns pa qot xnp
APPSVISR12_r01.env bom cui fii gr igi mfg pay qp xtr
ar bsc cup flm hri igs mrp per qpr XXERP
as cct cus fnd hxc igw msc pft qrm zpb
asf ce cz fpa hxt imc msd pji rg zx
asg chv ddd frm ia inl mso pjm rlm
asl cln ddr fte ibc inv msr pmi rrs
asn cn dna ftp ibe ipa mst pn sht
aso crp dom fun ibp ipm mth po ssp
asp cs dpp fv ibu irc mwa poa vea
ast csc dt gcs ibw isc oe pom VISR12_r01.env
au csd eam ghr iby ita okc pon wip
[applvis12@R01 appl]$ cd XXERP
[applvis12@R01 XXERP]$ LS
-bash: LS: command not found
[applvis12@R01 XXERP]$ ls
12.0.0
[applvis12@R01 XXERP]$ cd 12.0.0
[applvis12@R01 12.0.0]$ ls

46
admin bin forms lib log out reports sql
[applvis12@R01 12.0.0]$ cd admin
[applvis12@R01 admin]$ ls
odf sql
[applvis12@R01 admin]$ cd ..
[applvis12@R01 12.0.0]$ cd reports
[applvis12@R01 reports]$ ls
US
[applvis12@R01 reports]$ cd .
[applvis12@R01 reports]$ cd forms
-bash: cd: forms: No such file or directory
[applvis12@R01 reports]$ ls
US
[applvis12@R01 reports]$ cd ..
[applvis12@R01 12.0.0]$ ls
admin bin forms lib log out reports sql
[applvis12@R01 12.0.0]$ cd reports
[applvis12@R01 reports]$ ls
US
[applvis12@R01 reports]$ cd US
[applvis12@R01 US]$ ls
[applvis12@R01 US]$ pwd
/u01/applvis12/apps/apps_st/appl/XXERP/12.0.0/reports/US
))))))))))))))))

2) Add the custom module into the environment

cd $APPL_TOP
echo "XXERP_TOP=/d01/oracle/PROD/apps/apps_st/appl/XXERP/12.0.0"
>customPROD_linux7.env
echo "export XXERP_TOP " >> customPROD_linux7.env
((((((((((((((((((
echo "XXERP_TOP=/u01/applvis12/apps/apps_st/appl/XXERP/12.0.0" >customPROD_linux7.env

This creates customPROD_linux7.env

echo "export XXERP_TOP " >> customPROD_linux7.env

))))))))))))))))))

Source the environment file


(/d01/oracle/PROD/apps/apps_st/appl/APPSPROD_linux7.env )
((((((((((((((
/u01/applvis12/apps/apps_st/appl/ customPROD_linux7.env
))))))))))))))

Make entry to the application context file


vi $INST_TOP/appl/admin/PROD_linux7.xml
<AU_TOP oa_var="s_autop" oa_type="PROD_TOP"
oa_enabled="FALSE">/d01/oracle/PROD/apps/apps_st/appl/au/12.0.0</AU_TOP>

47
<XXERP_TOP oa_var="s_xxerptop" oa_type="PROD_TOP"
oa_enabled="FALSE">/u01/applvis12/apps/apps_st/appl/XXERP/12.0.0</XXERP_TOP>
(((((((((((((((((
$ cd $INST_TOP/appl/admin
$ ls
adovars_VISR12_r01.env ojspCompile.properties
oamextensions.xml txk_system_jazn_data_credentials.xml
ojspCompile.conf VISR12_r01.xml

vi VISR12_r01.xml

<XXERP_TOP oa_var = "s_xxerptop" oa_type="PROD_TOP" oa_enabled = "FALSE">


/u01/applvis12/apps/apps_st/appl/XXERP/12.0.0
</XXERP_TOP>

AD_TOP oa_var="s_adtop" oa_type="PROD_TOP"


oa_enabled="TRUE">/u01/applvis12/apps/apps_st/appl/ad/12.0.0</AD_TOP>
<AK_TOP oa_var="s_aktop" oa_type="PROD_TOP"
oa_enabled="FALSE">/u01/applvis12/apps/apps_st/appl/ak/12.0.0</AK_TOP>
<AU_TOP oa_var="s_autop" oa_type="PROD_TOP"
oa_enabled="FALSE">/u01/applvis12/apps/apps_st/appl/au/12.0.0</AU_TOP>
<XXERP_TOP oa_var="s_xxerptop"
oa_type="PROD_TOP"oa_enabled="FALSE">/u01/applvis12/apps/apps_st/appl/XXERP/12.0.0</
XXERP_TOP>
<FND_TOP oa_var="s_fndtop" oa_type="PROD_TOP"
oa_enabled="TRUE">/u01/applvis12/apps/apps_st/appl/fnd/12.0.0</FND_TOP>

)))))))))))))))))

cd $INST_TOP/admin/install
sh adgentopfile.sh

((((((((((((((((((((((((((((((((((
Could not locate adgentopfil.sh. so run adaautocfg.sh
[applvis12@R01 scripts]$ pwd
/u01/applvis12/inst/apps/VISR12_r01/admin/scripts
[applvis12@R01 scripts]$ ls
adalnctl.sh adcmctl.sh adformsctl.sh adoafmctl.sh adstpall.sh ieo
L5799425.log msc
adapcctl.sh adexecsql.pl adformsrvctl.sh adopmnctl.sh adstrtal.sh java.sh
L5799426.log mwactl.sh
adautocfg.sh adforms-c4wsctl.sh adoacorectl.sh adpreclone.pl gsmstart.sh
jtffmctl.sh L5799433.log mwactlwrpr.sh

[applvis12@R01 scripts]$ adautocfg.sh


Enter the APPS user password:

The log file for this session is located at:


/u01/applvis12/inst/apps/VISR12_r01/admin/log/01110059/adconfig.log

48
AutoConfig is configuring the Applications environment...

AutoConfig will consider the custom templates if present.


Using CONFIG_HOME location : /u01/applvis12/inst/apps/VISR12_r01
Classpath :
/u01/applvis12/apps/apps_st/comn/java/lib/appsborg2.zip:/u01/applvis12/apps/apps_st/
comn/java/classes

Using Context file :


/u01/applvis12/inst/apps/VISR12_r01/appl/admin/VISR12_r01.xml

Context Value Management will now update the Context file

Updating Context file...COMPLETED

Attempting upload of Context file and templates to database...COMPLETED

Configuring templates from all of the product tops...


Configuring AD_TOP........COMPLETED
Configuring FND_TOP.......COMPLETED
Configuring ICX_TOP.......COMPLETED
Configuring MSC_TOP.......COMPLETED
Configuring IEO_TOP.......COMPLETED
Configuring BIS_TOP.......COMPLETED
Configuring AMS_TOP.......COMPLETED
Configuring CCT_TOP.......COMPLETED
Configuring WSH_TOP.......COMPLETED
Configuring CLN_TOP.......COMPLETED
Configuring OKE_TOP.......COMPLETED
Configuring OKL_TOP.......COMPLETED
Configuring OKS_TOP.......COMPLETED
Configuring CSF_TOP.......COMPLETED
Configuring IGS_TOP.......COMPLETED
Configuring IBY_TOP.......COMPLETED
Configuring JTF_TOP.......COMPLETED
Configuring MWA_TOP.......COMPLETED
Configuring CN_TOP........COMPLETED
Configuring CSI_TOP.......COMPLETED
Configuring WIP_TOP.......COMPLETED
Configuring CSE_TOP.......COMPLETED
Configuring EAM_TOP.......COMPLETED
Configuring FTE_TOP.......COMPLETED
Configuring ONT_TOP.......COMPLETED
Configuring AR_TOP........COMPLETED
Configuring AHL_TOP.......COMPLETED
Configuring OZF_TOP.......COMPLETED
Configuring IES_TOP.......COMPLETED
Configuring CSD_TOP.......COMPLETED
Configuring IGC_TOP.......COMPLETED

AutoConfig completed successfully.

49
[applvis12@R01 scripts]$

))))))))))))))))))))))))))

3) create tablespace XXERP datafile


'/d01/oracle/PROD/db/apps_st/data/XXERP01.dbf'
size 500M

(((((((((((((((((
select * from dba_data_files

Connect system/manager,
create tablespace XXERP datafile '/u01/oravis12/db/apps_st/data/XXERP01.dbf' size
500M;

tablespace created.
)))))))))))))))))

4) create user XXERP identified by XXERP


default tablespace XXERP
temporary tablespace temp
quota unlimited on XXERP;
grant connect, resource to XXERP;

((((((((((((((((
In toad, databaseadministertablespace, you can see temp1 tablespace with
file type as temp file.

CREATE USER xxerp IDENTIFIED BY xxerp


DEFAULT TABLESPACE xxerp
TEMPORARY TABLESPACE temp1
QUOTA UNLIMITED ON xxerp;

GRANT CONNECT, RESOURCE TO xxerp;


))))))))))))))))

5) Register your Oracle Schema.


Login to Applications with System Administrator responsibility
Navigate to Application-->Register
Application = XXERP Custom Application
Short Name = XXERP
Basepath = XXERP_TOP
Description = XXERP Custom Application

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

7) Add Application to a Data Group


Navigate to Security-->Oracle-->DataGroup

51
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 = XXERP Request Group
Application = XXERP Custom
Code = XXERP
Description = XXERP Custom Requests
We will not define any requests to add to the group at this stage, but you can
add some
now if required.

52
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). We will create two
menus, one
for Core Applications and one for Self Service.
Navigate to Application-->Menu
Menu = XXERP_CUSTOM_MENU
User Menu Name = XXERP Custom Application
Menu Type =
Description = XXERP 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

53
10) Create new responsibility. Navigate to Security-->Responsibility-->Define
Responsibility Name = XXERP Custom
Application = XXERP Custom
Responsibility Key = XXERPCUSTOM
Description = XXERP Custom Responsibility
Available From = Oracle Applications
Data Group Name = XXERPGroup
Data Group Application = XXERP Custom
Menu = XXERP Custom Application
Request Group Name = XXERP Request Group

54
11) Add responsibility to user
Navigate to Security-->User-->Define
Add XXERP 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 XXERP_TOP directory appropriate for the type
of
object.
For example forms would be located in $XXERP_TOP/forms/US or package
source code in $XXERP_TOP/admin/sql for example.

Database Objects, such as tables, indexes and sequences should be created in


the XXERP
schema, and then you need to
a) Grant all privilege from each custom data object to the APPS schema.
For example : logged in as XXERP user
grant all privileges on myTable to apps;
b) Create a synonym in APPS for each custom data object

(((((((((((((((((((
Connect XXERP/XXERP@visr12

create table devaraj (name varchar2(30));

55
table created.

grant all privileges on devaraj to apps;


grant succeeded

connect as apps
select * from xxerp.devaraj
no rows selected
))))))))))))))))))))

For example : logged in as APPS user


create synonym myTable for XXERP.myTable;
(((((((((((((((((((
create synonym devaraj for XXERP.devaraj;
synonym created

select * from devaraj


no rows selected

)))))))))))))))))))

13) Login to sysadmin, Application Developer Responsibility


In the backend compile your form
su - applmgr
cd $AU_TOP/forms/US
cp TEMPLATE.fmb DEMO.fmb
frmcmp_batch module=DEMO.fmb userid=apps/apps output_file=
/d01/oracle/PROD/apps/apps_st/appl/XXERP/12.0.0/forms/US/DEMO.fmx
compile_all=special batch=yes
Application > Form (Register the form)

56
Application > Function (Add the form to a function)

57
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.
(((((((((((((((
[applvis12@R01 scripts]$ cd $APPL_TOP/admin
[applvis12@R01 admin]$ pwd

58
/u01/applvis12/apps/apps_st/appl/admin
[applvis12@R01 admin]$ ls
adaiplnc.txt addb1020.sql adjborg2.txt admrctrg.txt adstats.sql applCS.txt applIW.txt applRU.txt
applZHT.txt
adalldefaults.txt addb1110_nt.sql adjborg_nt.txt admsc1010_nt.sql adsy1010_nt.sql appldemo.txt applJA.txt
applSF.txt cplex
adaprb.pls addb1110.sql adjborg.txt admsc1010.sql adsy1010.sql applDK.txt applKO.txt applSK.txt
file.drv
adaprs.pls adddlb.pls adjv1010_nt.sql admsc1020_nt.sql adsy1020_nt.sql applD.txt applLT.txt applSL.txt
javaVersionfile
adcert.txt adddls.pls adjv1010.sql admsc1020.sql adsy1020.sql applEL.txt applNL.txt applSQ.txt
log
adclutlb.pls addrpmrc.sql adjv1020_nt.sql admsc1110_nt.sql adsy1110_nt.sql applESA.txt applN.txt applS.txt
out
adclutls.pls adgrants_nt.sql adjv1020.sql admsc1110.sql adsy1110.sql applE.txt applora.txt applterr.txt
Preinstall_Codelevel_AD.txt
adcmpb.pls adgrants.sql adjv1110_nt.sql adovars.env adsysapp2.lst applFRC.txt applorau.txt applTH.txt
Preinstall_Codelevel_MP.txt
adcmps.pls adinstb.pls adjv1110.sql adpcpspb.pls adsysapp2.sql applF.txt applPL.txt appltop.cer
restart
adconfig.txt adinsts.pls adkeystore.dat adpcpsps.pls adsysapp.sql applHR.txt applprod.tmp applTR.txt
topfile.txt
adcstprd.txt adinvspb.pls adlinkbk.txt adplsexp.txt aducrsex.txt applHU.txt applprod.txt applUK.txt
VISR12
addb1010_nt.sql adinvsps.pls admdsys.sql adpltfrm.txt adUtilMapNew.txt applIN.txt applPTB.txt applUS.txt
VISR12_r01
addb1010.sql adjareas.txt admlsb.pls adprepdb.sql adUtilMap.txt applIS.txt applPT.txt applVN.txt
addb1020_nt.sql adjborg2_nt.txt admlss.pls adsign.txt applAR.txt applI.txt applRO.txt applZHS.txt
[applvis12@R01 admin]$
ftp topfile.txt, you can see following content:

ad /u01/applvis12/apps/apps_st/appl
fnd /u01/applvis12/apps/apps_st/appl
XXERP /u01/applvis12/apps/apps_st/appl
admin /u01/applvis12/apps/apps_st/appl

)))))))))))))))))

cd $ADMIN_SCRIPTS_HOME
sh adstpall.sh apps/apps
sh adautocfg.sh
sh adstrtal.sh apps/apps
cat $APPL_TOP/admin/topfile.txt
XXERP /d01/oracle/PROD/apps/apps_st/appl
Menu that is added to a particular responsibility is given to specific user
Security > User >
Connect as Ajay

59
Errors and Solution:

Solution
Restart the forms server
cd $ADMIN_SCRIPTS_HOME

60
sh adstpall.sh apps/apps
sh adstrtal.sh apps/apps

61
Run Commands
 services.msc

SQL loader
sqlldr userid=apps/apps@vis control=SalesHeader.ctl log=SalesHeader.log rows=1

Reset system password


sqlplus / as sysdba

alter user system identified by Welcome2014$

ALTER USER system ACCOUNT UNLOCK

alter user sys identified by Welcome2014$

drop user dem cascade;

((((((((((((((((
SYS user details:

alter user sys identified by manager;


system/manager

sqlplus / as sysdba
show user
sys

SQL> connect sys/manager as sysdba


Connected.
SQL>

SQL> connect sys / as sysdba

62
Enter password:
Connected.
SQL>

172.28.10.240

SQL> CREATE USER DELTA IDENTIFIED BY DEMANTRA;


User created.
SQL>
SQL> GRANT SYSDBA TO DELTA;
Grant succeeded.
SQL>
SQL>REVOKE SYSDBA FROM delta;
SQL>

SQL> conn DELTA/DEMANTRA as sysdba;


Connected.
SQL> SHOW USER;
USER is "SYS"
SQL> SET SQLPROMPT "_USER SQL>"
SYS SQL>

A user must connect AS SYSDBA or AS SYSOPER if he wants to


perform one of the tasks that require sysdba or sysoper privileges
(such as to shutdown or to startup an instance. If he connects as
SYSDBA, he becomes SYS, if he connects as SYSOPER, he becomes
PUBLIC.
The SYSDBA user is a database user with special privileges. The
main function of the SYSDBA user is to connect to the database
when the database is not open and perform certain 'special'
operations such as startup, shutdown, set archive log mode,
recovering the database etc. When a user is logged into the
database as SYS as SYSDBA, they are actually logged on as the
Dictionary, so it is not good practice to routinely connect as SYSDBA
unless performing an operaton which actually requires the SYSDBA
privilege. When logged in as SYSDBA, all roles are disabled, and this
can potentially affect the way that some of the Enterprise Manager
applications work (for example, the Performance menu tools)

C:\Documents and Settings\279227>SQLPLUS

SQL*Plus: Release 11.2.0.1.0 Production on Fri Jan 17 17:33:52 2014

63
Copyright (c) 1982, 2010, Oracle. All rights reserved.

Enter user-name: SYS


Enter password: MANAGER AS SYSDBA

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 -
Production
With the Partitioning, OLAP, Data Mining and Real Application
Testing options

SQL> GRANT SYSDBA TO DELTA;

Grant succeeded.

SQL> SHOW USER


USER is "SYS"
SQL> DISCONNECT
Disconnected from Oracle Database 11g Enterprise Edition Release
11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application
Testing options
SQL> CONNECT
Enter user-name: DELTA
Enter password: DEMANTRA AS SYSDBA
Connected.
SQL> SHOW USER;
USER is "SYS"
SQL>
))))))))))))))))

To know the version of Linux


[appl123@bb02 ~]$ cat /etc/*-release

Red Hat Enterprise Linux Server release 5.4 (Tikanga)

[appl123@bb02 ~]$

Useful SQL Queries


Version of database
select banner from v$version

64
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
PL/SQL Release 11.1.0.7.0 - Production
"CORE 11.1.0.7.0 Production"
TNS for Linux: Version 11.1.0.7.0 - Production
NLSRTL Version 11.1.0.7.0 – Production

SQL> !date

Create Temp tablespace


select * from dba_tablespaces where contentS ='TEMPORARY';

SELECT * FROM DBA_TEMP_FILES;

SQL> ALTER TABLESPACE TEMP2 ADD TEMPFILE '/u01/EBSDB/db/apps_st/data/temp04.dbf' SIZE


100M;

Tablespace altered.

SQL>

65
Query to search Responsibility by Concurrent program name

SELECT frt.responsibility_name, frg.request_group_name,


frg.description FROM fnd_request_groups frg ,fnd_request_group_units
frgu ,fnd_concurrent_programs fcp ,fnd_concurrent_programs_tl
fcpt ,fnd_responsibility_tl frt ,fnd_responsibility frs WHERE
frgu.unit_application_id = fcp.application_id AND frgu.request_unit_id =
fcp.concurrent_program_id AND frg.request_group_id = frgu.request_group_id
AND frg.application_id = frgu.application_id AND fcpt.source_lang =
USERENV('LANG') AND fcp.application_id = fcpt.application_id AND
fcp.concurrent_program_id = fcpt.concurrent_program_id AND
frs.application_id = frt.application_id AND frs.responsibility_id =
frt.responsibility_id AND frt.source_lang = USERENV('LANG') AND
frs.request_group_id = frg.request_group_id AND frs.application_id =
frg.application_id AND fcp.concurrent_program_name = <shortname> AND
fcpt.user_concurrent_program_name LIKE <User concurrent program>>

Query to get the request group for a given responsibility

SELECT DISTINCT FRT.RESPONSIBILITY_NAME, FMT.USER_MENU_NAME,


FAT.APPLICATION_NAME, (SELECT REQUEST_GROUP_NAME
FROM APPS.FND_REQUEST_GROUPS FRG
WHERE FRG.APPLICATION_ID = FR.APPLICATION_ID
AND FRG.REQUEST_GROUP_ID = FR.REQUEST_GROUP_ID)
REQUET_GRP
FROM APPS.FND_RESPONSIBILITY_TL FRT, APPS.FND_RESPONSIBILITY FR,
APPS.FND_MENUS_TL FMT, APPS.FND_MENUS FM,
APPS.FND_APPLICATION_TL FAT, APPS.FND_APPLICATION F FA WHERE
FRT.RESPONSIBILITY_ID(+) = FR.RESPONSIBILITY_ID
AND FRT.RESPONSIBILITY_NAME = '&Responsibility name' AND FR.MENU_ID
= FMT.MENU_ID
AND FR.MENU_ID = FM.MENU_ID
AND FAT.APPLICATION_ID = FA.APPLICATION_ID
AND FA.APPLICATION_ID = FR.APPLICATION_ID
AND FRT.LANGUAGE = 'US' AND FAT.LANGUAGE = 'US';

Query 1: Select responsibility name along with application name

SELECT application_short_name ,frt.responsibility_id,


frt.responsibility_nameFROM apps.fnd_responsibility_tl frt , fnd_application
faWHERE fa.application_id = frt.application_id; Query 2: Get Menu name for
Responsibility ID , You can find out responsibility_id from Query 1SELECT
DISTINCT a.responsibility_name, c.user_menu_nameFROM
apps.fnd_responsibility_tl a,apps.fnd_responsibility b,apps.fnd_menus_tl
c,apps.fnd_menus d,apps.fnd_application_tl e,apps.fnd_application fWHERE

66
a.responsibility_id(+) = b.responsibility_idAND a.responsibility_id = &resp_idAND
b.menu_id = c.menu_idAND b.menu_id = d.menu_idAND e.application_id =
f.application_idAND f.application_id = b.application_idAND a.LANGUAGE = 'US';
Query 3: Get User name and related assigned responsibilitiesSELECT distinct
u.user_id, u.user_name user_name,r.responsibility_name
responsiblity,a.application_name applicationFROM fnd_user
u,fnd_user_resp_groups g,fnd_application_tl a,fnd_responsibility_tl rWHERE
g.user_id(+) = u.user_idAND g.responsibility_application_id =
a.application_idAND a.application_id = r.application_idAND g.responsibility_id =
r.responsibility_idorder by 1;Query 4: Get Request Group associate with
Responsibility NameSELECT responsibility_name responsibility,
request_group_name,frg.descriptionFROM fnd_request_groups frg,
fnd_responsibility_vl frvWHERE frv.request_group_id =
frg.request_group_idORDER BY responsibility_name

Query 5: Gets Form personalization listing

Personalization is feature available in 11.5.10.X. For More detail on form


Personalization Use Following Tables (Rule_id) is reference key for these
tablesapplsys.fnd_form_custom_actions,
applsys.fnd_form_custom_scopesSELECT ffft.user_function_name “User Form
Name”, ffcr.SEQUENCE,ffcr.description, ffcr.rule_type, ffcr.enabled,
ffcr.trigger_event,ffcr.trigger_object, ffcr.condition, ffcr.fire_in_enter_queryFROM
fnd_form_custom_rules ffcr, fnd_form_functions_vl ffftWHERE ffcr.ID =
ffft.function_idORDER BY 1;

Query 6: Query to view the patch level status of all modules

SELECT a.application_name,DECODE (b.status, ‘I’, ‘Installed’, ‘S’, ‘Shared’, ‘N/A’)


status,patch_levelFROM apps.fnd_application_vl a,
apps.fnd_product_installations bWHERE a.application_id = b.application_id;

Query 7: SQL to view all request who have attached to a responsibility

SELECT responsibility_name ,
frg.request_group_name,fcpv.user_concurrent_program_name,
fcpv.descriptionFROM fnd_request_groups frg,fnd_request_group_units
frgu,fnd_concurrent_programs_vl fcpv,fnd_responsibility_vl frvWHERE
frgu.request_unit_type = ‘P’AND frgu.request_group_id =
frg.request_group_idAND frgu.request_unit_id = fcpv.concurrent_program_idAND
frv.request_group_id = frg.request_group_idORDER BY
responsibility_name;Query 8: SQL to view all requests who have attached to a
responsibilitySELECT responsibility_name ,
frg.request_group_name,fcpv.user_concurrent_program_name,
fcpv.descriptionFROM fnd_request_groups frg,fnd_request_group_units
frgu,fnd_concurrent_programs_vl fcpv,fnd_responsibility_vl frvWHERE

67
frgu.request_unit_type = ‘P’AND frgu.request_group_id =
frg.request_group_idAND frgu.request_unit_id = fcpv.concurrent_program_idAND
frv.request_group_id = frg.request_group_idORDER BY
responsibility_name;Query 9: SQL to view all types of request Application
wiseSELECT
fa.application_short_name,fcpv.user_concurrent_program_name,description,DEC
ODE (fcpv.execution_method_code,‘B’, ‘Request Set Stage Function’,‘Q’,
‘SQL*Plus’,‘H’, ‘Host’,‘L’, ‘SQL*Loader’,‘A’, ‘Spawned’,‘I’, ‘PL/SQL Stored
Procedure’,‘P’, ‘Oracle Reports’,‘S’, ‘Immediate’,fcpv.execution_method_code)
exe_method,output_file_type, program_type,
printer_name,minimum_width,minimum_length,
concurrent_program_name,concurrent_program_idFROM
fnd_concurrent_programs_vl fcpv, fnd_application faWHERE fcpv.application_id =
fa.application_idORDER BY descriptionQuery 10: SQL to view concurrent request
processing time, quite usefulSELECT f.request_id ,
pt.user_concurrent_program_name user_concurrent_program_name,
f.actual_start_date actual_start_date, f.actual_completion_date
actual_completion_date,floor(((f.actual_completion_date-
f.actual_start_date)*24*60*60)/3600)|| ‘ HOURS ‘ ||
floor((((f.actual_completion_date-f.actual_start_date)*24*60*60) -
floor(((f.actual_completion_date-f.actual_start_date)*24*60*60)/3600)*3600)/
60)|| ‘ MINUTES ‘ ||round((((f.actual_completion_date-
f.actual_start_date)*24*60*60) -floor(((f.actual_completion_date-
f.actual_start_date)*24*60*60)/3600)*3600 -(floor((((f.actual_completion_date-
f.actual_start_date)*24*60*60) -floor(((f.actual_completion_date-
f.actual_start_date)*24*60*60)/3600)*3600)/60)*60) ))|| ‘ SECS ‘
time_difference,DECODE(p.concurrent_program_name,’ALECDC’,p.concurrent_pr
ogram_name||’['||f.description||']‘,p.concurrent_program_name)
concurrent_program_name,
decode(f.phase_code,’R',’Running’,'C’,'Complete’,f.phase_code) Phase,
f.status_codeFROM apps.fnd_concurrent_programs p,
apps.fnd_concurrent_programs_tl pt, apps.fnd_concurrent_requests fWHERE
f.concurrent_program_id = p.concurrent_program_idand
f.program_application_id = p.application_idand f.concurrent_program_id =
pt.concurrent_program_idand f.program_application_id = pt.application_idAND
pt.language = USERENV(‘Lang’)and f.actual_start_date is not nullORDER by
f.actual_completion_date-f.actual_start_date desc;

SQL Queries for checking Profile Option Values


The following queries are useful to get the profile option values of a profile
option at site, application, responsibility and user level
1) Obtain Profile Option values for Profile Option name like ‘%Ledger%’ and
Responsibility name like ‘%General%Ledger%’
SELECT
substr(pro1.user_profile_option_name,1,35) Profile,
decode(pov.level_id,

68
10001,'Site',
10002,'Application',
10003,'Resp',
10004,'User') Option_Level,
decode(pov.level_id,
10001,'Site',
10002,appl.application_short_name,
10003,resp.responsibility_name,
10004,u.user_name) Level_Value,
nvl(pov.profile_option_value,'Is Null') Profile_option_Value
FROM
fnd_profile_option_values pov,
fnd_responsibility_tl resp,
fnd_application appl,
fnd_user u,
fnd_profile_options pro,
fnd_profile_options_tl pro1
WHERE
pro1.user_profile_option_name like ('%Ledger%')
and pro.profile_option_name = pro1.profile_option_name
and pro.profile_option_id = pov.profile_option_id
and resp.responsibility_name like '%General%Ledger%' /* comment this line if
you need to check profiles for all responsibilities */
and pov.level_value = resp.responsibility_id (+)
and pov.level_value = appl.application_id (+)
and pov.level_value = u.user_id (+)
order by 1,2;

2) Obtain all Profile Option values setup for a particular responsibility.


Replace the responsibility name as per your requirement.
SELECT
substr(pro1.user_profile_option_name,1,35) Profile,
decode(pov.level_id,
10001,'Site',
10002,'Application',
10003,'Resp',
10004,'User') Option_Level,
decode(pov.level_id,
10001,'Site',
10002,appl.application_short_name,
10003,resp.responsibility_name,
10004,u.user_name) Level_Value,
nvl(pov.profile_option_value,'Is Null') Profile_option_Value
FROM
fnd_profile_option_values pov,
fnd_responsibility_tl resp,
fnd_application appl,

69
fnd_user u,
fnd_profile_options pro,
fnd_profile_options_tl pro1
WHERE
pro.profile_option_name = pro1.profile_option_name
and pro.profile_option_id = pov.profile_option_id
and resp.responsibility_name like '%General%Ledger%'
and pov.level_value = resp.responsibility_id (+)
and pov.level_value = appl.application_id (+)
and pov.level_value = u.user_id (+)
order by 1,2;

70
Applet/JRE problem in R12
https://oinstall.wordpress.com/2013/10/02/how-to-open-oracle-apps-r12-forms-
in-internet-explorer-11-ie-11/

1) In internet explorer 11 , navigate to Tools –> Compatibility View Settings .


Then add Domain name in the URL (ex: orapps.com in erp.oraapps.com)
using Add this website option.

2) Navigate to Tools –> Internet options –> Security . Select internet and click on
Custom level. Scroll down till end of the options and change the option Enable
XSS filter to Disable.

This solution worked for me and I am able to open R12 forms in Internet Explorer
version 11.

71

You might also like