Tuesday, September 5, 2017

R12-Currency Types

Functional Currency: R12 this is the currency of the ledger. FASB52/IAS21: "An entity’s functional currency is the currency of the primary economic environment in which the entity operates".

Reporting Currency:
FASB52: "The currency in which an enterprise prepares its financial statements. "Reporting currencies are additional currency representations of primary or secondary ledgers".


Local Currency: According to FASB52: "The currency of a particular country being referred to".

Foreign Currency: According to FASB52: "A currency other than the functional currency of the entity being referred to".

Transaction Currency: According to FCG page 4-5: "Transaction currency is the currency of denomination for a transaction document. We sometimes refer to this as the entered currency".

Primary Currency: According to FCG page 4-5: "The currency used for accounting and reporting in a ledger is called "the ledger primary currency", although it is often referred to as the ledger’s accounting currency".

Source->Link

Thursday, January 12, 2017

Open/Close Periods in R12

Purchasing:
1.Navigate to Purchase Super User->Setup->Financials->Accounting->Control Purchasing Periods
2.Select Operating Unit name and click Go button
3.Search for period name and set status and click Save button.

Inventory:
1.Navigate to Inventory->Accounting Close Cycle->Inventory Accounting Periods
2.Select Organization
3.Click on Change Status button.

Payables:
1.Navigate to Payables->Accounting->Control Payables Periods
2.Select Ledger Name and Operating Unit and click Find button
3.Search for period name and set status and click Save button.

General Ledger:
1.Navigate to General Ledger->setup->Open/Close
2.Select the ledger for which the period is required to be opened/closed
3.Once you click on Open button request for below concurrent programs will be submitted automatically:
Periods – Open Periods
Program – Automatic Reversal
Open Period Balances

Sunday, February 7, 2016

ADF Performance Tuning Tips by Frank Houweling



Reasons for performance issues:
1.VO query execution time is high or execution of same query multiple times.
2.Execution of so many queries  on a command action/on page load. Due to Master-Detail-Deail-Details relation or multiple lookup items(drop downs) on single page.
3.More no.of database round trips due to low value of Fetch Size at VO level.
4.Unused iterators on page defs causing unnecessary query execution.
5.Many http requests due to incorrect range size value at VO iterator in page def.
6.Frequent passivation/activation of application module instances due to wrong settings.
7.Full page submit instead of partial http requests using PPR.
8.Fetch huge amount of data(rows and columns) on page causes huge JVM memory consumption and intern causes long running garbage collections.
Use table format for key columns and use form layout for remaining columns.
Change Access Mode in VO from "Scrollable" to "Range Paging"
9.Big scopes of managed beans consumes more memory. Use small memory scopes as possible.
10.Huge html content over http request/response causes performance problems. Use small names for UI components ids.
11.Many SOP and logging stmts slow down application performance.
12.Early Execution of taskflows in tab layout/popups and immediate load of table contents may slow down performance.
13.Early instantiation of VO and nested application module instances. Set Lazy Loading options in AM properties to defer instantiation.
14.Execution of static data VOs for each user/AM instance. Instead, group static data VOs into Shared Application Module causes only one time execution of static VOs per application.

Source: https://www.youtube.com/watch?v=tuySOcr0d8I

Saturday, August 29, 2015

Difference between XA and Non-XA Data source

An XA transaction, in the most general terms, is a "global transaction" that may span multiple resources. A non-XA transaction always involves just one resource.

An XA transaction involves a coordinating transaction manager, with one or more databases (or other resources, like JMS) all involved in a single global transaction. Non-XA transactions have no transaction coordinator, and a single resource is doing all its transaction work itself (this is sometimes called local transactions).

XA transactions come from the X/Open group specification on distributed, global transactions. JTA includes the X/Open XA spec, in modified form.

Most stuff in the world is non-XA - a Servlet or EJB or plain old JDBC in a Java application talking to a single database. XA gets involved when you want to work with multiple resources - 2 or more databases, a database and a JMS connection, all of those plus maybe a JCA resource - all in a single transaction. In this scenario, you'll have an app server like Websphere or Weblogic or JBoss acting as the Transaction Manager, and your various resources (Oracle, Sybase, IBM MQ JMS, SAP, whatever) acting as transaction resources. Your code can then update/delete/publish/whatever across the many resources. When you say "commit", the results are commited across all of the resources. When you say "rollback", _everything_ is rolled back across all resources.

The Transaction Manager coordinates all of this through a protocol called Two Phase Commit (2PC). This protocol also has to be supported by the individual resources.

