Apps General Scripts

List of Contents:

1- Query to get Business Group, Legal Entity Name, Operating Unit Details.
2- Organizations in Oracle Apps
3- P2P & O2C Cycle
4- Inventory Organization and corresponding Operating Unit, Ledger and Legal Entity:
5- Business Group & Legal Entities.
6- Business Group, Legal Entity, Operating Unit, Organizations
7- Business Group, Legal Entity, Operating Unit, Organizations & SubInventories
8- Application ID & Shortname & Name
9- Application Object Libraries (Tables)
10- Script to run before populating ap_invoices_v table data.
11- Script for Application short name, Responsibility_name & Key etc
12- FND Tables
13- In order to get Phone number of supplier/customer site the query will be (HZ Tables)
14- In order to get Phone number of supplier/customer  the query will be (HZ Tables)
15- Inventory items with categories

1- Query to get Business Group, Legal Entity Name, Operating Unit 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;

2- Organizations in Oracle Apps

1- org_organization_definitions (All orgs & corresponding OU's & SOB's & LE)
2- hr_organization_units ( All Orgs including OU's & Names of orgs with Business Group)
3- mtl_parameters  (All Organizations not OU's)
4- hr_all_organization_units_tl      (All details of OP & Orgs)

3- P2P & O2C Cycle

http://www.slideshare.net/venugopalram/p2-p-and-o2c


4- Inventory Organization and corresponding Operating Unit, Ledger and Legal Entity:

Select a.organization_id, a.organization_code, a.organization_name,
a.operating_unit, b.name OU, a.set_of_books_id,d.name LEDGER,
a.legal_entity,c.name LE_NAME
From  apps. ORG_ORGANIZATION_DEFINITIONS a,
apps. HR_OPERATING_UNITS b,
apps. xle_entity_profiles c,
apps. gl_ledgers d
Where a.operating_unit=b.organization_id
AND c.legal_entity_id=a.legal_entity
AND d.ledger_id=a.set_of_books_id;

5- Business Group & Legal Entities

SELECT pg.business_group_name, pg.working_hours_frequency,
       pg.business_group_short_name, pg.default_currency_code,
       pg.enabled_flag, pg.competence_structure, pg.business_group_id,
       pg.location_id, le.organization_id, le.NAME
  FROM hrfv_business_groups pg, hr_legal_entities le
 WHERE pg.business_group_id = le.business_group_id
   AND pg.business_group_id =81;

6- Business Group, Legal Entity, Operating Unit, Organizations

SELECT PG.BUSINESS_GROUP_ID, pg.business_group_name, pg.working_hours_frequency,
       pg.business_group_short_name, pg.default_currency_code,
       pg.enabled_flag, pg.competence_structure, pg.business_group_id,
       pg.location_id, le.organization_id, le.NAME,
       ORGS.ORGANIZATION_iD ORGS, orgs.organization_code, ORG_ORG_NAMES.NAME ORGANIZATION_NAME,
        ORGS.OPERATING_UNIT OU, ORG_OU_NAME.NAME OPERATING_UNIT_NAME
  FROM hrfv_business_groups pg, hr_legal_entities le, hr_organization_units  ORG_ORG_NAMES,
        hr_organization_units ORG_OU_NAME ,
       (select business_group_id , organization_id , organization_code,  operating_unit from org_organization_definitions
       where business_group_id=81) Orgs
 WHERE pg.business_group_id = le.business_group_id
   AND pg.business_group_id =81
   AND PG.BUSINESS_GROUP_ID = ORGS.BUSINESS_GROUP_ID
   AND PG.BUSINESS_GROUP_ID = ORG_ORG_NAMES.BUSINESS_GROUP_ID
   AND ORGS.ORGANIZATION_ID = ORG_ORG_NAMES.ORGANIZATION_ID
   AND PG.BUSINESS_GROUP_ID = ORG_OU_NAME.BUSINESS_GROUP_ID
   AND ORGS.OPERATING_UNIT = ORG_OU_NAME.ORGANIZATION_ID;

7- Business Group, Legal Entity, Operating Unit, Organizations & Sub Inventories

SELECT PG.BUSINESS_GROUP_ID, pg.business_group_name, pg.working_hours_frequency,
       pg.business_group_short_name, pg.default_currency_code,
       pg.enabled_flag, pg.competence_structure, pg.business_group_id,
       pg.location_id, le.organization_id, le.NAME,
       ORGS.ORGANIZATION_iD ORGS, orgs.organization_code, ORG_ORG_NAMES.NAME ORGANIZATION_NAME,
        ORGS.OPERATING_UNIT OU, ORG_OU_NAME.NAME OPERATING_UNIT_NAME,
        msi.SECONDARY_INVENTORY_NAME, msi.DESCRIPTION
  FROM hrfv_business_groups pg, hr_legal_entities le, hr_organization_units  ORG_ORG_NAMES,
        hr_organization_units ORG_OU_NAME , MTL_SECONDARY_INVENTORIES msi,
       (select business_group_id , organization_id , organization_code,  operating_unit from org_organization_definitions
       where business_group_id=81) Orgs
 WHERE pg.business_group_id = le.business_group_id
   AND pg.business_group_id =81
   AND PG.BUSINESS_GROUP_ID = ORGS.BUSINESS_GROUP_ID
   AND PG.BUSINESS_GROUP_ID = ORG_ORG_NAMES.BUSINESS_GROUP_ID
   AND ORGS.ORGANIZATION_ID = ORG_ORG_NAMES.ORGANIZATION_ID
   AND PG.BUSINESS_GROUP_ID = ORG_OU_NAME.BUSINESS_GROUP_ID
   AND ORGS.OPERATING_UNIT = ORG_OU_NAME.ORGANIZATION_ID
   AND ORGS.ORGANIZATION_ID = MSI.ORGANIZATION_ID;

8- Application ID & Shortname & Name

SELECT fa.application_id           "Application ID",
       fat.application_name        "Application Name",
       fa.application_short_name   "Application Short Name",
       fa.basepath                 "Basepath"
  FROM fnd_application     fa,
       fnd_application_tl  fat
 WHERE fa.application_id = fat.application_id
   AND fat.language      = 'US';

9- AOL (Application Object Libraries) Tables

FND_APPLICATION Applications registered with Oracle Application Object Library
FND_CONCURRENT_PROGRAMS Concurrent programs
FND_CONCURRENT_REQUESTS Concurrent requests information
FND_CURRENCIES Currencies enabled for use at your site
FND_DATA_GROUPS Data groups registered with Oracle Application Object Library
FND_FLEX_VALUES Valid values for flexfield segments
FND_FLEX_VALUE_HIERARCHIES Child value ranges for key flexfield segment values
FND_FLEX_VALUE_SETS Value sets used by both key and descriptive flexfields
FND_FORM Application forms registered with Oracle Application Object Library
FND_FORM_FUNCTIONS Functionality groupings
FND_ID_FLEXS Registration information about key flexfields
FND_ID_FLEX_SEGMENTS Key flexfield segments setup information and correspondences between table columns and key flexfield segments
FND_ID_FLEX_STRUCTURES Key flexfield structure information
FND_LOOKUP_TYPES Oracle Application Object Library QuickCodes
FND_LOOKUP_VALUES QuickCode values
FND_MENUS New menu tabl for Release 10SC
FND_PROFILE_OPTIONS User profile options
FND_PROFILE_OPTION_VALUES Values of user profile options defined at different profile levels
FND_REQUEST_SETS Reports sets
FND_REQUEST_SET_PROGRAMS Reports within report sets
FND_REQUEST_SET_STAGES Stores request set stages
FND_RESPONSIBILITY Responsibilities
FND_RESP_FUNCTIONS Function Security
FND_USER Application users

10 - Script to run before query view ap_invoices_v


begin 
MO_GLOBAL.SET_ORG_CONTEXT('101',NULL,'SQLAP'); 

end; 

101 is operating unit which data will be populated in it.

11 - Script for Application short name, Responsibility_name & Key etc


SELECT A.APPLICATION_ID, A.APPLICATION_SHORT_NAME , A.PRODUCT_CODE, AA.APPLICATION_NAME,
       R.RESPONSIBILITY_ID, R.RESPONSIBILITY_KEY , RR.RESPONSIBILITY_NAME
FROM
FND_APPLICATION A , FND_APPLICATION_TL AA ,
FND_RESPONSIBILITY R, FND_RESPONSIBILITY_TL RR
WHERE
A.APPLICATION_ID = AA.APPLICATION_ID AND
A.APPLICATION_ID = R.APPLICATION_ID AND
R.RESPONSIBILITY_ID = RR.RESPONSIBILITY_ID AND
R.APPLICATION_ID = RR.APPLICATION_ID
    AND AA.LANGUAGE='US';

12 - FND Tables 

FND_APPLICATION: 
 Stores applications registered with Oracle Application Object Library.
FND_APPLICATION_TL: 
Stores translated information about all the applications registered with Oracle Application Object Library.
FND_APP_SERVERS: 
This table will track the servers used by the E-Business Suite system.
FND_ATTACHED_DOCUMENTS: 
Stores information relating a document to an application entity.
FND_CONCURRENT_PROCESSES: 
Stores information about concurrent managers.
FND_CONCURRENT_PROCESSORS: 
Stores information about immediate (subroutine) concurrent program libraries.
FND_CONCURRENT_PROGRAMS: 
Stores information about concurrent programs. Each row includes a name and description of the concurrent program.
FND_CONCURRENT_PROGRAMS_TL: 
Stores translated information about concurrent programs in each of the installed languages.
FND_CONCURRENT_QUEUES: 
Stores information about concurrent managers.

FND_CONCURRENT_QUEUE_SIZE: 
Stores information about the number of requests a concurrent manager can process at once, according to its work shift.
FND_CONCURRENT_REQUESTS: 
Stores information about individual concurrent requests.
FND_CONCURRENT_REQUEST_CLASS: 
Stores information about concurrent request types.
FND_CONC_REQ_OUTPUTS: 
This table stores output files created by Concurrent Request.
FND_CURRENCIES: 
Stores information about currencies.
FND_DATABASES: 
It tracks the databases employed by the eBusiness suite. This table stores information about the database that is not instance specific.
FND_DATABASE_INSTANCES: 
Stores instance specific information. Every database has one or more instance.
FND_DESCRIPTIVE_FLEXS: 
Stores setup information about descriptive flexfields.
FND_DESCRIPTIVE_FLEXS_TL: 
Stores translated setup information about descriptive flexfields.
FND_DOCUMENTS: 
Stores language-independent information about a document.
FND_EXECUTABLES: 
Stores information about concurrent program executables.
FND_FLEX_VALUES: 
Stores valid values for key and descriptive flexfield segments.
FND_FLEX_VALUE_SETS: 
Stores information about the value sets used by both key and descriptive flexfields.
FND_LANGUAGES: 
Stores information regarding languages and dialects.
FND_MENUS: 
It lists the menus that appear in the Navigate Window, as determined by the System Administrator when defining responsibilities for function security.
FND_MENUS_TL: 
Stores translated information about the menus in FND_MENUS.
FND_MENU_ENTRIES: 
Stores information about individual entries in the menus in FND_MENUS.
FND_PROFILE_OPTIONS: 
Stores information about user profile options.
FND_REQUEST_GROUPS: 
Stores information about report security groups.
FND_REQUEST_SETS: 
Stores information about report sets.
FND_RESPONSIBILITY: 
Stores information about responsibilities. Each row includes the name and description of the responsibility, the application it belongs to, and values that identify the main menu, and the first form that it uses.
FND_RESPONSIBILITY_TL: 
Stores translated information about responsibilities.
FND_RESP_FUNCTIONS: 
Stores security exclusion rules for function security menus. Security exclusion rules are lists of functions and menus inaccessible to a particular responsibility.
FND_SECURITY_GROUPS: 
Stores information about security groups used to partition data in a Service Bureau architecture.
FND_SEQUENCES: 
Stores information about the registered sequences in your applications.
FND_TABLES: 
Stores information about the registered tables in your applications.
FND_TERRITORIES: 
Stores information for countries, alternatively known as territories.
FND_USER: 
Stores information about application users.
FND_VIEWS: 
Stores information about the registered views in your applications.

13- In order to get Phone number of supplier/Customer site the query will be (HZ Tables)

Select hz.party_id, hz.party_name, hps.party_site_name, hcp.phone_number
from      hz_contact_points hcp,
    hz_party_sites hps,
hz_parties hz
where
hz.party_id=77042 and
hz.party_id = hps.party_id(+) and
hps.party_site_id = hcp.owner_table_id(+) and
hcp.owner_table_name='HZ_PARTY_SITES' and
 hz.application_id=200;

* If you replace application_id to 222 then you can get the detail of Customer

14- In order to get Phone number of supplier/Customer  the query will be (HZ Tables)



Select hz.party_id, hz.party_name,  hcp.phone_number
from   hz_contact_points hcp,
hz_parties hz,
hz_relationships hr
where 
hz.party_id=77042 and
    hz.party_id = hr.object_id(+) and
    hr.party_id = hcp.owner_table_id(+) and
hcp.owner_table_name='HZ_PARTIES' 
 hz.application_id=200;

* If you replace application_id to 222 then you can get the detail of Customer

14- Inventory items with categories

SELECT I.INVENTORY_ITEM_ID, I.SEGMENT1 ITEM_CODE, I.DESCRIPTION ITEM_DETAIL,
i.PRIMARY_UNIT_OF_MEASURE
, C.CATEGORY_ID, CD.DESCRIPTION
FROM MTL_SYSTEM_ITEMS_B I , MTL_ITEM_CATEGORIES C, MTL_CATEGORIES CD
WHERE I.ORGANIZATION_ID=127 AND I.ORGANIZATION_ID = C.ORGANIZATION_ID AND

I.INVENTORY_ITEM_ID = C.INVENTORY_ITEM_ID  AND C.CATEGORY_ID = CD.CATEGORY_ID;

2 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Anonymous15/9/20 05:59

    “I jumped on an opportunity to purchase a rental property over the 4th of  weekend. Mr Lee was quick to respond and since this was my first time getting a loan to buy a rental property , he was able to help me walk through the loan process. It was a great experience working with a good and kind loan lender Mr Lee. I hopefully know very well if you are outta looking for loan to purchase a property or funding business purpose then Mr Lee will be able to help you with such process here his details WhatsApp +1-989-394-3740.   /  247officedept@gmail.com  !”  

    ReplyDelete