Вы находитесь на странице: 1из 10

7/14/2016

MOACOracleAppsORG_ID,MultiOrgConcept|OracleAppsDNA

D oyou w an ttomeetyou rfellow OracleA p p s C on s u ltan ts ??th en join u s @Faceb ook

Home
AboutMe:ShailenderThallam
Contact
OracleAppsInterviewQuestions
AskaQuestion
Searchthearchive...

HomeOracleAppsBasics

MOACOracleAppsORG_ID,MultiOrgConcept
5February20123,819views3CommentsArticlebyShailenderThallam

Sr. Systems Engineer 7-12 Years...


Skilliantech India Private Limited testing,scripting,unit testing,data
structures,core...
Monster India

Itsquiteobviousthatanorganizationmayhaveitsoperationsindifferentlocationsoftheglobewhichwecallas
operatingunitsintermsoforacleERP.

MultiOrgArchitecturePriortoRelease12
Toaccommodatedataofdifferentoperatingunitsinonetable,Oraclehascomeupwithacolumn
ORG_ID.ForexamplePO_HEADERS_ALL.org_idiscolumnwhichstoresoperatingunitID.
WhereasthetablePO_HEADERS_ALLisstoredinPOSchemaandaVIEWPO_HEADERSispresent
inAPPSSchemawhichwouldonlyreturnrowswhichcorrespondedtothecurrentoperatingunits
organizationID.
AviewintheAPPSschemaprovidestheMultiOrgfilteringbasedonthestatementbelowinthewhere
clause.
SUBSTRB(USERENV('CLIENT_INFO'),1,10)

Whenloggingintotheapplications,theCLIENT_INFOvaluewassettotheappropriateoperatingunit
http://oracleappsdna.com/2012/02/moacoracleappsorg_idmultiorgconcept/

1/10

7/14/2016

MOACOracleAppsORG_ID,MultiOrgConcept|OracleAppsDNA

organizationIDforthesessionbasedontheprofileoptionsettingforMO:OperatingUnit.
InSQL*Plus,CLIENT_INFOcouldbesettopointtoaparticularoperatingunitusing
EXECUTEdbms_application_info.set_client_info('');

MultiOrgArchitectureinRelease12
Inrelease12amoreflexiblearchitecturehasbeenputinplacetosupportMultiOrgAccessControl(MOAC).
Thisarchitectureallowsuserstodefinesecurityprofilessothatusersmayaccessdataformorethanone
operatingunitwithinasingleresponsibility.
Toaccomplishthis
Multiorgviewshavebeenremoved,andreplacedwithsynonyms.Forexample,PO_HEADERSwould
nolongerbeaVIEWdefinedonPO_HEADERS_ALL,butratherasynonymwhichpointsto
PO_HEADERS_ALL
PO_HEADERSandPO_HEADERS_ALLarebothsynonymswhichpointtothetable
PO.PO_HEADERS_ALL.However,theviewPO_HEADERS_ALLisunrestricted,whereas,
PO_HEADERSwillonlydisplaydatafortheuserscurrentoperatingunit(s)becauseoftheVPDpolicy
thathasbeenassignedtoit
Thedatarestrictionisaccomplishedbyassigningavirtualprivatedatabase(VPD)policyalsoknownas
RowLevelSecurity(RLS)tothesynonym.Thispolicyallowsthesystemtodynamicallygenerate
restrictingconditionswhenqueriesarerunagainstthesynonym
DatarelatingtodefinedVPDpoliciesisviewableinthedatadictionaryviewDBA_POLICIES.These
policiesassociateafunctionwithanobject,andwhentheobjectisaccessed,thisfunctioncanreturn
additionalrestrictionsontheobjecttorestrictthedatareturned.Theparticularpolicyusedtoimplement
MultiOrginrelease12is:
a.Policy_name:ORG_SEC
b.Policy_group:SYS_DEFAULT
c.Package:MO_GLOBAL
d.Function:ORG_SECURITY
ARowLevelsecurityisappliedtoPO_HEADERS,usingpackagefunction
MO_GLOBAL.ORG_SECURITY.Belowquerywillhelpyoutofindoutthesecuritypolicyappliedon
PO_HEADERS
SELECT*FROMdba_policiesWHEREobject_nameLIKE'PO_HEADERS';

Witheffectofthissecuritypolicy,wheneveryouaccessPO_HEADERS,OracleRLSwilldynamically
appendWHERECLAUSEsimilartobelow
SELECT*
FROMPO_HEADERS
WHEREEXISTS
(SELECT1FROMmo_glob_org_access_tmpoaWHEREoa.organization_id=org_id
)

