SELECT ORGANIZATION_CODE AS "Warehouse name", SEGMENT1 AS "Item Number",
Description AS "Item Descriptions",PRIMARY_UOM_CODE AS "UOM",
sum(MOQ.TRANSACTION_QUANTITY) AS "Quantity",ACTUAL_COST AS "Cost"
FROM MTL_PARAMETERS MP,MTL_SYSTEM_ITEMS_B MB,
MTL_ONHAND_QUANTITIES MOQ,MTL_MATERIAL_TRANSACTIONS MMT
WHERE MP.ORGANIZATION_ID = MB.ORGANIZATION_ID
AND MB.INVENTORY_ITEM_ID = MOQ.INVENTORY_ITEM_ID
AND MB.ORGANIZATION_ID = MOQ.ORGANIZATION_ID
AND MOQ.INVENTORY_ITEM_ID = MMT.INVENTORY_ITEM_ID
AND MMT.ORGANIZATION_ID = MOQ.ORGANIZATION_ID
AND MOQ.CREATE_TRANSACTION_ID = MMT.TRANSACTION_ID
AND MP.ORGANIZATION_ID = NVL(:ORG,MP.ORGANIZATION_ID)
AND TRUNC(MOQ.CREATION_DATE) BETWEEN NVL (:FROM_DATE, trunc(moq.creation_date))
AND NVL (:TO_DATE, trunc(moq.creation_date))
group by moq.organization_id,ORGANIZATION_CODE,SEGMENT1,Description,PRIMARY_UOM_CODE,ACTUAL_COST,MOQ.CREATION_DATE,
MOQ.INVENTORY_ITEM_ID;
function AfterPForm return boolean is
begin
:F_D:=to_date(:FROM_DATE,'YYYY/MM/DD HH24:MI:SS');
:T_D:=to_date(:TO_DATE,'YYYY/MM/DD HH24:MI:SS');
return (TRUE);
end;
function BeforeReport return boolean is
begin
SRW.USER_EXIT('FND SRWINIT');
return (TRUE);
end;
function AfterReport return boolean is
begin
SRW.MESSAGE(000,'********** HMC Warehouse Obsolesce Report **********');
if :CS_COUNT > 0 then
SRW.MESSAGE(001,'Number Of Records Printed '||:CS_COUNT);
else
SRW.MESSAGE(001,'No data for the provided report parameters');
end if;
SRW.MESSAGE(000,'********** End of HMC Warehouse Obsolesce Report **********');
SRW.USER_EXIT('FND SRWEXIT');
return (TRUE);
end;
Description AS "Item Descriptions",PRIMARY_UOM_CODE AS "UOM",
sum(MOQ.TRANSACTION_QUANTITY) AS "Quantity",ACTUAL_COST AS "Cost"
FROM MTL_PARAMETERS MP,MTL_SYSTEM_ITEMS_B MB,
MTL_ONHAND_QUANTITIES MOQ,MTL_MATERIAL_TRANSACTIONS MMT
WHERE MP.ORGANIZATION_ID = MB.ORGANIZATION_ID
AND MB.INVENTORY_ITEM_ID = MOQ.INVENTORY_ITEM_ID
AND MB.ORGANIZATION_ID = MOQ.ORGANIZATION_ID
AND MOQ.INVENTORY_ITEM_ID = MMT.INVENTORY_ITEM_ID
AND MMT.ORGANIZATION_ID = MOQ.ORGANIZATION_ID
AND MOQ.CREATE_TRANSACTION_ID = MMT.TRANSACTION_ID
AND MP.ORGANIZATION_ID = NVL(:ORG,MP.ORGANIZATION_ID)
AND TRUNC(MOQ.CREATION_DATE) BETWEEN NVL (:FROM_DATE, trunc(moq.creation_date))
AND NVL (:TO_DATE, trunc(moq.creation_date))
group by moq.organization_id,ORGANIZATION_CODE,SEGMENT1,Description,PRIMARY_UOM_CODE,ACTUAL_COST,MOQ.CREATION_DATE,
MOQ.INVENTORY_ITEM_ID;
function AfterPForm return boolean is
begin
:F_D:=to_date(:FROM_DATE,'YYYY/MM/DD HH24:MI:SS');
:T_D:=to_date(:TO_DATE,'YYYY/MM/DD HH24:MI:SS');
return (TRUE);
end;
function BeforeReport return boolean is
begin
SRW.USER_EXIT('FND SRWINIT');
return (TRUE);
end;
function AfterReport return boolean is
begin
SRW.MESSAGE(000,'********** HMC Warehouse Obsolesce Report **********');
if :CS_COUNT > 0 then
SRW.MESSAGE(001,'Number Of Records Printed '||:CS_COUNT);
else
SRW.MESSAGE(001,'No data for the provided report parameters');
end if;
SRW.MESSAGE(000,'********** End of HMC Warehouse Obsolesce Report **********');
SRW.USER_EXIT('FND SRWEXIT');
return (TRUE);
end;
No comments:
Post a Comment