In terms of datasources, an XA datasource is a data source that can participate in an XA global transaction. A non-XA datasource generally can't participate in a global transaction (sort of - some people implement what's called a "last participant" optimization that can let you do this for exactly one non-XA item).

For more details - see the JTA pages on java.sun.com. Look at the XAResource and Xid interfaces in JTA. See the X/Open XA Distributed Transaction specification. Do a google source on "Java JTA XA transaction".

Source-> Mike Spille

Tuesday, May 26, 2015

ADF Model

https://docs.oracle.com/middleware/1212/adf/ADFDC/general.htm#ADFDC101

Contexual Events


http://rohanwalia.blogspot.in/2013/07/contextual-events-basic-step-by-step.html

Sunday, May 24, 2015

Create Custom and Reusable Validator in ADF

You can either create a validation method on the page's backing bean (if you want custom validation for a component on a single page), or create JSF validator classes (if you want to reuse the validation logic by various pages in the application).

In case of custom validator class, your custom class should implement Validator class and override a method validate(FacesContext fc, UIComponent, uiC, Object, obj) with custom logic. This method should throw Validator Exception in case of validation failure.

if(validationFails){
throw new ValidatorException(new FacesMessage(FacesMessage.SERIVITY_ERROR, 'Email is not in valid format.', null));
}

You must register custom validator class in faces-config.xml file under Validators section( ID, Class) to use it in page UI components.

To apply validation on UI component, right click on
Page->UIComponent(inputText) and select 'insert inside'->JSF core->validator->Validator ID

Source: http://jjzheng.blogspot.in/2010/10/create-custom-validators-in-adf.html

Tuesday, September 23, 2014

Oracle Forms and Reports 11g Installation on Windows 7(32 bit) and Sample Form Test

1.Below installation tested on Windows7 Ultimate, 32 bit, 3GB RAM
Weblogic Server 11g(10.3.5)
Forms and Reports Server 11g(11.1.2)
Oracle Enterprise Pack for Eclipse(11.1.1.7)

