Friday, August 1, 2014

Query to fetch Legal Entity, Business group details in Oracle Apps R12 - per_business_groups,xle_firstparty_information_v











Query to fetch Business group Details  - 1

SELECT business_group_id,
       organization_id,
       NAME,
       date_from,
       date_to,
       internal_address_line,
       location_id,
       comments,
       default_start_time,
       default_end_time,
       working_hours,
       frequency,
       short_name,
       method_of_generation_emp_num,
       method_of_generation_apl_num,
       grade_structure,
       people_group_structure,
       job_structure,
       cost_allocation_structure,
       position_structure,
       legislation_code,
       currency_code,
       security_group_id,
       enabled_flag,
       competence_structure,
       method_of_generation_cwk_num
  FROM per_business_groups;

Query to fetch Business group Details  - 2

SELECT o.organization_id,
       o.organization_id,
       otl.NAME,
       o.date_from,
       o.date_to,
       o.internal_address_line,
       o.location_id,
       o.comments
  FROM hr_all_organization_units    o,
       hr_all_organization_units_tl otl,
       hr_organization_information  o2,
       hr_organization_information  o3,
       hr_organization_information  o4
 WHERE o.organization_id = otl.organization_id
   AND o.organization_id = o2.organization_id(+)
   AND o.organization_id = o3.organization_id
   AND o.organization_id = o4.organization_id
   AND o3.org_information_context = 'Business Group Information'
   AND o2.org_information_context(+) = 'Work Day Information'
   AND o4.org_information_context = 'CLASS'
   AND o4.org_information1 = 'HR_BG'
   AND o4.org_information2 = 'Y';

Query to fetch Legal Entity Details

SELECT xle_firstpty.NAME,
       xle_firstpty.activity_code,
       xle_firstpty.sub_activity_code,
       xle_firstpty.registration_number,
       xle_firstpty.effective_from,
       xle_firstpty.location_id,
       xle_firstpty.address_line_1,
       xle_firstpty.address_line_2,
       xle_firstpty.address_line_3,
       xle_firstpty.town_or_city,
       xle_firstpty.region_1,
       xle_firstpty.region_2,
       xle_firstpty.region_3,
       xle_firstpty.postal_code,
       xle_firstpty.country,
       xle_firstpty.address_style,
       xle_cont.contact_name,
       xle_cont.contact_legal_id,
       xle_cont.title,
       xle_cont.job_title,
       xle_cont.role
  FROM xle_firstparty_information_v xle_firstpty,
       xle_legal_contacts_v         xle_cont
 WHERE 1 = 1
   AND XLE_FIRSTPTY.LEGAL_ENTITY_ID = C_REP_ENTITY_ID
   AND xle_firstpty.legal_entity_id = xle_cont.entity_id(+);

Query to fetch legal entity details along with OU details

SELECT DISTINCT hrl.country,
                hroutl_bg.NAME bg,
                hroutl_bg.organization_id,
                lep.legal_entity_id,
                lep.NAME legal_entity,
                hroutl_ou.NAME ou_name,
                hroutl_ou.organization_id org_id,
                hrl.location_id,
                hrl.location_code,
                glev.flex_segment_value
  FROM xle_entity_profiles          lep,
       xle_registrations            reg,
       hr_locations_all             hrl,
       hz_parties                   hzp,
       fnd_territories_vl           ter,
       hr_operating_units           hro,
       hr_all_organization_units_tl hroutl_bg,
       hr_all_organization_units_tl hroutl_ou,
       hr_organization_units        gloperatingunitseo,
       gl_legal_entities_bsvs       glev
 WHERE lep.transacting_entity_flag        = 'Y'
   AND lep.party_id                       = hzp.party_id
   AND lep.legal_entity_id                = reg.source_id
   AND reg.source_table                   = 'XLE_ENTITY_PROFILES'
   AND hrl.location_id                    = reg.location_id
   AND reg.identifying_flag               = 'Y'
   AND ter.territory_code                 = hrl.country
   AND lep.legal_entity_id                = hro.default_legal_context_id
   AND gloperatingunitseo.organization_id = hro.organization_id
   AND hroutl_bg.organization_id          = hro.business_group_id
   AND hroutl_ou.organization_id          = hro.organization_id
   AND glev.legal_entity_id               = lep.legal_entity_id;


15 Responses to “Query to fetch Legal Entity, Business group details in Oracle Apps R12 - per_business_groups,xle_firstparty_information_v”

