Sei sulla pagina 1di 7

The Multi-Org views are based on the Multi-Org tables that are partitioned by Op erating Unit (ORG_ID).

A type of Organization called an "Operating Unit" secures your application data. This can be verified by looking at the MULTI_ORG_FLAG in FND_PRODUCT_GROUPS tabl e. The MULTI_ORG_FLAG is 'N' or NULL in a non Multi-Org database and Y in a MultiOrg database.

SELECT * FROM <table name>_ALL WHERE NVL(ORG_ID,NVL(TO_NUMBER(DECODE(SUBSTRB(USE RENV( CLIENT_INFO ),1,1), , NULL, SUBSTRB(USERENV( CLIENT_INFO ),1,10))), 99)) =NVL(TO_NUMB R(DECODE(SUBSTRB(USERENV( CLIENT_INFO ),1,1), ,NULL,SUBSTRB(USERENV( CLIENT_INFO ),1,10))) , 99) If you have not enabled Multi-Org in your database, the CLIENT_INFO org context is not set. In such case, the views return only the rows that have NULL value fo r ORG_ID column. The ORG_ID value can be a positive integer or can be NULL. Any other value will not be retrieved by the views. Global data is stored with NULL ORG_ID value. AD_MORG package lists all Multi-Org tables, and whether the tables contain seed data to be replicated. The MO_GLOB_ORG_ACCESS_TMP table is used to store the list of Operating Units to which a Responsibility has access. What public APIs are available in the MO_UTILS package? The following public APIs are available: Get_Legal_Entity_Name, which retrieves the Legal Entity ng Unit Get_Legal_Entity_Info, which retrieves the Legal Entity for a given Operating Unit Get_Set_Of_Books_Name, which retrieves the Set of Books ng Unit Get_Set_Of_Books_Info, which retrieves the Set of Books for a given Operating Unit Get_Multi_Org_Flag, which retrieves if the database has Org (Y) or not (N or NULL)

Name for a given Operati Id and Legal Entity Name Name for a given Operati Name and Set of Books Id been converted to Multi-

There are two types of seed data: shared and replicated to every Operating Unit. A shared seed data row has an ORG_ID value of -3114. What is an Operating Unit? In the financial applications of Oracle's E-Business Suite, an Operating Unit is a type of Organization Classification through which you secure transaction data . You create, process, and report on financial applications data within the cont ext of an Operating Unit. An Operating Unit can be used to model an autonomous b usiness unit that performs one or more business activities and creates transacti ons with financial impact. Each unique Chart of Accounts structure is associated with a unique Set of Books . Each Set of Books is then associated with an Operating Unit during the organiz ation setup. A Set of Books can be tied to one or many Operating Units. Thus, ea ch Operating Unit can be tied to a different Set of Books, each having a differe nt Chart of Accounts structure. How does Business Group relate to Multi-Org?

Business Group is a security concept used by Oracle HRMS products, and is typica lly tied to country-specific legislation. It represents the highest level in the organization structures that can be modeled in E-Business Suite. Business Group may represent the consolidated enterprise, a major division, or an operating co mpany. The organization type of Business Group partitions data for the Human Resources applications within E-Business Suite. Each application Responsibility maps to a specific Business Group. This means that you can only see people and organizatio ns (including Operating Units) that belong to the Business Group associated with your application Responsibility. All of your Sets of Books can share the same Business Group if they share the sa me Business Group attributes, including HR flexfield structures. All organizations defined in HRMS, including Operating Units, belong to a Busine ss Group. Overview of Multiple Organizations Architecture (prior to Release 12)----------The system administrator creates operating units using the Define Organizations window in Oracle Human Resources Management System (HRMS), and runs the Convert to Multiple Organization program from AD Administrator to enable the multiple or ganizations feature. Typically, the system administrator defines "MO: Operating Unit" profile at Responsibility and/or User level. The "organization_id" of the "MO: Operating Unit" profile option value filters the transactional data. Multi-Org views use the following WHERE clause to filter application records: 'org_id = substrb(userenv(''CLIENT_INFO''),1,10)' Overview of Multiple Organizations Access Control Architecture (Release 12)---------To increase the flexibility and performance in a multiple organizations environment and provide the same level of data security, the DBMS Virtual Private Database (VPD) feature replaces the CLIENT_INFO function.