2.Download files from below location.(Login to http://www.oracle.com/)
#wls1035_oepe111172_win32.exe
Link: http://download.oracle.com/otn/nt/middleware/11g/wls/1035/wls1035_oepe111172_win32.exe?AuthParam=1411119662_8b9496fcbef19a07ca48ae945021306c

#ofm_frmrpts_win_11.1.2.0.0_32_disk1_1of1.zip
Link: http://download.oracle.com/otn/nt/middleware/11g/111200/ofm_frmrpts_win_11.1.2.0.0_32_disk1_1of1.zip?AuthParam=1411124435_ea027c60bc5c8ba6727bad23f0c15175

#Patch: 6880880-OPatch Update
File:p6880880_111000_WINNT.zip (http://support.oracle.com)

#Patch: 17448420-Java Security Issue(Old Manifest file in jars)
File:p17448420_111200_Generic.zip (http://support.oracle.com)

3.Follow below link to install Weblogic Server
http://www.oracle-base.com/articles/11g/oracle-weblogic-server-11gr1-1035-installation-on-windows.php

4.Restart your machine and make sure that weblogic server is not in running status.
Simple check: http://localhost:7001/console should not open login page. (Replace localhost with your hostname)

5.Follow below steps to install Forms and Reports Classic 11g Home1.
Extract ofm_frmrpts_win_11.1.2.0.0_32_disk1_1of1.zip file into stage directory.
Open directory Disk1 and double click on setup.exe file.
 
 
 
 
 
 
6.Follow below steps to configure Forms and Report Development Enviroment.(if required)
Go to Start>Programs>OracleClassic11g-Home1>Configure Classic Instance.









7.Follow below steps to configure forms and report servers in existing weblogic server.
Go to Start>Programs>OracleClassic11g-Home1>Configure Classic Instance.
 
 
 
 
  
 
 
 

8.Your programs should look like this once all installations are done successfully.

9.Apply below patch to get latest version of OPatch. Enter correct version(in this case 11.1.1) when download the patch from metalink. After download, you need to copy OPatch folder from extracted directory and place it/override existing middleware OPatch folder. Take backup of existing OPatch folder.
Patch: 6880880 -OPatch Update
File:p6880880_111000_WINNT.zip

10.Apply below patch to override Java Security issues(Old Manifest file in jars). Download file from oracle metalink. Enter correct version(in this case 11.1.2) when download the patch from metalink.
Patch: 17448420 - Java Security Issue
File:p17448420_111200_Generic.zip

11.Check below links to confirm all servers are up and running status.
http://localhost:7001/console
http://localhost:9001/forms/frmservlet
http://localhost:9002/reports/rptservlet

if servers are not in running status then follow below order to start severs from Start>Programs>Oracle Classic Instance-asinst2
Start Weblogic Admin Server
Start Weblogic Server-WLS_FORMS
Start Weblogic Server-WLS-REPORTS

12.Create sample form using Forms Builder11g and compile. Copy .fmx file into any location on your drive(Should not have any spaces in the path).

13.Open Enterprise Manager Console(em)
http://localhost:7001/em

14.Click on "Forms" section from left side panel, click "Web Configuration" link to see configured applications details.

15.Create new Section by clicking on "Create" button and enter some name. This is the config name of your application. Enter Form field value as full path of your .fmx file. Including file name and extension. Leave remaining fields as it is.  Apply changes.

16.Now open your form and test it.
http://localhost:8888/forms/frmservlet?config=  [enter application config name]
 

Friday, May 30, 2014

What is new in R12

MOAC

Multi-Org in simple term means the implementation of multiple business units (or Organization) under a single installation of Oracle Applications. The concept of Multi-Org will manage the operations of an enterprise which has got subsidiaries across globe under a single oracle apps window, taking appropriate care of data security and data maintenance.
It decides how transactions flow through different organizations and how those organizations interact with each other.
  • By MOAC (Multiorg Access Control) , we can be able to access  multiple operating units at a time.
  • Mutiorg views were replaced with MOAC Based synonyms.
  • MO:Security Profile is a new profile added in R12.
  • VPD(Virtual Private Database) System will take care of  Data security in R12
  • Org Initialisation process in R12 :
begin
   mo_global.set_policy_context('S','204');
 end;
MOAC Synonym Initialization:
begin
   FND_GLOBAL.APPS_INTILISE('APPLICATION_ID','RESPONSIBILTY_ID,'USER_ID');
   MO_GLOBAL.INIT('SQLAP'); -- Application Short Name
end;

Module wise change 11i to R12

1) General Ledger :

  • gl_sets_of_books table was replaced with gl_ledgers and gl_ledger_Sets.
  • 4c’s comes in R12  Currency,Calendar,Chart of accounts, Accounting Convention , In 11i,  there are 3c’s ( Currency,Calendar,Chart of accounts)

2) Accounts Payable :

  • ap_invoice_lines_all table added in R12.
  • ap_invoice_distributions_all table populates the data when ever invoice gets accounted.
  • Supplier form was converted from form based solution to webbased solution.
  • po_vendors tables replaced with ap_suppliers tables.
  • Supplier and customer information was defined together Under TCA(Trading Community Architecture).
  • Accounting Tables were modified.
  • Both supplier and customer bank information was defined under payments(New application in R12) Application.
11i Tables R12 Tables
po_vendors ap_suppliers
po_vendor_sites_all ap_supplier_sites_all
po_vendor_contacts ap_supplier_contacts
ap_banks ce_banks
ap_bank_branches ce_bank_branches
ap_ae_headers_all xla_ae_headers
ap_ae_lines_all xla_ae_lines
ap_ae_accounting_events xla_events

3) Suppliers

11i Tables R12 Tables
po_vendors ap_suppliers
po_vendor_sites_all ap_supplier_sites_all
po_vendor_contacts ap_supplier_contacts
Additional supplier related tables in IBY (Payments) and HZ (TCA):
IBY_EXTERNAL_PAYEES_ALL – stores Payee(supplier) information.
HZ_PARTIES – Party data for the suppliers.
HZ_PARTY_SITES – Party site data for the supplier sites.

4) Invoices:

In 11i , Only two table ,AP_INVOICES_ALL, AP_INVOICE_DISTRIBUTIONS_ALL but R12 Additional table  AP_INVOICE_LINES_ALL
Allocations – AP_CHRG_ALLOCATIONS_ALL is obsolete in R12

5) Bank Account Details

11i R12
AP_BANK_ACCOUNTS_ALL CE_BANK_ACCOUNTS
AP_BANK_ACCOUNT_USES_ALL CE_BANK_ACCT_USES_ALL
AP_CHECK_STOCKS_ALL CE_PAYMENT_DOCUMENTS

 6) Sub-ledger Accounting