Unknown said...
October 8, 2016 at 12:29 AM

Regards
Sridevi Koduru (Senior Oracle Apps Trainer Oracleappstechnical.com)
LinkedIn profile - https://in.linkedin.com/in/sridevi-koduru-9b876a8b
Please Contact for One to One Online Training on Oracle Apps Technical, Financials, SCM, SQL, PL/SQL, D2K at training@oracleappstechnical.com | +91 - 9581017828.


Unknown said...
April 23, 2017 at 9:39 PM

Oracle fusion Financials Training from CALFRE.COM gives you the best results to learn your dream course and maintains
sufficient knowledge on oracle. It provides training by self-paced videos which are very helpful for the users to watch at any time according to their schedule. It is globally accepted and having many users undergoing training every day.



Oracle fusion Financials Training in hyderabad

Oracle Fusion Financials online Training in hyderabad


Unknown said...
December 29, 2018 at 9:49 PM

Thanks and Regards. Oracle Apps R12 Training Videos at affordable cost. please check oracleappstechnical.com


Blog Comment Backlinks said...
January 23, 2020 at 12:03 AM

Thank you again for all the knowledge you distribute,Good post. I was very interested in the article, it's quite inspiring I should admit. I like visiting you site since I always come across interesting articles like this one.Great Job, I greatly appreciate that.Do Keep sharing! Regards, Paul Heule


Alessa Hall said...
February 7, 2020 at 3:10 AM

It was a very good post indeed. I thoroughly enjoyed reading it in my lunch time. Will surely come and visit this blog more often. Thanks for sharing. bail bonds


Lawrence Ferguson said...
July 11, 2020 at 9:27 AM

Your blogs are easily accessible and quite enlightening so keep doing the amazing work guys.erp software dubai


Andrea Elizabeth said...
October 22, 2020 at 1:22 AM

Thanks for sharing this great information I am impressed by the information that you have on this blog. Same as your blog i found another one Oracle Fusion Procurement . Actually, I was looking for the same information on internet for
Oracle APEX and came across your blog. I am impressed by the information that you have on this blog. It shows how well you understand this subject, you can learn more about Oracle HCM Cloud
.


Anonymous said...
June 19, 2021 at 1:58 AM

I finally found great post here.I will get back here. I just added your blog to my bookmark sites. thanks.Quality posts is the crucial to invite the visitors to visit the web page, that's what this web page is providing. new company name suggestions


Anonymous said...
October 8, 2021 at 7:06 AM

First You got a great blog .I will be interested in more similar topics. i see you got really very useful topics, i will be always checking your blog thanks. more info


Jovani said...
November 9, 2021 at 11:54 AM

Glad to chat your blog, I seem to be forward to more reliable articles and I think we all wish to thank so many good articles, blog to share with us. click


Unknown said...
November 20, 2021 at 2:06 AM

please guide me to recover facebook password without confirmation reset code


Anonymous said...
November 25, 2021 at 5:00 PM

This is a really perfect for a new blogger like me who doesn't want their site to be messy with those spammers who don't even read your post but they have the guts to comment in your site. Thanks again. It’s time to must know about best family road trip vehicle for more details.


Anonymous said...
November 29, 2021 at 1:15 PM

I think this is an informative post and it is very useful and knowledgeable. keep it up it's time to avail this Airport car services in Detroit for more details.


Anonymous said...
April 10, 2022 at 10:26 AM

I visit your blog regularly and recommend it to all of those who wanted to enhance their knowledge with ease. The style of writing is excellent and also the content is top-notch. Thanks for that shrewdness you provide the readers! It’s time to avail this Warehousing and Storage Services for more details.


Oracle Apps Technical Dot Com said...
April 11, 2022 at 10:25 PM

25% OFF on Oracle Apps R12 Financials Self Paced Course along with 11 Additional Add On Courses (321 Session Videos of 120 Hours Recordings). Our Top Trending Course with 1700 Enrolled Udemy Students

Please Check https://www.oracleappstechnical.com for details


Post a Comment

Disclaimer

The ideas, thoughts and concepts expressed here are my own. They, in no way reflect those of my employer or any other organization/client that I am associated. The articles presented doesn't imply to any particular organization or client and are meant only for knowledge Sharing purpose. The articles can't be reproduced or copied without the Owner's knowledge or permission.