0% found this document useful (0 votes)
11 views2 pages

Lot 1

Uploaded by

simanter.por
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views2 pages

Lot 1

Uploaded by

simanter.por
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

/data/PDEV/appspdev/fs1/EBSapps/appl/xxcus/12.0.

0/reports/US
XXPFL Master Request Group

select * from GME_MATERIAL_DETAILS where BATCH_ID = 5233619 and line_type = -1

select * from mtl_material_transactions where transaction_source_id = 5233619 and


ORGANIZATION_ID = 231

select * from mtl_transaction_lot_numbers where LOT_NUMBER='KO-225'

select * from gme_batch_header x, GME_MATERIAL_DETAILS y


where x.batch_id = y.batch_id
and x.ORGANIZATION_ID=231
and y.line_type=-1
and x.batch_id in( select distinct a.TRANSACTION_SOURCE_ID
from mtl_material_transactions a, mtl_transaction_lot_numbers b
where a.TRANSACTION_ID = b.TRANSACTION_ID
and a.ORGANIZATION_ID=231
and b.LOT_NUMBER='KO-225'
and a.TRANSACTION_TYPE_ID = 44)

select * from GME_MATERIAL_DETAILS y,mtl_material_transactions a


where y.ORGANIZATION_ID=231
and y.line_type=-1
and y.batch_id in( select distinct a.TRANSACTION_SOURCE_ID
from mtl_material_transactions a, mtl_transaction_lot_numbers b
where a.TRANSACTION_ID = b.TRANSACTION_ID
and a.ORGANIZATION_ID=231
and b.LOT_NUMBER='KO-225'
and a.TRANSACTION_TYPE_ID = 44)
and y.ORGANIZATION_ID= a.ORGANIZATION_ID
and y.INVENTORY_ITEM_ID= a.INVENTORY_ITEM_ID
and y.batch_id = a.TRANSACTION_SOURCE_ID
and a.TRANSACTION_TYPE_ID = 35

***********************************LOT WISE BATCH SUMMERY


***************************************************

select distinct gbh.batch_ID,msi.segment1,msi.DESCRIPTION, gbh.batch_no,


mtln.LOT_NUMBER,msi.PRIMARY_UOM_CODE UOM,
TO_CHAR (TRUNC(gbh.PLAN_START_DATE)) PSD,TO_CHAR (TRUNC(gbh.ACTUAL_START_DATE))
ASD,TO_CHAR (TRUNC(gbh.PLAN_CMPLT_DATE)) PCD,
TO_CHAR (TRUNC(gbh.ACTUAL_CMPLT_DATE)) ACD,sum(mtln.TRANSACTION_QUANTITY) T_QT,
(fu.USER_NAME || ' - ' || fu.DESCRIPTION) FULL_NAME
from
gme_batch_header gbh,GME_MATERIAL_DETAILS GMD, mtl_material_transactions mmt,
mtl_transaction_lot_numbers mtln,FND_USER fu,
mtl_system_items_b msi
where gbh.batch_ID = GMD.BATCH_ID
AND GBH.ORGANIZATION_ID=:P_ORG_ID
AND gbh.CREATION_DATE > '01-NOV-2023'
and mtln.LOT_NUMBER= :P_LOT_NUM
and GMD.LINE_TYPE = 1
and mmt.TRANSACTION_type_id in (44,17)
and GMD.BATCH_ID = mmt.transaction_source_id
and GMD.ORGANIZATION_ID= mmt.ORGANIZATION_ID
and GMD.INVENTORY_ITEM_ID = mmt.INVENTORY_ITEM_ID
and mmt.TRANSACTION_ID = mtln.TRANSACTION_ID
AND fu.USER_ID = gbh.created_by
and GMD.INVENTORY_ITEM_ID = msi.INVENTORY_ITEM_ID
and GMD.ORGANIZATION_ID= msi.ORGANIZATION_ID
group by msi.segment1,msi.DESCRIPTION,
gbh.batch_ID,gbh.batch_no,
mtln.LOT_NUMBER,gbh.PLAN_START_DATE,gbh.ACTUAL_START_DATE,
gbh.PLAN_CMPLT_DATE,gbh.ACTUAL_CMPLT_DATE,msi.PRIMARY_UOM_CODE,fu.USER_NAME,fu.DESC
RIPTION

*************************LOT Wise Batch Detail


****************************************************

select x.BATCH_ID, x.BATCH_NO, y.INVENTORY_ITEM_ID,


msi.segment1,SUM(a.TRANSACTION_QUANTITY) Qty, k.LOT_NUMBER,
org.ORGANIZATION_NAME,RSH.SHIPMENT_NUM,RSH.RECEIPT_NUM
from gme_batch_header x, GME_MATERIAL_DETAILS y,mtl_material_transactions a,
mtl_material_transactions d,
mtl_transaction_lot_numbers k, mtl_system_items_b msi, ORG_ORGANIZATION_DEFINITIONS
org,RCV_SHIPMENT_HEADERS RSH,mtl_transaction_lot_numbers kk,RCV_SHIPMENT_LINES RSL
where x.BATCH_ID=y.BATCH_ID
and y.ORGANIZATION_ID=231
and y.line_type=-1
and y.batch_id in( select distinct a.TRANSACTION_SOURCE_ID
from mtl_material_transactions a, mtl_transaction_lot_numbers b
where a.TRANSACTION_ID = b.TRANSACTION_ID
and a.ORGANIZATION_ID=231
and b.LOT_NUMBER='KO-225'
and a.TRANSACTION_TYPE_ID = 44)
and y.ORGANIZATION_ID= a.ORGANIZATION_ID
and y.INVENTORY_ITEM_ID= a.INVENTORY_ITEM_ID
and y.batch_id = a.TRANSACTION_SOURCE_ID
and a.TRANSACTION_TYPE_ID in (35,43)
and y.batch_id = 5233618
and a.TRANSACTION_ID=k.TRANSACTION_ID
and a.INVENTORY_ITEM_ID = msi.INVENTORY_ITEM_ID
and a.ORGANIZATION_ID= msi.ORGANIZATION_ID
and a.ORGANIZATION_ID= org.ORGANIZATION_ID
AND d.SHIPMENT_NUMBER = RSH.SHIPMENT_NUM
AND k.LOT_NUMBER = kk.LOT_NUMBER
AND kk.transaction_id = d.transaction_id
and d.TRANSACTION_TYPE_ID = 61
and d.SHIPMENT_NUMBER = RSH.SHIPMENT_NUM
and d.ORGANIZATION_ID = 231
AND k.INVENTORY_ITEM_ID = kk.INVENTORY_ITEM_ID
AND k.ORGANIZATION_ID= kk.ORGANIZATION_ID
AND RSH.SHIPMENT_HEADER_ID = RSL.SHIPMENT_HEADER_ID
AND RSL.ITEM_ID = kk.INVENTORY_ITEM_ID
AND RSL.TO_ORGANIZATION_ID = kk.ORGANIZATION_ID
Group by x.BATCH_ID, x.BATCH_NO, y.INVENTORY_ITEM_ID, msi.segment1, k.LOT_NUMBER,
org.ORGANIZATION_NAME,RSH.SHIPMENT_NUM,RSH.RECEIPT_NUM

You might also like