Get the Inventory code and Inventory Name/description:-
-------------------------------------------------------------------
Note:- Inventory Organization will be represented with the Organization_id column.
We many give some code and name to the Inventory. With the following Query we can know the Code and Name details of all the Inventories in the Organization.
SELECT distinct SUBSTR(loc.location_code, 1, 4) "Inventory Code"
,DECODE(SUBSTR(loc.tax_name, 1, 3)
,'Bay', 'H'
,'Zel', 'Z'
,'KMT', 'Z') || lpad(substr(loc.location_code, 1, 4), 4, '0')|| ' ' ||
SUBSTR(loc.address_line_2, 1, 30) "Inventory Name/Description",
ou.ORGANIZATION_ID "Inventory Organization ID"
FROM hr_locations_all loc,
hr_all_organization_units ou
WHERE loc.location_id = ou.location_id;
Subscribe to:
Post Comments (Atom)
4 comments:
Hi friends,
The following Query would be more easy to get the information about the Organization Code, Organization ID etc.
SELECT organization_id,
organization_code, ORGANIZATION_NAME, INVENTORY_ENABLED_FLAG
FROM org_organization_definitions
You can check other columns in this view as well. You will find very good information from this view.
Regards,
Phani
The following query can get the information about all the Organizations.
select * from hr_all_organization_units;
Based on the value in Type column, we can know what type of Inventory is it.
Example:-
select * from hr_all_organization_units where type IN ('DC', 'STORE', 'CC');
You can get the Shipping Network Information from "MTL_SHIPPING_NETWORK_VIEW" Table.
I have used the following Query for to get full names. You can edit where clause as required.
SELECT FROM_ORGANIZATION_CODE DC,FROM_ORGANIZATION_NAME "DC NAME",
TO_ORGANIZATION_CODE "STORE" ,TO_ORGANIZATION_nAME "STORE NAME" ,TO_ORGANIZATION_iD
FROM MTL_SHIPPING_NETWORK_VIEW MSN,HR_ALL_ORGANIZATION_UNITS HRU
WHERE MSN.TO_ORGANIZATION_NAME LIKE '1107%' --- STORE NUMBER----------
AND MSN.FROM_ORGANIZATION_ID=HRU.ORGANIZATION_iD
AND HRU.TYPE='DC'
SELECT NAME "OU Name"
, ORGANIZATION_ID "Org ID"
, SHORT_CODE "OU Code"
, DATE_FROM "Start Date From"
, date_to "End Date To"
from HR_OPERATING_UNITS;
The above Query given the Information about the Operating Units.
Post a Comment