Monday, November 7, 2011

FNDLOAD command

Syntax
The Generic Loader is a concurrent program named FNDLOAD. The concurrent executable takes the following parameters:

FNDLOAD apps/pwd 0 Y mode configfile datafile entity [ param ...]
where


The APPS schema and password in the form username/password[@connect_string]. If
connect_string is omitted, it is taken in a platform-specific manner from the environment
using the name TWO_TASK.

< 0 Y >
Concurrent program flags.

mode
UPLOAD or DOWNLOAD. UPLOAD causes the datafile to be uploaded to the database. DOWNLOAD causes the loader to fetch rows and write them to the datafile.


The configuration file to use (usually with a suffix of .lct, but not enforced or supplied by the loader).


The data file to write (usually with a suffix of .ldt, but not enforced or supplied by the loader). If the data file already exists, it will be overwritten.


The entity(ies) to upload or download. When uploading, always upload all entities, so specify a "-" to upload all entities.

< [param] >
Zero or more additional parameters are used to provide bind values in the access SQL (both UPLOAD and DOWNLOAD). Each parameter is in the form NAME=VALUE. NAME should not conflict with an attribute name for the entities being loaded.

Example of download
FNDLOAD apps/pwd 0 Y DOWNLOAD ${FND_TOP}/patch/115/import/afcpprog.lct myfile.ldt \ PROGRAM CONCURRENT_PROGRAM_NAME= concurrent_program_short_name> APPLICATION_SHORT_NAME=

Example of Upload
FNDLOAD apps/pwd 0 Y UPLOAD ${FND_TOP}/patch/115/import/afcpprog.lct myfile.ldt - CUSTOM_MODE=FORCE undocumented parameter


Some sample examples

1 - Printer Styles

FNDLOAD apps/pwd@seeddb 0 Y DOWNLOAD $FND_TOP/patch/115/import/afcppstl.lct file_name.ldt STYLE PRINTER_STYLE_NAME=”printer style name”

2 - Lookups

FNDLOAD apps/pwd@seeddb 0 Y DOWNLOAD $FND_TOP/patch/115/import/aflvmlu.lct file_name.ldt FND_LOOKUP_TYPE APPLICATION_SHORT_NAME=”prod” LOOKUP_TYPE=”lookup name”

3 - Descriptive Flexfield with all of specific Contexts

FNDLOAD apps/pwd@seeddb 0 Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct file_name.ldt DESC_FLEX P_LEVEL=?COL_ALL:REF_ALL:CTX_ONE:SEG_ALL? APPLICATION_SHORT_NAME=”prod” DESCRIPTIVE_FLEXFIELD_NAME=”desc flex name” P_CONTEXT_CODE=”context name”

4 - Multiple Flexfields

Use a combination of APPLICATION_SHORT_NAME and DESCRIPTIVE_FLEXFIELD_NAME names ie. APPLICATION_SHORT_NAME=PER >> will download all PER flexfields DESCRIPTIVE_FLEXFIELD_NAME=PER_% >> will download all flexfields that start with 'PER_'.

FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct
file_name.ldt DESC_FLEX DESCRIPTIVE_FLEXFIELD_NAME="PER_%"

5 - Key Flexfield Structures

FNDLOAD apps/pwd@seeddb 0 Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct file_name.ldt KEY_FLEX P_LEVEL=?COL_ALL:FQL_ALL:SQL_ALL:STR_ONE:WFP_ALL:SHA_ALL:CVR_ALL:SEG_ALL? APPLICATION_SHORT_NAME=”prod” ID_FLEX_CODE=”key flex code” P_STRUCTURE_CODE=”structure name”

6 - Concurrent Programs

FNDLOAD apps/pwd@seeddb 0 Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct file_name.ldt PROGRAM APPLICATION_SHORT_NAME=”prod” CONCURRENT_PROGRAM_NAME=”concurrent name”

7 - Value Sets

FNDLOAD apps/pwd@seeddb 0 Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct file_name.ldt VALUE_SET FLEX_VALUE_SET_NAME=”value set name”

8 - Value Sets with values

