Search This Blog

Sunday, March 14, 2010

11i Vs R12

Difference between 11i & R12

1. Oracle Purchasing
a) Document Types (Setup > Purchasing > Document Types)
11i - The form is Oracle native form based.
R12 - The GUI is self-service OAF page. As shown below,

b) Purchasing Options (Setup > Organizations > Purchasing Options)
11i - The form is Oracle native form based.
R12 - The GUI is self-service OAF page. As shown below,

c) Payables workbench is changed. In R12, now you can directly mention the PO number in the first screen itself instead of going to next screen saving 1 click compare to R11i.

d> Buyers setup GUI is self-service page.
e> Financial Options:
--GUI is still core form.
--Now no need to switch responsibilities to setup multi-org financial options.

f> Receiving Options - GUI is self-service page. No functionality change.

No Change-
1. Oracle Purchasing
a) No change in Purchase Order entry workbench-This remains the same as in 11i.
b> No change in Auto-create PO
c> PO workbench is mostly same

Tuesday, March 9, 2010

R12:How MOAC enviornment is setup programmatically

Pre-requisites for understanding how MOAC works in R12 are (Although these are not mandatory but knowledge of these would definitely help),

1. Setting ORG context prior to R12 version
Prior to R12, if you want to set ORG context in Oracle apps on any multi org table then following need to be done,

a. Create the table
b. Create a view on the table with following condition

WHERE NVL (org_id,
' ', NULL,
) =
' ', NULL,

As an example, let us consider the PO_HEADERS_ALL table. This is owned by PO schema having records for every operating unit. To implement Org security, a view has been created on top of it i.e. PO_HEADERS and is being owned by APPS schema.

If you see the content of this view, you would see the view has been created by accessing the value of CLIENT_INFO session field value which is being set by respective applications like PO, AP using DBMS_APPLICATION_INFO.SET_CLIENT_INFO API.

So, if you want to give the access only for US operating unit (lets assume the ORG_ID to be 100) then you set


If you query PO_HEADERS after the above statement is executed in your session then you would see all the POs only for operating unit 100. This is to secure the data as per the user access,

You can also use FND_CLIENT_INFO.SET_ORG_CONTEXT API to set the ORG context which ultimately uses the above to set the ORG context.


This is how all the applications (PO, AP etc) set the CLIENT_INFO field and set the ORG_CONTEXT prior to R12.

2. RLS (Row level security)

RLS feature was introduced in Oracle since Oracle 8i. The prime feature of RLS is implementing row level security while reading / inserting / deleting the data from the Database. In brief, you can use RLS to restrict data based on user permissions / privileges.

How MOAC works in R12
In R12, Oracle applications use RLS feature to implement MOAC.

Now going back to our same example- PO_HEADERS_ALL table.
In R12 these tables are still owned by PO schema but what changed is the view now no longer exist in R12. In R12, the multi org based views have been replaced with SYNONYMS in APPS.
So, for PO_HEADERS_ALL you now would see PO_HEADERS synonym in APPS schema pointing to APPS.PO_HEADERS_ALL table.

Now if you query the following in R12 APPS DB,


You would see the following,

As seen in the picture above, whenever you query PO_HEADERS in R12, the DB is going to apply the policy defined on this synonym which in turn would call MO_GLOBAL.ORG_SECURITY API. This API returns the predicates which would be automatically applied to the query by Oracle DB.
If you check the content of this API, you would see that it basically prepares the where condition for the ORG_ID to which user has access to, which is being read from the TEMP table MO_GLOB_ORG_ACCESS_TMP.
MO_GLOBAL.INIT API is there in "prior to R12" releases but it was not being used in the RLS and there is no policy defined on the multi-org enabled tables / views.

The temp table is populated when you set user / org context.

Prior to R12, FND_CLIENT_INFO.SET_ORG_CONTEXT is used to set the ORG context
This would set the ORG Context and then the multi org related views can be accessed which would return records only for that operating unit.

But from R12, following is used to set the org context

--Use FND_GLOBAL.APPS_INITIALIZE API to set the user environment
--Use MO_GLOBAL.INIT to populate the temp table MO_GLOB_ORG_ACCESS_TMP based on the responsibilities to which the user has access to and which would then be used by the RLS security policy.

