Friday, January 18, 2008

List all concurrent requests in Oracle

Use the following query to list all the concurrent requests in Oracle which are in errored or error status.

Modify the query to get the reports that you want

select a.request_id,a.request_date,b.user_concurrent_program_name, a.requested_by,a.responsibility_application_id, a.responsibility_id,
a.completion_text, a.logfile_name from FND_CONCURRENT_REQUESTS a, FND_CONCURRENT_PROGRAMS_TL b where a.concurrent_program_id=b.concurrent_program_id
and  a.status_code='E' and a.request_date > to_date('13-jan-2008','DD-MON-YYYY') order by a.request_date desc

Thursday, January 10, 2008

Custom.pll

Steps to convert/compile custom.pll files.
Convert .pll to .pld
f60gen MODULE=CUSTOM USERID=apps/sldfkjns5 MODULE_TYPE=LIBRARY SCRIPT=YES

Convert .pld to .pll
f60gen MODULE=CUSTOM USERID=apps/sldfkjns5 MODULE_TYPE=LIBRARY PARSE=YES

Compile all modules
f60gen MODULE=CUSTOM USERID=apps/sldfkjns5 MODULE_TYPE=LIBRARY
COMPILE_ALL=yes

Copy the pll and plx back to $AU_TOP/resource
Then bounce forms port (f60down and f60up should not be used as because it kills existing connections)

Monday, January 7, 2008

List Responsibilities by User in Oracle Apps eBusiness Suite.

List Responsibilities by User in Oracle Apps eBusiness Suite. Use the following query to list the responsibilities assigned to a particular user in Oracle Applications (Ebusiness Suite)

SELECT FNDRESP.* FROM fnd_user fnduser, fnd_user_resp_groups FNDRESPGROUP, fnd_responsibility_TL FNDRESP WHERE
fnduser.user_id=FNDRESPGROUP.user_id
AND FNDRESP.responsibility_id=FNDRESPGROUP.responsibility_id
and upper(fnduser.user_name) like upper('%your user%');

Thursday, January 3, 2008

Sys.xmlType datatype and parsing XML in Oracle9i, 10g onwards

Oracle9i onwards there is new datatype called sys.xmlType. This provides a great way to handle XML documents with minimal or no parsing required.

Listed below is a sample of how to use the xmlType.

Step 1. Create Table of XML type

CREATE TABLE xml_table( xml_col SYS.XMLTYPE );
Step 2. Insert the following XML into the xml_table defined above

<?xml version="1.0"?>
<email>
    <from>xyz@gmail.com</from>
    <to>xyz1@gmail.com</to>
    <subject>some subject</subject>
    <body>some body</body>
</email>

declare

l_temp sys.xmlType;

begin

l_temp := sys.xmlType.createXML('

<?xml version="1.0"?>
<email>
    <from>xyz@gmail.com</from>
    <to>xyz1@gmail.com</to>
    <subject>some subject</subject>
    <body>some body</body>
</email>'

);

insert into xml_table values ( l_Temp);

Commit;

end;

Step 3. Write select query to extract data from this table. Sample extract query listed below.

select a.xml_col.extract("//from/text()").getStringVal() as from from xml_table a

Wednesday, January 2, 2008

User Hooks in Oracle

User hooks provide the client with the ability to add logic to application processing and to disable optional product processing. These User Hooks take the form of procedures that may be called by the application, in sequence, when the application takes a specified action on a specified object type.

Not all the Oracle Applications API's have user hooks. The API's which have users hooks are listed in the following table

jtf_user_hooks.

So if you are looking to modify/customize a particular API, look for the that API in the the above table.

For example,

select * from jtf_user_hooks where API_NAME = 'CANCEL_ORDER'

Just like triggers, User Hooks can be made to fire pre/post. In order to set a user hook as active , the execute flag has to be set to 'Y'.