FNDLOAD apps/pwd@seeddb 0 Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct file_name.ldt VALUE_SET_VALUE FLEX_VALUE_SET_NAME=”value set name”

9 - Profile Options

FNDLOAD apps/pwd@seeddb 0 Y DOWNLOAD $FND_TOP/patch/115/import/afscprof.lct file_name.ldt PROFILE PROFILE_NAME=”profile option” APPLICATION_SHORT_NAME=”prod”

10 - Request Group

FNDLOAD apps/pwd@seeddb 0 Y DOWNLOAD $FND_TOP/patch/115/import/afcpreqg.lct file_name.ldt REQUEST_GROUP REQUEST_GROUP_NAME=”request group” APPLICATION_SHORT_NAME=”prod”

11 - Request Sets

FNDLOAD apps/pwd@seeddb 0 Y DOWNLOAD $FND_TOP/patch/115/import/afcprset.lct file_name.ldt REQ_SET APPLICATION_SHORT_NAME=”prod” REQUEST_SET_NAME=”request set”

12 - Responsibilities

FNDLOAD apps/pwd@seeddb 0 Y DOWNLOAD $FND_TOP/patch/115/import/afscursp.lct file_name.ldt FND_RESPONSIBILITY RESP_KEY=”responsibility"

13 - Responsibilities with all Security Groups

FNDLOAD apps/ 0 Y DOWNLOAD FND_TOP/patch/115/import/afscursp.lct .ldt
FND_USER USER_NAME="" SECURITY_GROUP=% DATA_GROUP_NAME=%

14 - Menus

FNDLOAD apps/ pwd@seeddb 0 Y DOWNLOAD $FND_TOP/patch/115/import/afsload.lct file_name.ldt MENU MENU_NAME=”menu_name”

15 - Forms/Functions/Personalizations: Refer to the System Administrator's Guide on dependencies

FNDLOAD / 0 Y DOWNLOAD $FND_TOP/patch/115/import/affrmcus.lct
FND_FORM_CUSTOM_RULES form_name=
OR
FNDLOAD / 0 Y DOWNLOAD $FND_TOP/patch/115/import/afsload.lct file_name.ldt FUNCTION FUNCTION_NAME=
OR
FNDLOAD / 0 Y DOWNLOAD $FND_TOP/patch/115/import/afsload.lct file_name.ldt FORM FORM_NAME=

OR

FNDLOAD / 0 Y DOWNLOAD $FND_TOP/patch/115/import/affrmcus.lct FND_FORM_CUSTOM_RULES function_name=

16 - User/Responsibilities

FNDLOAD apps/ pwd@seeddb 0 Y DOWNLOAD $FND_TOP/patch/115/import/afscursp.lct file_name.ldt FND_USER

17 - Alert
FNDLOAD apps/pwd 0 Y DOWNLOAD
$ALR_TOP/patch/115/import/alr.lct my_file.ldt ALR_ALERTS
APPLICATION_SHORT_NAME=FND ALERT_NAME=Alert name to downloa

18 - Blob

With Release 12.1.1, FNDLOAD supports BLOB data (upload / download ) to better serve content-rich applications.

FNDLOAD apps/pwd 0 Y mode configfile datafile entity [ param ... ]

19 - Overwrite custom definitions

FNDLOAD apps/apps 0 Y UPLOAD $FND_TOP/patch/115/import/.lct $
XX_TOP/import/.ldt CUSTOM_MODE=FORCE

20 - Load an NLS Language
FNDLOAD / 0 Y UPLOAD \
- UPLOAD_MODE=NLS CUSTOM_MODE=FORCE WARNINGS=TRUE

21 - Migrate the role registration process from one instance to another

a. Please navigate to the path: $FND_TOP /patch/115/import/US/umxrgsvc.ldt

b. The following command can be used to download:

FNDLOAD apps/@(instance name) O Y DOWNLOAD $FND_TOP/patch/115/import/umxrgsvc.lct umxrgsvc.ldt UMX_REG_SERVICES REG_SERVICE_CODE UMX