SLA is rule based accounting hub in Release 12 (R12) of the Oracle E-Business Suite of applications. SLA is used to derive all attributes required to account a transaction in Oracle General Ledger.
SLA can be configured in many ways to help derive accounting attributes such as the entered amount, accounted amount, date, currency code as well as the more complex attributes like ledger, code combination ID (CCID). SLA accounting attributes are interfaced to GL from SLA, thus in R12 no sub ledger application module (i.e. AP, PO, PA etc) interfaces the transactions directly to GL.
Create Accounting :  Subledger tables and xla_events -> xla_ae_headers, xla_ae_lines and xla_distribution_links
Transfer to GL -: xla_ae_headers and xla_ae_lines -> gl_je_headers and gl_je_lines
Post to GL : gl_je_headers and gl_je_lines -> gl_balances
Subledger Accounting Balances Update  :  xla_ae_headers and xla_ae_lines -> xla_control_balances
11i R12
AP_ACOCUNTING_EVENTS_ALL XLA_EVENTS
AP_AE_HEADERS_ALL XLA_AE_HEADERS
AP_AE_LINES_ALL XLA_AE_LINES

7) Trial Balance:

New R12 Table
XLA_TRIAL_BALANCES
AP_LIABILITY_BALANCE-> not used in new R12 transactions
AP_TRIAL_BALANCE -> not used in new R12 transactions

8) Taxes:
Functionality provided by E-Business Tax
New tables in R12
ZX_LINES – Detailed Tax lines for the invoice (trx_id = invoice_id)
ZX_LINES_SUMMARY – Summary tax lines for the invoice (trx_id = invoice_id)
ZX_REC_NREC_DIST – Tax distributions for the invoice (trx_id = invoice_id)
ZX_LINES_DET_FACTORS – Tax determination factors for the invoice (trx_id = invoice_id)

9) Order Management

RA_CUSTOMERS ,RA_SITE_USES_ALL ,RA_ADDRESSES_ALL views were removed in R12. in place of ra_customers,ra_site_uses_all,ra_addresses_all views need to use the below mentioned base tables.

  • HZ_CUST_ACCOUNTS
  • HZ_PARTIES
  • HZ_CUST_SITE_USES_ALL
  • HZ_CUST_ACCT_SITES_ALL
  • HZ_PARTY_SITES
  • HZ_LOCATIONS

Requisitions Import/Interface

Application.
Purchasing PO.

Validations.
. Requisition Type should not be null.
. Item Type should not be null.
. Item category should not be null.
. Item description should not be null.
. UOM should not be null and should be a valid one.
. Quantity should not be null and should not be negative or 0.
. Item Should exist in the system.
. Supplier should not be null.
. Ship to locaton should not be null.

Interface Tables.
PO_REQUISITIONS_INTERFACE_ALL.
PO_REQ_DIST_INTERFACE_ALL.

Base Tables.
PO_REQUISITION_HEADERS_ALL
PO_REQUISITION_LINES_ALL
PO_REQ_DISTRIBUTIONS_ALL

Import Program Name.
Requisition Import.

Source: http://www.surereddy.com/po-requisitions-interface.php

Friday, May 23, 2014

RowMatch: In-memory filter

RowMatch is used to apply in-memory a qualifying expression to rows in memory. The user specifies a SQL expression.

A RowMatch may be used stand-alone or used a qualifying RowMatch for a ViewObject. To use it stand-alone, one would create a RowMatch. Then, to see if a Row qualifies, one would invoke rowQualifies(Row). Here is an example:

    RowMatch rowMatch = new RowMatch("Deptno = 30");
    if (rowMatch.rowQualifies(row))
    {
       System.out.println("We have a row whose Deptno is 30");
    }

To use a RowMatch for a ViewObject, invoke ViewObject.setRowMatch(RowMatch). Rows will be qualified in-memory.

RowMatch differs from the where-clause of a database query statement mainly in that one should use row's attribute names as opposed to the database column names. Note that database column names are by default case-insensitive, while attribute names are case-sensitive.

Where-clause qualfication only applies to rows already exsiting in the database table. RowMatch will apply to rows as they are read from database query as well. Additionally, RowMatch is applied to rows that are created because of view link consistency.

View link consistency allows a RowSet to see new rows (unposted) created by another RowSet. Internally, when a new row is created by the other RowSet and the row's primary key is set, the original RowSet (if view link cosnsistency is on) receives an event indicating a new row has been created. This RowSet creates a row and inserts it in its collection. Before this copy row is inserted, it is tested against the view object's RowMatch. Only if the row qualifies will it be inserted.

If a qualification can be expressed in a query's where-clause, one should use the where-clause, because database will skip unqualifying rows. If one relies solely on the RowMatch for in-memory qualification, he may incur unnecessary performance overhead, because rows will be read from database query and formed in memory.

Unlike a where-clause, a RowMatch can evaluate expression involving transient attributes and not-yet-posted attribute values.

ViewLinkConsistency/AssociationConsitency

