Home » Applications » Oracle Fusion Apps & E-Business Suite » Multi - Org in reports
Multi - Org in reports [message #158695] Mon, 13 February 2006 22:39 Go to next message
yram
Messages: 75
Registered: February 2001
Member
I have a report which is fetching the data based on org_id, how do i implement this option..

Regards
Yram
Re: Multi - Org in reports [message #158715 is a reply to message #158695] Tue, 14 February 2006 00:58 Go to previous messageGo to next message
vban2000
Messages: 207
Registered: March 2005
Senior Member
Hi Yram

In all the tables (header tables mostly) there is column ORG_ID which you can make use of it in your report as part of the where clause.

e.g PO_HEADERS_ALL table has a ORG_ID column

Once you have constructed your report. Create a LOV Flexfield using the following SQL to reterive the org_id and display the relevent organization name for user to select and pass on to the report.

SELECT organization_id, NAME
  FROM hr_all_organization_units


HTH

Regards
Andy
Re: Multi - Org in reports [message #159009 is a reply to message #158715] Wed, 15 February 2006 08:29 Go to previous messageGo to next message
yram
Messages: 75
Registered: February 2001
Member
Hi Andy

Can we use FND_CLIENT_INFO.set_org_context? in the before report trigger ? or we should use something else

Regards
Yram
Re: Multi - Org in reports [message #159011 is a reply to message #158695] Wed, 15 February 2006 09:14 Go to previous message
vban2000
Messages: 207
Registered: March 2005
Senior Member
Hi

Try the following.. Both give the same result.

To be on the safe side (since, I never used before.. I am not sure on which is correct and should be used...) login as different ORG user and output the ORG_ID on the report see if result is correct.

DECLARE
   x_org_id   NUMBER;
BEGIN
   fnd_profile.get ('ORG_ID', x_org_id);
   fnd_client_info.set_org_context (x_org_id);
   DBMS_OUTPUT.PUT_LINE (x_org_id);
END;

or

This piece of code is from the default value of ORG_ID in PO_HEADERS_ALL.
SELECT TO_NUMBER (DECODE (SUBSTRB (USERENV ('CLIENT_INFO'), 1, 1),
                          ' ', NULL,
                          SUBSTRB (USERENV ('CLIENT_INFO'), 1, 10)
                         )
                 )
  FROM DUAL



let me know the result.. (thanks in advance)

regards
AnDy

[Updated on: Wed, 15 February 2006 09:19]

Report message to a moderator

Previous Topic: Job Evaluation
Next Topic: Oracle Applications consutlant for California
Goto Forum:
  


Current Time: Mon May 20 10:12:43 CDT 2024