EBS multi-OU and multi-account Customization

Source: Internet
Author: User
EBS multi-OU and multi-account customization implementation (I) Multi-OU Summary 1. form multiple OU Implementation 1) create a Table, take CUX_AP_CHECK_HEADER_ALL as An Example 2) create two Synonym tables (one excluding _ ALL and one ending with _ ALL): CUX_AP_CHECK_HEADER and CUX_AP_CHECK_HEADER_ALL3) to Synonym: CUX_AP_CHEC without _ ALL

EBS multi-OU and multi-account customization implementation (I) Multi-OU Summary 1. form multiple OU Implementation 1) create a Table, take CUX_AP_CHECK_HEADER_ALL as An Example 2) create two Synonym tables (one excluding _ ALL and one ending with _ ALL): CUX_AP_CHECK_HEADER and CUX_AP_CHECK_HEADER_ALL 3) to Synonym: CUX_AP_CHEC without _ ALL

EBS multi-OU and multi-account Customization

(1) Summary of multiple OU

1. Form multi-OU implementation

1) create a Table. Take CUX_AP_CHECK_HEADER_ALL as an example.

2) create two Synonym tables (one excluding _ ALL and one ending with _ ALL): CUX_AP_CHECK_HEADER and CUX_AP_CHECK_HEADER_ALL

3) Add a policy function for Synonym: CUX_AP_CHECK_HEADER without _ ALL

Dbms_rls.add_policy (object_name => 'cux _ AP_CHECK_HEADER ',

Policy_name => 'org _ SEC ',

Policy_function => 'mo _ GLOBAL. ORG_SECURITY ',

Policy_type => dbms_rls.shared_context_sensitive );

4) create a view based on Synonym without _ ALL: CUX_AP_CHECK_HEADER_V

5) Add code when entering FORM (pre-form trigger:

Mo_global.init (& p_appl_shortname); -- p_appl_shortname is short for applications.

6) when selecting an OU (generally in the when_validate_item trigger), add the code: mo_global.set_policy_context ('s ', & p_org_id); -- p_org_id is the OU id

2. Report multiple OU implementation

1) set the business entity mode for the concurrent program: single, multiple, and null (default ). Generally set to 'singles'

The Business Entity mode corresponds to the multi_org_category field in the table fnd_concurrent_programs.

2) obtain the value of the current OU.

Use: mo_global.get_current_org_id or fnd_global.org_id

3) add OU restrictions to the parameters and logic of the report.

3. Multi-OU Implementation of GL data

1) obtain the value of the current OU.

Use: mo_global.get_current_org_id or fnd_global.org_id

2) According to OU's value worth to the department section:

DECLARE

Rochelle segment1 VARCHAR2 (150); -- Department Section

BEGIN

SELECT o3.attribute5

INTO l_segment1

FROM hr_all_organization_units o,

Hr_all_organization_units_tl otl,

Hr_organization_information o2,

Hr_organization_information o3

WHERE o. organization_id = o2.organization _ id

AND o. organization_id = o3.organization _ id

AND o2.org _ information_context = 'class'

AND o3.org _ information_context = 'operating Unit information'

AND o2.org _ information1 = 'operating _ UNIT'

AND o2.org _ information2 = 'y'

And o. organization_id = otl. organization_id

And o. organization_id = & p_org_id-OU id

AND otl. LANGUAGE = USERENV ('lang ');

END;

3) use the value obtained in step 2 as a condition:

SELECT gl_code_combinations gcc WHERE gcc. segment1 = l_segment1;

4. Summary of multiple interfaces

1) set the business entity mode for the concurrent program: single, multiple, and null (default ). The Business Entity mode corresponds to the multi_org_category field in the table fnd_concurrent_programs.

2) If the OU in the import program of the interface is used as a parameter, all OU should be made a loop.

5. expand knowledge with multiple OU

1) Register and cancel MOAC Control for custom applications

Fnd_mo_product_init_pkg.register_application (register an Application)

Fnd_mo_product_init_pkg.remove_application (cancel Application)

View the application SQL that supports MOAC:

SELECT * FROM fnd_mo_product_init;

2) Register and cancel policies for database objects-policy

Dbms_rls.add_policy (registration policy)

Dbms_rls.drop_policy (Cancellation Policy)

3) tables involved in multiple OU

A) check whether a policy is added to the database object-policy

SELECT * FROM dba_policies;

B) view the OU that can be accessed by the current session

SELECT * FROM mo_glob_org_access_tmp;

C) view the context value of the current session application (Note: The OU value is saved in context)

SELECT * FROM dba_context dc WHERE dc. namespace LIKE 'multi % ';

Application context used by MOAC: MULTI_ORG, MULTI_ORG2

(2) Summary of multiple sets of books

1. Multi-account shield in custom development

1) obtain the value of the current OU.

Use: mo_global.get_current_org_id or fnd_global.org_id

2) obtain the Set id and company name based on the Organization id. The SQL statement is:

DECLARE

Rochelle _ information3 VARCHAR2 (150); -- Set id

Rochelle company_desc VARCHAR2 (150);-company description

BEGIN

SELECT o3.org _ information3, o3.attribute3

INTO l_org_information3, l_company_desc

FROM hr_all_organization_units o,

Hr_all_organization_units_tl otl,

Hr_organization_information o2,

Hr_organization_information o3

WHERE o. organization_id = o2.organization _ id

AND o. organization_id = o3.organization _ id

AND o2.org _ information_context | ''= 'class'

AND o3.org _ information_context = 'operating Unit information'

AND o2.org _ information1 = 'operating _ UNIT'

AND o2.org _ information2 = 'y'

AND o. organization_id = otl. organization_id

AND otl. language = USERENV ('lang ')

AND o. organization_id = & p_org_id; -- OU id

END;

3) obtain the base currency. The SQL statement is:

DECLARE

Rochelle local_currency_code VARCHAR2 (15); -- base currency

BEGIN

SELECT gsob. currency_code

INTO l_local_currency_code

FROM gl_sets_of_books gsob, hr_operating_units hou

WHERE gsob. set_of_books_id = hou. set_of_books_id

AND hou. organization_id = & p_org_id; -- OU ID

END;

4) add a set of books in the program and the restrictions of the local currency

2. Implement expansion with multiple sets of books

1) the SQL statement for getting the set of books is:

SELECT * FROM gl_ledgers;

2) obtain the legal person's SQL statement:

SELECT * FROM xle_entity_profiles;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.