c. The following command can be used to upload:
FNDLOAD apps/@(instance name) O Y UPLOAD $FND_TOP/patch/115/import/umxrgsvc.lct umxrgsvc.ldt UMX_REG_SERVICES REG_SERVICE_CODE UMX

22 - Transfer Custom Messages to another Instance

a. Download the message from the source instance.

FNDLOAD apps/apps 0 Y DOWNLOAD @FND:patch/115/import/afmdmsg.lct password.ldt FND_NEW_MESSAGES APPLICATION_SHORT_NAME=FND MESSAGE_NAME=PASSWORD-INVALID-NO-SPEC-CHAR

b. Move the custom LDT file (password.ldt) over to the destination instance.

c. Upload the custom message to the destination instance.
FNDLOAD apps/apps 0 Y UPLOAD @FND:patch/115/import/afmdmsg.lct password.ldt FND_NEW_MESSAGES APPLICATION_SHORT_NAME=FND CUSTOM_MODE=FORCE

23 - Download UMX Roles and Role Assignment data from one instance and upload to another.

To download from one instance:

FNDLOAD 0 Y DOWNLOAD $FND_TOP/patch/115/import/afrole.lct
umxroles.ldt WF_ROLE ORIG_SYSTEM=UMX%

To upload to another instance:

FNDLOAD 0 Y UPLOAD $FND_TOP/patch/115/import/afrole.lct
umxroles.ldt

References:

· Oracle Applications Systems Administrator Guide - Configuration

. Oracle Metalink Note#735338.1


Wednesday, August 10, 2011

How to Enable Automatic Compilation of JSP pages in R12 Environment

In Release 11i, the deployment of a (custom) JSP was done as follows:
  1. Copy the file (for example: custom.jsp) to the web tier in the $OA_HTML directory.
  2. Request it in the browser like URL> http://:/OA_HTML/custom.jsp.
The result on the web tier is that:
  • The custom.jsp was compiled
  • Output files of the compilation _custom.class (and _custom.java) are saved under the _pages directory
  • The custom.jsp page is shown in the browser
Performing the same steps in Release 12 environment just shows a blank screen and no compilation of the custom.jsp is done. The steps in this Note explain how the same behavior as in Release 11i can be achieved in Release 12.

Solution

In Release 12 the (automatic) compilation of a JSP is disabled and, at runtime, only the pre-compiled JSP's are picked up. Since this requires fewer checks to be done, the performance is improved and therefore this is the recommended and default setting for a Production environment where JSP's will only be replaced occasionally.

In cases where development activities are done and JSP pages are changing often this default setting makes things more complicated. Each time a JSP is deployed a manual compilation using the ojspCompile.pl is needed and the OC4J running the oacore needs a restart to pick up the changes. This will also affect other people working on the same environment.

Follow the steps below to:
  • Automatically have the JSP recompiled when the JSP is changed (at least the time stamp)
  • See the new JSP without the need to restart the OC4J running oacore
The objective is to change the setting for main_mode from justrun to recompile in
$INST_TOP /ora/10.1.3/j2ee/oacore/application-deployments/oacore/html/orion-web.xml

This can be achieved by performing the following:

  • Login into E-Business suite and select System Administrator responsibility
  • Select function AutoConfig (under Oracle Applications Manager) (*)
  • For each web tier server perform the following:
    • Click on pencil icon under Edit Parameters
    • Select tab System
    • Expand section jtff_server
    • Change value for the entry s_jsp_main_mode from justrun to recompile
    • Confirm the change by clicking Save button
  • Run AutoConfig to propagate the changes to the configuration files
  • Verify that the $INST_TOP/ora/10.1.3/j2ee/oacore/application-deployments/oacore/html/orion-web.xml has the following:
      

main_mode
recompile
  • Restart the web tier services
  • Request a JSP in the browser which is compiled. See that a new _.class is created in _pages
  • Make a change in the JSP file
  • Request it again in the browser. See that _.class is 'refreshed' in _pages and the change is seen in the browser