MO_GLOB_ORG_ACCESS_TMP:
MO_GLOB_ORG_ACCESS_TMPisaglobaltemporarytable.Thecurrentsessionisableseedatathatit
placedinthetablebutothersessionscannot.Datainthetableistemporary.Ithasadatadurationof
SYS$SESSION.Dataisremovedattheendofthisperiod.Theuserwillbeabletoaccessdataforany
org_idwhichhasbeenpopulatedintomo_glob_org_access_tmp.Whenasessionisinitializedinthe
applications,valueswillbepopulatedintomo_glob_org_access_tmpforeachoftheoperatingunitsthe
userhasaccesstobasedontheirMO:SecurityProfilesetting.

MoreaboutMO_GLOBAL.ORG_SECURITY
http://oracleappsdna.com/2012/02/moacoracleappsorg_idmultiorgconcept/

2/10

7/14/2016

MOACOracleAppsORG_ID,MultiOrgConcept|OracleAppsDNA

ThepurposeofRowLevelSecurityistohidecertaindata[basedonsomeconditions].RLSdoessoby
appendingawhereclausetothesecuredobject.
1.MO_GLOBAL.ORG_SECURITYisafunctionthatreturnsapredicatefortheWHERECLAUSE
2.ThewhereclausewillbeappendedtoTable/Synonym/ViewforwhichMultiOrgRowLevelsecurityis
enabled

HowtosetOrgContextinR12?
BEGIN
EXECUTEmo_global.set_policy_context('S',&org_id);
END;
'S'meansSingleOrgContext.

Where
1.optionSisusedtofetchrecordsfromspecifiedorg_id
2.optionMisusedtofetchrecordsfromallaccessibleOperatingUnits
3.optionAisusedtofetchrecordsfromallOperatingUnits
Ifyouwantaccesstomultipleorganizationdata,youcanchangethefirstparametertoM(formultipleorgs),
allorganizationsaccessiblebyuser:
BEGIN
apps.mo_global.set_policy_context('M','');
END;

Howtocheckifuserhasaccesstoaparticularorganization?
SELECTorganization_id,
name,
mo_global.check_access(ORGANIZATION_ID)accessible
FROMHR_OPERATING_UNITS;

Otherprocedures/functionsofMO_GLOBALAPIarelistedbelow:
Purpose

Procedure/Function

Description

Initialize

INIT

Setupmultipleorganizationscontext.

JTTinitialize

JTT_INIT

InitializemultipleorganizationsforJTTbasedapplication.

Ismultiorgenabled

is_multi_org_enabled

Checkifthemultipleorganizationsinstanceisenabled.

Checkaccess

check_access

Checkiftheoperatingunitisaccessible.

GetOUname

get_ou_name

Gettheoperatingunitname.

Checkvalidorg

check_valid_org

Checkiftheorganizationisvalid.

Setpolicycontext

set_policy_context

Settheapplicationpolicycontext.

GetcurrentorgId

get_current_org_id

GetthecurrentorganizationIDintheapplicationcontext.

Getaccessmode

get_access_mode

Gettheapplicationcontextmode.

http://oracleappsdna.com/2012/02/moacoracleappsorg_idmultiorgconcept/

3/10

7/14/2016

MOACOracleAppsORG_ID,MultiOrgConcept|OracleAppsDNA

GetOUcount

get_ou_count

Gettheoperatingunitcountontheaccesscontrollist.

Getvalidorg

get_valid_org

Getthecurrentdefault/validorganization.

ValidateorgidpublicAPI

validate_orgid_pub_api

Getthedefaultorganizationandcheckiftheorganizationisvalid.

IsMOinitializationdone

is_mo_init_done

Checkifthemultipleorganizationisinitialized.

FormoreinformationontheaboveAPIsandhowtousethem,pleasegothroughOraclesIntegration
Repository

HowtocheckifanOrganizationispresentisSecurityProfileornot?
WehaveanotherMOACutilityAPIMO_UTILSwhichcanbeusedinreportsandextensions.
SELECTorganization_id,
name,
mo_utils.check_org_in_sp(ORGANIZATION_ID,'OPERATING_UNIT')accessible
FROMHR_OPERATING_UNITS;
ReturnsYorNdependingonwhetheruserhasaccesstogivenorganization

Otherprocedures/functionsofMO_UTILSAPIarelistedbelow:
Purpose

Procedure/Function

Description

Purpose

Procedure/Function

Description

GetLedgerName

Get_Ledger_Name

Returnstheledgername.

Getledgerinformation

Get_Ledger_Info

