Home » Applications » Oracle Fusion Apps & E-Business Suite » _ALL or fnd_client_info.set_org_context(org_id); (merged 3 by VK)
_ALL or fnd_client_info.set_org_context(org_id); (merged 3 by VK) [message #451909] Sun, 18 April 2010 20:41 Go to next message
chandramatta
Messages: 15
Registered: January 2010
Junior Member

Hi All,
I have question on multi-org tables.

When selecting data from multi-org tables inside pl/sql code,
which is right way or recomended way by oracle ?
- Is it use _ALL tables and put additional condition in WHERE clause for tab1.org_id = <Org ID>


select trx.trx_number into v_trx
from ra_customer_trx_all trx, ra_customer_trx_lines_all trxl
where trx.customer_trx_id = trxl.customer_trx_id
and trx.org_id = p_org_id


or
- set org context at the begining of procedure and proceed with no additional condition for <org id> in WHERE clause..

like below..

begin
fnd_client_info.set_org_context(p_org_id);

select trx.trx_number
into v_trx
from ra_customer_trx trx, ra_customer_trx_lines trxl
where trx.customer_trx_id = trxl.customer_trx_id
end ;


I know it's silly.. but wanted to find out what is oracle recomended way of doing it.
Re: _ALL or fnd_client_info.set_org_context(org_id); (merged 3 by VK) [message #451917 is a reply to message #451909] Mon, 19 April 2010 00:19 Go to previous messageGo to next message
vamsi kasina
Messages: 2112
Registered: October 2003
Location: Cincinnati, OH
Senior Member
Both are same.
But I think it is better to give the access on _ALL table to specific set of users.
So, second option should be better one.

By
Vamsi
Re: _ALL or fnd_client_info.set_org_context(org_id); (merged 3 by VK) [message #451985 is a reply to message #451909] Mon, 19 April 2010 08:08 Go to previous message
Alien
Messages: 292
Registered: June 1999
Senior Member
Recommended is to set the client_info. More specifically to use an initialize, and set your user_id/responsibility_id.

By initializing your session, you are prepared for possible future changes (i.e. a new Operating Unit being created).

Regards,

Arian
Previous Topic: users table
Next Topic: Hold Comment
Goto Forum:
  


Current Time: Wed Apr 24 19:04:50 CDT 2024