(*) If the Autoconfig function is not available it can also be accessed by selecting other function for Oracle Application Manager and then select Site Map > System Confiration - Autoconfig. Also the Autoconfig function can be added to the menu as follows:

  • Log in as System Administrator and select System Administrator
  • Application>Menu
  • Put the system into query\
  • In Menu enter OAM_ADMIN_MENU
  • Run the query: This should return Oracle Applications Manager Administrator menu
  • Add new line
  • Enter Prompt = Autoconfig + Function select OAM_AD_CONFIG_FILES_TABLE and ensure Grant is ticked
  • Save
  • After recompilation (and possibly bounce) the new function will be available to be used in the future

Metalink#458338.1

How To Clear Caches (Apache/iAS, Cabo, Modplsql, Browser, Jinitiator, Java, Portal, WebADI) for E-Business Suite?

Metalink [ID 742107.1]

Apache / iAS

- shutdown iAS server
- go to $OA_HTML (for 11.5.9) or $COMMON_TOP (for 11.5.10.x) directory
- backup the directory _pages and delete its contents by running for instance:

rm -rf $COMMON_TOP/_pages/*

- for modplsql caches remove contents of $IAS_ORACLE_HOME/Apache/modplsql/cache directory
- restart iAS server


To clear middle tier cache in release 12:

- go to "Functional Administrator" responsibility
- select Core Services => Caching Framework => Global Configuration => Clear cache


Cabo

Images and style sheets can be corrupted or out of sync in the cabo caches,
you may need to clear the related directories after backup:

$OA_HTML/cabo/images/cache
$OA_HTML/cabo/styles/cache


Web Browser


for Netscape:

- go to menu Edit => Preferences…,
- choose 'Cache' in 'Advanced' category,
- click on buttons 'Clear Memory Cache' and 'Clear Disk Cache'.
- close all Netscape windows and restart new browser session.

for Internet Explorer:

- go to menu Tools => Internet Options…,
- select Genera' tab,
- click on button 'Delete Files' in 'Temporary Internet files' zone
- close all IE windows and restart new browser session.

for Mozilla Firefox:

- go to menu Tools
- select 'Clear Private Data...' to clear the entire cache
or
- go to menu Edit or Tools
- select Preferences or Options.
- expand the Advance' options and choose Cach' or Privacy
- click the button called Clear Cache.

for Safari:

- go to Safari menu
- select Empty Cache => Click 'Empty' in the dialogue box


Jinitiator

Two possibilities depending of the Jinitiator version:

for 1.1.8.x versions:

- delete all files in directory:

C:\Program Files\Oracle\Jinitiator \jcache\

for 1.3.1.x versions:

- go to Start => Parameters => Control Panel
- double-click on "Jinitiator " icon
- in the new pop-up window, click on "Cache" tab
- click on "Clear Jar Cache " button. On prompt, click Yes.

(you can also delete directly all files under directory:
C:\Documents and Settings\\Oracle Jar Cache)


Java

Java/JRE plug-in (Windows)

- go to Start => Parameters => Control Panel
- double-click on "Java" icon
- in the new pop-up window, click on "General" tab
- click on "Delete Files..." button (you can select Applets, Applications or other files before)

JVM

- go to responsibility "Functional Administrator"
- click on "Core Services" tab then the "Caching Framework" sub-tab
- click on "Global Configuration" link then click on "Clear all cache" button to clear all of the Java Cache's


Portal

- go to the url: http://:/pls/admin_/gateway.htm or cache.htm
- click on "Cache Settings" option and note the "Cache Directory"
- go to this directory and delete all the cache files in the directory and sub directories

See also modplsql caches in Apache/iAS section above.


WebADI / BNE cache

For instance when enabling BNE log

- go to url: http://:/oa_servlets/oracle.apps.bne.framework.BneAdminServlet
- click on the "clear-cache" link
- at the bottom of the page you should see 'Cache Cleared'


EBS R12 Unix Structure

To see OAF SOP(System.out.println) output in R12:
cd $INST_TOP/logs/ora/10.1.3/opmn/oacore_default_group_1
tail -100f oacorestd.out

Wednesday, July 6, 2011

Important GL Tables

GL Application Foundation (FND) Tables
Accounting Flexfield - “FND_ID_FLEX_STRUCTURES” & “FND_ID_FLEX_SEGMENTS”
Value Sets - “FND_FLEX_VALUE_SETS”
Segment Values - “FND_FLEX_VALUES” & “FND_FLEX_VALUES_TL”
FND_CURRENCIES (_TL)

GL Application - Setup Tables
Set of Books - “GL_SETS_OF_BOOKS”
Code Combinations - “GL_CODE_COMBINATIONS”
Calendar - “GL_PERIODS”, “GL_PERIOD_STATUSES”
Budget Definitions - “GL_BUDGETS”, “GL_BUDGET_ENTITIES”, “GL_BUDGET_VERSIONS” , "GL_BUDGET_ASSIGNMENT_RANGES"
Daily Rates - "GL_DAILY_RATES"


GL Application - Open Interface Tables
Actuals Interface - “GL_INTERFACE”
Budget Interface - “GL_BUDGET_INTERFACE”
Daily Foreign Currency Rates - “GL_DAILY_RATES_INTERFACE”

GL Application - Transaction & Balance Data Tables
Journal Entries (Transactions) - “GL_JE_BATCHES”,
“GL_JE_HEADERS”,
“GL_JE_LINES”

Balances - “GL_BALANCES”

GL Lookup Values - “GL_LOOKUPS”

GL Application Archive, Log, & History Tables
History - “GL_ALLOC_HISTORY”, “GL_ARCHIVE_HISTORY”, “GL_INTERFACE_HISTORY”
Archive & Purge - “GL_ARCHIVE_BATCHES”

Order to Cash Tables and Data Flow

--ORDER MAIN TABLES
select flow_status_code, booked_flag, a.* from oe_order_headers_all a where order_number = '4025794';
select flow_status_code, a.* from oe_order_lines_all a where header_id = 795291;
select * from oe_price_adjustments where header_id = 795291 and line_id = 2440080;
select * from oe_order_price_attribs where header_id = 795291 and line_id = 2440080;
select * from oe_order_holds_all where header_id = 795291 and line_id = 2440080;

--DELIVERY TABLES
select * from wsh_delivery_details where source_header_id = 795291 and source_line_id = 2440080;
select * from wsh_delivery_assignments where delivery_detail_id = 4537129;

--PICK RELEASE (from SHIPPING tab)
--Concurrent Program "Pick Selection List Generation" kicks off after releasing order from SHIPPING.
--This in turn kicks off "Pick Slip Report" and "Auto Ship Confirm Report (Auto Ship Confirm Report)"
select * from wsh_new_deliveries where delivery_id = 653581;
select * from wsh_picking_batches where name = '653581';
select * from wsh_serial_numbers where delivery_detail_id = 4537129;

--MOVE ORDER
select * from mtl_txn_request_headers where request_number = '689455';
select * from mtl_txn_request_lines where header_id = 690521;

--SHIP CONFIRM
--Shipping Transaction for after entering serial numbers.
--Kicks off "Interface Trip Stop" very imp program that affects Inventory.
select * from mtl_material_transactions where source_code = 'ORDER ENTRY' and transaction_reference = 795291 and trx_source_line_id = 2440080;
select * from mtl_unit_transactions where inventory_item_id = 379603 and serial_number in ('SUMIT00','SUMIT01');
select * from mtl_serial_numbers where inventory_item_id = 379603 and upper(serial_number) in ('SUMIT00','SUMIT01');

--Run "Workflow Background Process" for "OM Order Line"
select * from ra_interface_lines_all where interface_line_context = 'ORDER ENTRY' and interface_line_attribute1 = '4025794';
select * from ra_interface_salescredits_all where interface_line_context = 'ORDER ENTRY' and interface_line_attribute1 = '4025794';
select * from ra_interface_distributions_all where interface_line_context = 'ORDER ENTRY' and interface_line_attribute1 = '4025794';

--Run "Auto Invoice Master Program" and that will kick "Auto Invoice Import" program that will create invoice for the order
-- "Prepayment Matching Program (Prepayments Matching Program)"
select * from ra_customer_trx_all where interface_header_attribute1 = '4025794' and creation_date >= trunc(sysdate);
select * from ra_customer_trx_lines_all where interface_line_attribute1 = '4025794' and creation_date >= trunc(sysdate);
select * from ra_cust_trx_line_salesreps_all where customer_trx_line_id = 5758780;
select * from ra_cust_trx_line_gl_dist_all where customer_trx_line_id = 5758780;
select * from ar_payment_schedules_all where trx_number = '50133102';

--Receipt against invoice
select * from ar_cash_receipts_all where receipt_number like '12345%' and creation_date >= trunc(sysdate);
select * from ar_receivable_applications where cash_receipt_id in (130168,130169);

--Run "General Ledge Transfer Program"
--This kicks off "Revenue Recognition" and "Revenue Contingency Analyzer" and "Update Posting Control" program
select * from gl_interface where date_created >= '10-JUN-2011' and user_je_category_name = 'Sales Invoices' and user_je_source_name = 'Receivables'
and reference10 like '%50133102%' and reference24 = '50133102' and reference23 = '42596305';

--Run "Journal Import"
select * from gl_je_batches where creation_date >= '13-JUN-2011' order by je_batch_id desc;
select * from gl_je_headers where je_source = 'Receivables' and je_category = 'Sales Invoices' and je_batch_id = 1592931;
select * from gl_je_lines where je_header_id = 1750124;

--Post Journals "Posting"
select * from gl_balances where last_update_date >= '13-JUN-2011' ;

Procure to Pay Tables and Data Flow

--Vendors
SELECT * FROM ap_vendors_v WHERE vendor_name = 'XX_VENDOR';
select * from po_vendors where vendor_name = 'XX_VENDOR';

--Requisitions
select segment1, type_lookup_code,a.* from po_requisition_headers_all a where requisition_header_id = 431593;
select * from po_requisition_lines_all where requisition_header_id = 431593 and requisition_line_id = 632840;
select * from po_req_distributions_all where requisition_line_id = 632840;
select * from po_document_types where document_subtype = 'PURCHASE';--(po_requisition_headers_all .type_lookup_code)
select * from po_lookup_codes where lookup_type = 'AUTHORIZATION STATUS';

--PO Headers
select * from po_distributions_all where req_distribution_id = po_req_distributions_all.distribution_id
select * from po_lines_all where po_line_id = 1152395;
select * From po_headers_all where po_header_id = 686518;
select * from po_line_locations_all where po_header_id = 686518;

--Receiving
select * from rcv_transactions where po_header_id = 147163 and po_distribution_id = 353861;
select * from rcv_shipment_headers where shipment_header_id = rcv_transaction.shipment_header_id;
select * from rcv_shipment_lines where where shipment_header_id = rcv_transaction.shipment_header_id;
select * from rcv_serial_transactions where transaction_id = rcv.transactions.transaction_id;
--Receiving transaction Processor import

--AP Invoices and Payments
select * from ap_invoice_distributions_all where po_distribution_id = 353861;
select * from ap_invoices_all where invoice_id = 730583;
select * from ap_terms where term_id = 10020;
select * from ap_invoice_payments_all where invoice_id = 730583;
select * from ap_payment_schedules_all where invoice_id = 730583;
select * from ap_payment_distributions_all where invoice_payment_id in (select invoice_payment_id from ap_invoice_payments_all where invoice_id = 730583);
select * from ap_checks_all where check_id = 285590;

--Accounting Entries
select * from ap_ae_lines_all where source_table = 'AP_INVOICES' and source_id = 730583; -- (ap_invoices_all.invoice_id)
select * from ap_ae_headers_all where ae_header_id = 988223;

--Reconciling Bank Accounts in Cash Management Module
select * from ce_statement_headers_all where statement_header_id =75826
select * from ce_statement_lines where statement_header_id in (select statement_header_id from ce_statement_headers_all where statement_header_id =75826)

--Concurrent Program "Payables Transfer to General Ledger"
select * from gl_interface;

--Import Journal
select * from gl_je_batches;
select * from gl_je_headers;
select * from gl_je_lines;

--Post Journals "Posting"
select * from gl_balances;

--Requisition Screen Header

select * from PO_REQUISITION_HEADERS_INQ_V where requisition_num = '19106668';
select * from PO_REQUISITION_LINES_INQ_V where requisition_header_id = 431593;
select * from PO_REQUISITION_HEADERS_V where requisition_number = '19106668';
select * from PO_REQUISITION_LINES_V where requisition_header_id = 431593;
select * from PO_REQ_DISTRIBUTIONS_V where requisition_line_id in (select requisition_line_id from PO_REQUISITION_LINES_V where requisition_header_id = 431593);

Important Workflow Tables

--Workflow Users/Roles
SELECT * FROM WF_USERS where name = 'XXUSER';
SELECT * FROM WF_ROLES where name = 'XXUSER';
SELECT * FROM WF_USER_ROLES where user_name = 'XXUSER';
SELECT * FROM WF_USER_ROLE_ASSIGNMENTS where user_name = 'XXUSER';

--Workflow Item Name and Attributes
SELECT * FROM WF_ITEM_TYPES where name = 'OKCAUKAP'; --PO Approval (POAPPRV) ; PO Requisition Approval (REQAPPRV);
--OM Order Header (OEOH); OM Order Line (OEOL)
SELECT * FROM WF_ITEM_TYPES_VL where name = 'OKCAUKAP';
SELECT * FROM WF_ITEM_TYPES_VL where display_name like '%Approval';
SELECT * FROM WF_ITEM_TYPES_VL where description like '%Order%';
SELECT * FROM WF_ITEM_ATTRIBUTES where item_type = 'OKCAUKAP';
SELECT * FROM WF_ITEM_ATTRIBUTES_TL;

--Workflow Functions
SELECT * FROM WF_ACTIVITIES where item_type = 'OKCAUKAP' and version = 1;
SELECT * FROM WF_ACTIVITIES_TL where item_type = 'OKCAUKAP';
SELECT * FROM WF_ACTIVITY_ATTRIBUTES where activity_name = 'CREATE_SOA';
SELECT * FROM WF_ACTIVITY_ATTRIBUTES_TL;
SELECT * FROM WF_ACTIVITY_TRANSITIONS;

--Workflow Lookups
SELECT * FROM WF_LOOKUPS_TL where lookup_type = 'OKC_DB_RETRY';

--Workflow Messages
SELECT * FROM WF_MESSAGES where type = 'OKCAUKAP' and name = 'APPROVE_CONTRACT';
SELECT * FROM WF_MESSAGES_TL where type = 'OKCAUKAP' and name = 'APPROVE_CONTRACT';
SELECT * FROM WF_MESSAGE_ATTRIBUTES where message_type = 'OKCAUKAP' and message_name = 'APPROVE_CONTRACT';
SELECT * FROM WF_MESSAGE_ATTRIBUTES_TL where message_type = 'OKCAUKAP' and message_name = 'APPROVE_CONTRACT';


--Workflow Particular item run and values
SELECT * FROM WF_ITEMS where item_type = 'OKCAUKAP' order by begin_date desc;
--USER_KEY/ITEM_KEY => select * from okc_k_headers_b where contract_number = '20683312';
SELECT * FROM WF_ITEM_ATTRIBUTE_VALUES where item_type = 'OKCAUKAP' and item_key='20683312';
SELECT * FROM WF_PROCESS_ACTIVITIES where process_item_type = 'OKCAUKAP' and process_version = 1;

SELECT * FROM WF_NOTIFICATIONS WHERE MESSAGE_TYPE = 'OKCAUKAP' AND MESSAGE_NAME = 'APPROVE_CONTRACT';
SELECT * FROM WF_NOTIFICATION_ATTRIBUTES where notification_id = ;

SELECT * FROM WF_DEFERRED;

OA Framework Code Logging

To write Log Statements in OAF Code:

Add the below piece of code in your OA page

--CONTROLLER
if (pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
pageContext.writeDiagnostics(this, "your log statement", OAFwkConstants.STATEMENT);

--OC4J
if (OADBTranasctionImpl.isLoggingEnabled(OAFwkConstants.PROCEDURE))
OADBTransactionImpl.writeDiagnostics(this, "your message", OAFwkConstants.PROCEDURE);

Enable FND Logging Profile:
a. FND: Debug Log Enabled -- Set to Yes
b. FND: Debug Log Level -- Set to Statement level


To See Log Statements:
a. To see log statement on browser append below string to browser url and click on enter &aflog_level=statement.
b. query FND_LOG_MESSAGES in the database for all the debugging messages.
c. Select Diagnostics button from any page and in the Diagnostics page select Show Log on Screen option

Debugging in Oracle Apps

FND Debugging


Good Metalink Notes on Debugging
Metalink: Note Id 248920.1 ==> How to generate Debug Log Files for Oracle Quoting 11i?
Metalink: Note Id 265330.1 ==> How to generate Debug Log Files for Oracle Quoting R12?

Metalink: Note Id 207262.1 ==> How To Generate Debug Log Files for Oracle iStore 11i?
Metalink: Note Id 763489.1 ==> How To Generate Debug Log Files for Oracle iStore R12?

Metalink: Note Id 452830.1 ==> How to generate Debug Log Files for Oracle Payments R12?
Metalink: Note Id 265330.1 ==> How to generate Debug Log Files for Oracle iPayment 11i?

Metalink: Note Id 239627.1 ==> How To Obtain the CSE/CSI Log and Debug Files?

Trace Files and TKPROF in Oracle Apps

How to enable Trace:

  • Enable the SQL Trace facility for the session by using one of the following DBMS_SESSION.SET_SQL_TRACE procedure
ALTER SESSION SET SQL_TRACE = TRUE|FALSE;
  • Diagnostics Link > "Set Trace Level" > Go button > Choose the Trace Level.
  • In situations where you cannot invoke an ALTER SESSION command from the session you wish to trace—as with prepackaged applications, for example—you can connect to the database as a DBA user and invoke the dbms_system built-in package in order to turn on or off SQL trace in another session. You do this by querying v$session to find the SID and serial number of the session you wish to trace and then invoking the dbms_system package with a command of the form:EXECUTE SYS.dbms_system.set_sql_trace_in_session (, , TRUE|FALSE);
Where to get Trace File
When you enable SQL trace in a session for the first time, the Oracle server process handling that session will create a trace file in the directory on the database server designated by the user_dump_dest initialization parameter. As the server is called by the application to perform database operations, the server process will append to the trace file.

select name,value from V$PARAMETER where name = 'user_dump_dest';


Using TKPROF

TKPROF Example#1
----------------------
If you are processing a large trace file using a combination of SORT parameters and the PRINT parameter, then you can produce a TKPROF output file containing only the highest resource-intensive statements. For example, the following statement prints the 10 statements in the trace file that have generated the most physical I/O:

TKPROF ora53269.trc ora53269.prf SORT = (PRSDSK, EXEDSK, FCHDSK) PRINT = 10

TKPROF Example#2
----------------------
This example runs TKPROF, accepts a trace file named dlsun12_jane_fg_sqlplus_007.trc, and writes a formatted output file named outputa.prf:

TKPROF dlsun12_jane_fg_sqlplus_007.trc OUTPUTA.PRF
EXPLAIN=scott/tiger TABLE=scott.temp_plan_table_a INSERT=STOREA.SQL SYS=NO
SORT=(EXECPU,FCHCPU)


For more details, users should visit following link:
http://download.oracle.com/docs/cd/B10500_01/server.920/a96533/sqltrace.htm

How to Bounce Apache in Oracle Apps

R12
$INST_TOP/admin/scripts/adapccctl.sh stop

$INST_TOP/admin/scripts/adoacorectl.sh stop
$INST_TOP/admin/scripts/adapccctl.sh start
$INST_TOP/admin/scripts/adoacorectl.sh start

11i
$COMMON_TOP/admin/scripts//adapcctl.sh stop
$COMMON_TOP/admin/scripts//adapcctl.sh start

How to clear middle-tier cache using Functional Adminstrator

Navigate to Functional Administrator responsibility
  1. Core Services
  2. Caching Framework
  3. Global Configuration
  4. Clear cache