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_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;
fnd_client_info.set_org_context(ORG_ID);
end;
No comments:
Post a Comment