Monday, October 26, 2015

What is the purpose of MO_GLOBAL.SET_POLICY_CONTEXT?


 To Retrieve Rows From Table / Views Or Synonym For An ORG_ID

For example View are : PO_HEADERS, AP_INVOICES

To fetch data from these View , we have to use Procedure
mo_global.set_policy_context(p_access_code,p_org_id);

This procedure has two parameters
p_access_mode
Pass a value "S" in case you want your current session to work against Single ORG_ID
Pass a value of "M" in case you want your current session to work against multiple ORG_ID's


For R12

p_org_id
Only applicable if p_access_mode is passed value of "S"
For Example:

begin
mo_global.set_policy_context('S',722);
end;

Above code will fetch only the rows belongs to org id 722

begin
mo_global.init('AR');
end;


begin
mo_global.set_policy_context('M',Null);
end;


Above code will fetch dat for multiorg's irrespective of operating units.


For 11i


begin
fnd_client_info.set_org_context(ORG_ID);

end;

No comments:

Post a Comment

Clear BNE Cache for WebADI Changes

It Sometime happens that WebAdi Changes doesn't reflect once migrated in controlled instances. Here are the quick steps(Generally perfor...