Returnsinformationabouttheledger.

GetDefaultoperatingunit

get_default_ou

GetsthedefaultoperatingunitfromMO:DefaultOperatingUnitprofileor
fromcurrentorganization.

GetDefaultoperatingunit
Id

get_default_org_id

ReturnstheorganizationIDofthedefaultoperatingunit.

Checkorginsecurity
profile

check_org_in_sp

Checksifthespecifiedorganizationispresentinthesecurityprofile.

Checkledgerinsecurity
profile

check_ledger_in_sp

Checksifalloperatingunitsofaledgerareincludedinthesecurityprofile.

Getorganizationname

Get_Org_Name

ReturnstheoperatingunitnameforanorganizationID.

GetorganizationIDsfor
theledger

get_orgid_fr_ledger

ReturnstheoperatingunitIDandthenumberofoperatingunitsinthe
givenledger.

Pleasedropacommentifyouneedanymoreadditionalinformation,Iwilldomybesttohelpyouout.

ForFurtherReading
1.DebugginganInternalRequisitionwhichnotturnedtoanInternalSalesOrder

http://oracleappsdna.com/2012/02/moacoracleappsorg_idmultiorgconcept/

4/10

7/14/2016

MOACOracleAppsORG_ID,MultiOrgConcept|OracleAppsDNA

Bangalore

OracleAppsDNA.Com
1,270likes

Chennai
Startingfrom

Rs280
LikePage

Share

Bethefirstofyourfriendstolikethis

WOW!Didyoulikethispost?We'llsendmoreinterestingpostslikeMOACOracleAppsORG_ID,
MultiOrgConcepttoyou!
EnteryourEmailAddress:
Enteryouremailaddress
SubscribeMe!

http://oracleappsdna.com/2012/02/moacoracleappsorg_idmultiorgconcept/

5/10

7/14/2016

MOACOracleAppsORG_ID,MultiOrgConcept|OracleAppsDNA

2Comments
Recommend

OracleAppsDNA

Share

Login

SortbyOldest

Jointhediscussion
Kishankulakarni1 4yearsago

Hi,
canuexplainindetail..
whatistheconceptofrowlevelsecurityinappsr12..whatistheconceptofmotemptableinr12.
howwillweachieverowlevelsecurityfornewcustomtables..
explainwhatexaclyhapenafterintilizingorgidinr12/
EXECUTEmo_global.set_policy_context('S',&org_id)

Reply Share

ShailenderThallam

Mod >Kishankulakarni1 3yearsago

HiKishan,
1.)RLSwoulddynamicallyaddawhereconditiontothesynonymstoretrieveorgspecificdata
2)Todealwithcustomtablesweneedtosettheorgcontextbeforeaccessingthem,provided
thecustomtableshouldhaveorgspecificdata.
3)Settingorgcontextwouldrestrictdatatoaparticularorganizationforthatsession.The
objectswouldfetchORG_IDfromMOCurrentContext,whichissetbytheorgcontext.
Pleaseletmenowifyouneedanymoreinformation.Iwouldbehappytosharewithyou..Keep
visitingmyblog.
Thanks,
Shailender

Subscribe

Reply Share

AddDisqustoyoursiteAddDisqusAdd

Privacy

RecentPostsfromthisCategory
HowtoGenerateDebugLoggingforCustomExtensions
StepsToClearCacheUsingFunctionalAdministratorforOAPages
WhatistheroleofaFunctionalConsultantinSupportandImplementationProject?
FND_GLOBALandFND_PROFILE:ImportListofSystemGlobalvalues
http://oracleappsdna.com/2012/02/moacoracleappsorg_idmultiorgconcept/

6/10

7/14/2016

MOACOracleAppsORG_ID,MultiOrgConcept|OracleAppsDNA

MD50,MD70andMD120TemplatesFreeDownload
HowtoScheduleaconcurrentprogramfromBackend
DifferencebetweenValuesetsandLookups
WhatistheroleofaTechnicalConsultantinSupportandImplementationProject?
DBLinkinOracleSQL
HowtodownloadinstancecompatibleJREPlugin

STAYCONNECTED
SubscribeFREEupdatesonyourEmail|RSS

Enteryouremailaddress

Subscribe

COPYRIGHT

ThisworkislicensedunderaCreativeCommonsNonCommercial2.5License.
http://oracleappsdna.com/2012/02/moacoracleappsorg_idmultiorgconcept/

7/10

7/14/2016

MOACOracleAppsORG_ID,MultiOrgConcept|OracleAppsDNA

Tags

AdhocroleBusinessEvents