only way business users can access the screens or concurrent program reports is via responsibilities. AP_INVOICES_ALL - holds all invoices HZ_PARTIES - trading partners HZ_CUST_ACCOUNTS_ALL HR_ALL_ORGANIZATION_UNITS - Master table for Organizations hr_operating_units any table in E-Business Suite that has its name ending with _ALL supports MultiOrg HZ_% tables belong to the Trading Community Architecture (TCA) module 11i --In the Multi-Org model of E-Business Suite 11i, there is a one-to-one relation b etween a responsibility and an operating unit. fnd_global.apps_initialize MO: Operating Unit CLIENT_INFO The Oracle product team delivers a synonym named AP_INVOICES_ALL in the APPS schema. The name of this synonym is exactly the same as the table name that exis ts in the AP schema, and it points to the table AP.AP_INVOICES_ALL. Finally, a Multi-Org view named AP_INVOICES is seeded by the Oracle product team. create table AP_INVOICES_ALL ( INVOICE_ID NUMBER(15) not null ,..... ,ORG_ID NUMBER(15) default to_number(decode(substrb(userenv('CLIENT_ INFO'),1,1) .. ,' ',null,substrb(userenv('CLIENT_INFO'),1,10))) ) ; create or replace synonym ap_invoices_all for ap.ap_invoices_all; CREATE OR REPLACE VIEW AP_INVOICES AS

SELECT * FROM ap_invoices_all WHERE nvl(org_id,nvl(to_number(decode(substrb(userenv('CLIENT_INFO') ,1,1),' ',NULL,substrb(userenv('CLIENT_INFO'),1,10))),-99)) = nvl(to_number(decode(substrb(userenv('CLIENT_INFO'),1,1), ' ',NULL,substrb(userenv('CLIENT_INFO'),1,10))),-99); DECLARE l_user_id INTEGER; l_resp_id INTEGER; l_resp_appl_id INTEGER; BEGIN SELECT user_id INTO l_user_id FROM fnd_user WHERE user_name = 'OPERATIONS'; SELECT responsibility_id INTO l_resp_id FROM fnd_responsibility_vl WHERE responsibility_key LIKE 'PAYABLES_OPERATIONS'; SELECT application_id INTO l_resp_appl_id FROM fnd_responsibility_vl WHERE responsibility_key LIKE 'PAYABLES_OPERATIONS'; fnd_global.apps_initialize(user_id => l_user_id ,resp_id => l_resp_id ,resp_appl_id => l_resp_appl_id); END; /

R12 --If the payables clerk working in a shared service center is using E-Business Suite 11i, he or she will have to switch the responsibility each time an invoice from a different operating unit is keyed in, which is not ideal for efficient processing of transactions. Additionally in R11i Multi-Org model, a large organization will have to maintain several responsibilities. If a change has to be made to one responsibility, for example a menu exclusion, then such changes may have to be replicated across all related respon sibilities for different operating units. In R12, the new Multi-Org model is implemented using HRMS Organization Hierarchy and Security Profiles. In MOAC, more than one operating unit is accessible from a single responsibility . All the screens that operate on Multi-Org tables have an Operating Unit field. The value of the Operating Unit field is defaulted using MO: Default Operating U nit mo_global.init FND_MO_PRODUCT_INIT MO: Security Profile