After you set these up, if you query PO_HEADERS synonym then Oracle DB would automatically add the predicate (the list of operating units to which user has access to) to the query and would only return rows for the operating units to which user has access to.

For e.g. run the following in R12,
(Refer my earlier post on "how to setup MOAC in R12" to see the operating units that OPERATIONS user has access to)


,20639 ---responsibility "Payables Manager"
,200 ---Application "Oracle Payable"



Then query the temp table,
select * from MO_GLOB_ORG_ACCESS_TMP

Now the query returns the list of operating units to which OPERATIONS user has access to. And if you query from PO_HEADERS, you would see result from these operating units.

A. Oracle uses RLS to implement MOAC in R12
B. All multi-org tables now have synonym in APPS
C. The synonyms now have a policy defined which can be found in DBA_POLICIES
D. To setup multi-org context in R12 from the back end programmatically,

Monday, March 8, 2010

Oracle Applications 11i: Setup Queries

While doing any setup in Oracle Applications 11i, few questions always come in mind,

--Am I doing the right setup?
--Is it consistent with other Operating units except few intended differences specific to this Operating unit?
--Does it adhere to the overall naming conventions?

So, to address all the above questions and simplify setups in Oracle Applications 11i, I have listed some Oracle Financial and FND setup related queries. Executing these queries would most likely address the above questions and minimize human errors.

1. Oracle Financials 11i / Set of Books Query-

2. Oracle Payables Internal Bank Setup Query-

Sunday, March 7, 2010

R12: Setting up MOAC (Multi Org Access Control) in R12

Prior to R12, end users use to toggle / switch / change responsibilities in order to do transactions (like invoice / payment processing in AP) in different operating unit. This is a very time consuming and inefficient way of recording transactions when you have 100s of operating units specially Internet based organizations who have world wide operations in almost all the countries.

To address this, a new feature in R12 has been introduced in which user can switch between operating units within a responsibility something similar to "Change Organization" feature in inventory. Prior to R12, user would have to switch responsibilities in order to enter transactions in respective operating units (tagged to the responsibility).

To enable this feature, Oracle has provided MOAC (Multi Org Access Control) in R12 to achieve this functionality.
Most of the setup steps for this is similar to setting up of HR Security. So, if you know how to set HR security then setting MOAC is just a piece of cake.

Do the following setups as part of MOAC setup-

Step 1. Create Organization Hierarchy-
Navigate to Human Resource responsibility > Define Organization Hierarchy

Create an Organization Hierarchy as shown below. Here I have named it as "XXTech Vision". This is my Org hierarchy name.
This has following heirarchy,

Organization name (This would show-up all Organizations in the current business group):
Vision Corporation
--Vision Services
--Vision Leasing
--Vision Utilities

Once you set this up, you can see how your hierarchy looks like in the Organization Diagrammer as shown below,

Step 2- Create HR Security Profile as shown below (Navigation - Human Resources responsibility > Security > Profile)
Enter the values as shown in the below picture.

Step 3- The final step of the setup is to attach the HR security profile just created to the "MO:Security Profile" profile for the responsibility to which you want to have the MOAC functionality as shown in the below picture,

Step 4- Run "Security List Maintenance" concurrent request,
This process maintains the list of employees, organizations, positions, payrolls and applicants that security profile holders have access to. Schedule this request to run every night during quite hours if possible. If it is run when the users are logged in then users may experience unexpected results while doing transactions like additional employees / OUs may become visible or previously visible employees may no longer be visible for a brief period of time. Once the process completes then everything would work normal. If it does not run due to some reason then this can be manually run as shown in the picture,

