Hi Everyone,
Following query lists out data for Inventory Cycle count data particularly "Approve Count Sequences" page.
Main Tables:
INV_CYCLE_COUNT_HEADERS
INV_CYCLE_COUNT_ITEMS
INV_CYCLE_COUNT_ENTRIES
Query:
select
CYCLE_COUNT_HEADER_NAME,
icce.COUNT_LIST_SEQUENCE Count_Sequence,
esi.ITEM_NUMBER Item,
esit.DESCRIPTION Item_Description,
fl.MEANING count_Sequence_status,
icce.COUNT_QUANTITY,
icce.COUNT_UOM,
icce.ADJUSTMENT_QUANTITY Primary_adjustment_quantity,
icce.REVISION,
icce.LOT_NUMBER,
icce.SERIAL_NUMBER,
icce.COUNTRY_OF_ORIGIN_CODE,
iac.ABC_CLASS_NAME,
icce.COUNT_DATE,
itl.SEGMENT1 locator_name,
icce.SUBINVENTORY,
icce.ITEM_UNIT_COST,
iop.ORGANIZATION_name,
ppat.name project_name,
ptv.TASK_NUMBER,
icce.COMMENTS
from
INV_CYCLE_COUNT_HEADERS icch,
INV_CYCLE_COUNT_ITEMS icci,
INV_ABC_CLASSES iac,
EGP_SYSTEM_ITEMS_B esi,
EGP_SYSTEM_ITEMS_TL esit,
INV_CYCLE_COUNT_ENTRIES icce,
inv_item_locations itl,
fnd_lookups fl,
PJF_PROJECTS_ALL_TL ppat,
PJF_TASKS_V ptv,
INV_ORGANIZATION_DEFINITIONS_V iop
where 1=1
and icch.CYCLE_COUNT_HEADER_ID=icci.CYCLE_COUNT_HEADER_ID
and icci.ABC_CLASS_ID=iac.ABC_CLASS_ID
and icci.INVENTORY_ITEM_ID=esi.INVENTORY_ITEM_ID
and icci.ORGANIZATION_ID=esi.ORGANIZATION_ID
and icci.INVENTORY_ITEM_ID=esit.INVENTORY_ITEM_ID
and icci.ORGANIZATION_ID=esit.ORGANIZATION_ID(+)
and esit.LANGUAGE=userenv('lang')
and icch.CYCLE_COUNT_HEADER_ID=icce.CYCLE_COUNT_HEADER_ID
and icci.INVENTORY_ITEM_ID=icce.INVENTORY_ITEM_ID
and icci.ORGANIZATION_ID=icce.ORGANIZATION_ID
and icce.LOCATOR_ID=itl.INVENTORY_LOCATION_ID
and icce.ENTRY_STATUS_CODE =fl.LOOKUP_CODE
and fl.LOOKUP_TYPE = UPPER('INV_CC_ENTRY_STATUSES')
and icch.ORGANIZATION_ID=iop.ORGANIZATION_ID
and icce.PROJECT_ID=ppat.PROJECT_ID(+)
and icce.TASK_ID=ptv.TASK_ID(+)
No comments:
Post a Comment