A record is then inserted in table mo_glob_org_access_tmp for each operating unit that can be accessed from that responsibility. Execute PL/SQL API fnd_access_control_util.add_policy The Technical Impact of MOAC on Release12 Upgrade-------to ensure that existing custom Multi-Org views are replaced by synonyms that are secured using Row Level Security. An additiona l impact of upgrading to R12 is that for every custom form that references Multi-O rg data, an Operating Unit field must be created. The value in this field will be default ed using the profile option MO: Default Operating Unit. This field will also be attached to the list of values. To enable the concurrent program to be run for multi-org users as per the MultiOrg Security Profile, follow these steps: 1. Navigate to the System Administration responsibility and navigate to Concurre nt | Program to open the Concurrent Program definition screen in OA Framework. 2. Search for the concurrent program definition that you want to run for all the operating units that are applicable to the responsibility. 3. Click the Update icon for that program, and select the Request tab. Change th e value of the Operating Unit Mode field to Multiple. (By default, this is set to Single.) When submitting concurrent programs with a single operating unit programmaticall y from PL/SQL, you can set the context to the relevant operating unit, as shown ne xt: fnd_request.set_org_id(101); --Your org id here. 101 is just an example fnd_request.submit_request('PO', 'POXPRPOP', '', '', .......); Table creation definitions may contain a default clause for the ORG_ID column. In case MOAC is enabled, you will have to specify the org_id explicitly in the insert statements. Therefore, the default clause on the ORG_ID column must be removed from all custom tables. select multi_org_flag from fnd_product_groups; MTL_PARAMETERS Stores the set of general default options like GL accounts, locator, lot and serial number controls, costing method, inter-org options, costing org and item master, etc This table is populated by the org parameters form INVSDOIO. It is accessed by a wide variety of forms, reports, user exits, and concurrent programs throughout the manufacturing modules. ORGANIZATION_ID is the primary key. This is the most heavily used Organization table in the manufacturing products. HR_ORGANIZATION_UNITS Stores generic information about the organizations. This is an excellent place

to go if you need to see the relationship between org id and Business group id when troubleshooting a multi-org problem. ORGANIZATION_ID is the primary key for this table. BUSINESS_GROUP_ID is a foreign key. This table is used by a variety of org setup and item setup forms. What are the relationships I can define in a multi org environment? You define the relationships among inventory organizations, operating units, leg al entities, Business Groups, and sets of books to create a multilevel company s tructure: Business Groups separate major segments of a business. Each can have its own set of books. Each Group will also have a structure of other organizations clas sifications assigned to it. Legal Entities post to a Set of Books Operating Units are part of a Legal Entity Inventory Organizations are part of an Operating Unit Inventory Organizations define and maintain items used by other manufacturin g modules (Order Entry, Purchasing, MRP, etc.). They also collect and pass data to the Financials modules. All Organizations (BG, OU, IO etc) have organization ids. The Organization id of an OU is also called org_id Whether it is an ORG_ID or Inventory Organization Id or HR Organization, all the se Organizations are stored in one single table. That table is named HR_ALL_ORGANIZATION_UNITS. Now, each such Organization recor d in HR_ALL_ORGANIZATION_UNITS can be assigned Classifications. One snigle Organization can be assigned multiple classifications if required. For example, if you attach it a classification of "Operating Unit", then it can be used as a ORG_ID, by the virtue of profile option "MO: Operating Unit" If you attach that Organization record in HR_ALL_ORGANIZATION_UNITS a classification of "HR Organization", then it becomes HR Org. You can assign a classification of "Inventory Organization", hence flagging it a s Inventory Warehouse. Lets take an example, 1. Your company name is Smrati Inc 2. Smrati inc has various departments like IT, Payables, Purchasing Dept etc. In such case, you will define 4 records in hr_all_organization_units table record 1:- smrati inc [id=101] record 2:-payables dept [id=102] record 3:-it dept [id=103] record 4:-purchasing dept [id=104] However, only Smrati Inc will be registered as an operating unit in this case. Hence your org_id will be 101, i.e. hr_all_organization_units.organization_id of Smrati Inc. org_id is the organization_id of the operating unit. All organizations are maintained in HR_ALL_ORGANIZATION_UNITS table and organiza tion classifications like Legal entity or operating unit information are stored in HR_ORGANIZATION_INFORMATION table. There are 3 views provided based on these 2 t ables to easily

find out the Legal entity, Operating unit and Inventory organization. These are:1)HR_LEGAL_ENTITIES 2)HR_OPERATING_UNITS 3)ORG_ORGANIZATION_DEFINITIONS Query to find the business groups set up in the instance : select FND_PROFILE.VALUE('PER_BUSINESS_GROUP_ID')from dual; Query to find SOBs set up in the instance : select FND_PROFILE.VALUE('GL_SET_OF_BKS_ID'); Query to find legal entities associated with a SOB : select organization_id legal_entity_id from hr_legal_entities where set_of_books_id = (SET OF BOOKS ID) and business_group_id = (BUSINESS GROUP ID) Query to find operating units for a legal entity : select organization_id operating_unit from hr_operating_units where legal_entity_id= (legal_entity_id) Query to find inventory organizations for an operating unit : select organization_id from org_organization_definitions where operating_unit= (operating_unit)

Potrebbero piacerti anche