Step 5- Test the setup
Now navigate to "Payables Manager" responsibility > Invoices Workbench > Click on the LOV of OU > It would show up all the organizations (setup as operating units that were part of the security profile > organization hierarchy as shown in the below picture,

With this new feature in R12, it can be seen that users just need to select the operating unit within same responsibility to do the transactions without leaving the responsibility and thus tremendously improve the processing efficiency.

R12: Getting list of operating units user has access to in R12

With the introduction of MOAC feature in R12, now user can access multiple operating units in subledgers without leaving the current responsibility. Sometimes we need to find out what operating units are accessible from a responsibility for an application (like AP, PO etc) for investigation / debugging purpose.

I have found two ways to get those details,

1. By setting MOAC enviornment from backend in PL/SQL and get the list of operating units from the temp table MO_GLOB_ORG_ACCESS_TMP,
For e.g.- If you want to see what operating units can be accessbile from OPERATIONS user through "Payables Manager" responsibility then run the below anonymous block,

--This sets the User enviornment---


,20639 ---responsibility "Payables Manager"
,200 ---Application "Oracle Payable"

MO_GLOBAL.INIT('SQLAP'); --This will initialize MOAC for AP application


Then querying below would give all the operating units user has access to,

select * from MO_GLOB_ORG_ACCESS_TMP

The downside of this script that you should have access privilege to execute FND_GLOBAL.APPS_INITIALIZE AND MO_GLOBAL.INIT

If you do not then alternate method is to write a query which would read HR security profile, HR Org hierarchy, FND profile etc and get you the list of OUs. Following query can be used for that which would give the list of OUs accessible from "Payables Manager" responsibility,

, fnd_profile_option_values b
, fnd_responsibility_vl c
, per_security_profiles_v d
, per_organization_structures a1
, per_org_structure_elements_v c1
, hr_operating_units d1
and (d1.organization_id = c1.ORGANIZATION_ID_CHILD
or d1.organization_id = c1.ORGANIZATION_ID_parent)
, fnd_profile_option_values b
, fnd_responsibility_vl c
, per_security_profiles_v d
, hr_operating_units d1

Wednesday, March 3, 2010

XML Publisher error -Unable to find the published output for this request

This is one of the most common issues when you try opening the output of an XML Publisher report output from the SRS screen.

As shown in the below screenshots, when you try to open the XML publisher report output you get below error,

When you see this error, check the concurrent request status.
There can be two possible reasons (that's what I could find yet),

1. If the Concurrent request goes to Warning status,
Check the log file. You would see a message something like this,

Start of log messages from FND_FILE
End of log messages from FND_FILE

Executing request completion options...

+------------- 1) PUBLISH -------------+
Beginning post-processing of request 26431776 on node xxxxxxxxyyyyy at 02-MAR-2010 20:36:43.
Post-processing of request 26431776 failed at 02-MAR-2010 20:36:43 with the error message:
One or more post-processing actions failed. Consult the OPP service log for details.

+------------- 2) PRINT -------------+

If this is the case then check the OPP log file located at following location in DB tier,

This happens if the XML data source and the XML Publisher template are out-of-sync i.e. if OPP does not find a perticular value in the XML data then it throws out this error. Check your template if it has all the valid XML elements in it and correct it if there is any difference.

2. Concurrent request completes normal but still there is no output and you get the above error. If this is the case then mostly the layout has not been setup properly prior to this request submission. You can see from the below screenshot, the layout has not been setup correctly.

There is a bug in Oracle wherein even if you set the layout parameters, it does not take. If that is the case then enter the layout parameter and then just re-enter the language setting by clicking the "language" button in the SRS screen.
And then submit the request. Now the report should get generated and you should be able to open the output.

Monday, March 1, 2010

Markview - Outbound emails not going

There is a known issue in Markview 170 systems wherein users complain that they are not getting approval email notifications though the approval item is in the right queue and users can see if they manually login to Markview 170 in their web inbox.

If this is the issue, then do the following,

1. Check "170 process mail gateway" if that is running fine.

2. If it gives error, then stop the process and then check if the test connection works by opening hte "170 mail gateway configuration" window and click on Test button. If it does not (generally happens if the DB user password was changed) then correct the setting there and then restart the process.

This should start processing the outbound emails.
To check if the mail gateway is processing the email notifications or not, you may use the following query,

select count(*)
from xxmv.sf_workitem_instance a
,xxmv.sf_queue b
where a.queue_id=b.queue_id
and b.QUEUE_NAME='New Mail'
and enqueued_timestamp>trunc(sysdate-20)

As can be seen from the above query, the queue name for new email notifications is "New Mail". That's the queue where the mail gateway checks for new emails that need to be sent.
If the mail gateway processes the emails then the COUNT from the above query should be reducing and should eventually become zero after successfully processing all the outbound email notifications.

A concurrent program can be designed and scheduled to monitor this table and if the count exceeds certain limit / thershold then send an email to a particular email address for monitoring purpose.