creatingadhocroleDiagnosticsErrbuf

concurrentmanager CostManager

FNDLOADFNDLOADdownloadFNDLOADuploadFND_DEVELOPER_MODEFND_DEVELOPER_MODEinroutine

fnd_request.submit_request

Howtoportreportsfromoneinstancetoanother HRMSProfileOptions

hz_locationsiStoreitemsnotavailableldtfilesLineStatusFlowMOACMoveTransactionManagerPendingResourceTransactions
personalizationpl/sqlproceduresportingreportsprofileoptionProfileoptionsReportsRetcodeSalesOrderlineStatusFlowShipConfirmbuttongreyedShipping
TransactionsformtablesuffixWIP_COST_TXN_INTERFACE _A_ACN_ALL _AVN_B_F_S_TL _V_VL

Categories
Alerts(2)
AOLandSYSADMIN(33)
AOLSQLScripts(22)
APIs(3)
BusinessEvents(3)
Costing(1)
CustomPLL(1)
DataConversions/Interfaces(2)
Extensions(1)
GeneralLedger(2)
HRMS(4)
InterviewQuestions(8)
Inventory(7)
iRecruitment(1)
iStore(1)
OAF(8)
OPM(4)
OracleAppsBasics(18)
OracleLearningManagement(4)
OracleSQL(17)
OrderManagement(13)
Payables(3)
Payments(6)
Personalizations(4)
PL/SQL(18)
ProfileOptions(5)
Purchasing(5)
Receivables(7)
Reports(2)
Scripts(7)
Security(1)
ShippingExecution(2)
Uncategorized(2)
Unix/ShellScripts(1)
WIPJobs(1)
Workflows(21)
XMLP(12)

RecentPosts
http://oracleappsdna.com/2012/02/moacoracleappsorg_idmultiorgconcept/

8/10

7/14/2016

MOACOracleAppsORG_ID,MultiOrgConcept|OracleAppsDNA

PL/SQLScripttoInactiveandDeleteAdhocRole
AdhocRolesinOracleWorkflow
PL/SQLScripttoRemoveandAddUserstoAdhocRole
PL/SQLScripttoCreateAdhocRole
WhatisaRoleinOracleWorkflow
QuerytolistallDocumentsandtheirinformationunderaPaymentProcessRequest
QuerytolistSupplierBank,BankBranch,BankAccountinformation
QuerytolistBank,BankBranch,BankAccountinformationOperatingUnitwise
DeloitteisHiringBSc(Computers/IT)orBCA.studentswith01yearsexperience
HowtosetORG_IDforMOACEnabledConcurrentProgramswhileSubmittingfromBackend

MostViewed
MD50,MD70andMD120TemplatesFreeDownload20,999views
[DecryptingUserPassword]HowtofindpasswordofaUserinOracleAppsR12?19,450views
XMLPublisherInterviewQuestionswithAnswers17,619views
PL/SQLScripttoSubmitaConcurrentRequestfrombackend14,891views
UsefulInformationaboutWorkflowBackgroundProcessConcurrentProgram14,625views
TopPL/SQLInterviewQuestionswithAnswers13,760views
InformationaboutOracleAPIsandHowtofindAPIsofOracleModules?13,185views
PurposeofFormulacolumn,SummarycolumnandPlaceHoldercolumninOracleReports13,078views
HowcostingisperformedonInventoryMaterialTransactions12,773views
SQLQuerytolistActiveResponsibilitiesofaActiveUser12,441views

RecentComments

RecentComments

ChanakyaKolapalli
SuperarticleShailender,thankyou!
FAQsonPOOutputforCommunicationReport1monthago

Passion4Oracle
nice.
GeneralLedgerInterfaceTables1monthago

http://oracleappsdna.com/2012/02/moacoracleappsorg_idmultiorgconcept/

9/10

7/14/2016

MOACOracleAppsORG_ID,MultiOrgConcept|OracleAppsDNA

ShailenderThallam
Itisusedtoreturnerrormessagetoconcurrentmanager.
InformationonErrbufandRetcodeParameters5monthsago

Naveen
HiShailender,
Isthereanyspecificreasontouseerrbufasfirstparameter.
InformationonErrbufandRetcodeParameters5monthsago
OracleAppsDNA
2014OracleAppsDNA.Opinionsexpressedherearestrictlythoseoftheowner,
ShailenderThallam,andthoseofthecommenters.Articlescannotbereproducedwithout
permissionfromtheauthor.

http://oracleappsdna.com/2012/02/moacoracleappsorg_idmultiorgconcept/

10/10

Вам также может понравиться