When multiple instances of entity-based view objects in an application module are based on the same underlying entity object, a new row created in one of them can be automatically added (without having to re-query) to the row sets of the others to keep your user interface consistent or simply to consistently reflect new rows in different application pages for a pending transaction.

#The default setting for this parameter is the word "DEFAULT" which has the following meaning. If your view object has:
-A single entity usage, view link consistency is enabled
-Multiple entity usages, and:
--If all secondary entity usages are marked as contributing reference information, then view link consistency is enabled
--If any secondary entity usage marked as not being a reference view link consistency is disabled.
#To set the feature programmatically, use the setAssociationConsistent(true) API on any RowSet. When you call this method on a view object, it affects its default row set
#If you call setWhereClause() on a view object to set a dynamic WHERE clause, the view link consistency feature is disabled on that view object.
#If a row set has view link consistency enabled, then new rows added due to creation by other row sets are added to the bottom of the row set.
#If a row set has view link consistency enabled, then when you call the executeQuery() method, any  qualifying new, unposted rows are added to the top of the row set before the queried rows from the
database are added.
#If viewCriteria is applied on VO2 instance, then framework switch off the association consistency mode at the view object level. This does not allow to reflect changes done in VO1 in VO2. We can programmatically enable it in VO2's executeQueryForCollection method by calling setAssociationConsistent(true).

/*Override below method in VO2Impl.java file to
protected void executeQueryForCollection(Object qc, Object[] params, int noUserParams) {
  super.executeQueryForCollection(qc, params, noUserParams);
  setAssociationConsistent(true);
}

More Details: http://radio-weblogs.com/0123729/

How to find modified rows of EO/VO

Sample Code from AM:

    public void findModifiedRow(){
        Iterator itr = EmpEOImpl.getDefinitionObject().getAllEntityInstancesIterator(getDBTransaction());
        while (itr.hasNext()) {      
            EmpEOImpl eEOImpl = (EmpEOImpl) itr.next();
           
            if (eEOImpl.getEntityState() == Entity.STATUS_NEW){
                System.out.println("Emp "+eEOImpl.getEmpId()+"is a new Row");
            }
            if(eEOImpl.getEntityState() == Entity.STATUS_MODIFIED ){
            System.out.println("Emp "+eEOImpl.getEmpId()+"is a modified Row");
            }          
            if(eEOImpl.getEntityState() == Entity.STATUS_DELETED){
                System.out.println("Emp "+eEOImpl.getEmpId()+"is a deleted Row");
            }              
        }
    }

Query Execution Modes of View Criteria

There are 3 types Execution modes for a view criteria that can be helpful in filtering out the data.

Database: The search results are filtered from the Database table every time the query is hit.
In Memory: The results are filtered from the VO cache memory. It will use the rows which are already in the row set. It will stop the unnecessary hits to the DB.
Both: The results are filtered from the existing row set and also from the filtered results from Database. This is useful when you want to filter from uncommitted records also.


How to trace ADF BC Queries

Set Java option as -Djbo.debugoutput=console in Run/Debug/Profile for the model project. This is just to trace the queries being executed at runtime.

The easiest way to set this system property while running your application inside JDeveloper is to edit your project properties and in the Run/Debug panel, select a run configuration and click Edit to edit it. Then add the string  -Djbo.debugoutput=console to the Java Options field.

What is View Link Consistency

When multiple instances (say VO1, VO2, VO3 etc) of an EO-based VO are based on the same underlying EO, a new row created in one of these VO instances (say VO1)can be automatically added (without re-query) to the row sets of the others (VO2, VO3 etc ). This capability is known as the view link consistency. This feature works for any VO for which it is enabled, regardless of whether they are involved in a view link or not.

Most Commonly Used ADF Business Components Methods

http://docs.oracle.com/cd/E15051_01/web.1111/b31974/appendix_mostcommon.htm#CACHIEBH

Thursday, May 22, 2014

JBO-25014: RowInconsistentException

Cause: Comparison of the cached entity failed with the values in the database for that entity. This could happen when another user or operation has committed modifications to the same entity-row in the database. This exception can also be thrown if the equals() method on one of the domain-type attributes in the entity fails.
Action: Choose from the following options:
  • Verify that another user or operation has not modified the same row in the database. If this entity has attributes of a domain type verify that the equals() method on these domains do not fail when comparing the existing cached value with the newly fetched value.
  • For any attributes/columns that are updated by the database, modify the entity attribute definition by selecting Refresh after update on the Attribute Settings page of the Entity Object Wizard.
  • Use view.executeQuery() frequently, especially after any operations that result in data being changed.
Related Posts Plugin for WordPress, Blogger...