DBA Data[Home] [Help]

APPS.EAM_MATERIAL_ALLOCQTY_PKG SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 19

         select sum(nvl(mtrl.quantity_detailed,0) - nvl(mtrl.quantity_delivered,0))
             into l_quantity_allocated
          from MTL_TXN_REQUEST_LINES mtrl,MTL_TXN_REQUEST_HEADERS mtrh
          where
            mtrl.TXN_SOURCE_ID = p_wip_entity_id and
            mtrl.TXN_SOURCE_LINE_ID = p_operation_seq_num and
            mtrl.organization_id = p_organization_id and
            mtrl.INVENTORY_ITEM_ID = p_inventory_item_id and
            -- preapproved status or open lines
            mtrl.line_status = l_line_status
	    and mtrl.header_id = mtrh.header_id
	    and mtrh.move_order_type=l_move_order_type
          group by mtrl.organization_id, mtrl.TXN_SOURCE_ID,
            mtrl.TXN_SOURCE_LINE_ID, mtrl.INVENTORY_ITEM_ID;
Line: 60

	     select sum(nvl(mtrl.quantity_detailed,0) - nvl(mtrl.quantity_delivered,0))
		     into l_quantity_allocated
		  from MTL_TXN_REQUEST_LINES mtrl,MTL_TXN_REQUEST_HEADERS mtrh
		  where
		    mtrl.TXN_SOURCE_ID = p_wip_entity_id and
		    mtrl.TXN_SOURCE_LINE_ID = p_operation_seq_num and
		    mtrl.organization_id = p_organization_id and
		    mtrl.INVENTORY_ITEM_ID = p_inventory_item_id and
		    -- preapproved status or open lines
		    mtrl.line_status =l_line_status
		    and mtrl.header_id = mtrh.header_id
		    and mtrh.move_order_type=l_move_order_type
		  group by mtrl.organization_id, mtrl.TXN_SOURCE_ID,
		    mtrl.TXN_SOURCE_LINE_ID, mtrl.INVENTORY_ITEM_ID;
Line: 114

     SELECT
	    mtlbkfv.lot_control_code,
            mtlbkfv.serial_number_control_code,
            mtlbkfv.revision_qty_control_code
       FROM mtl_system_items_b_kfv mtlbkfv
       WHERE mtlbkfv.organization_id = p_organization_id
       AND mtlbkfv.inventory_item_id = p_inventory_item_id;
Line: 206

                    SELECT NVL(SUM(QUANTITY),0)
                      into l_qoh
                      FROM   MTL_SECONDARY_INVENTORIES MSS,
                             MTL_ITEM_QUANTITIES_VIEW MOQ,
                             MTL_SYSTEM_ITEMS MSI
                     WHERE  MOQ.ORGANIZATION_ID = p_organization_id
                       AND  MSI.ORGANIZATION_ID = p_organization_id
                       AND  MSS.ORGANIZATION_ID = p_organization_id
                       AND  MOQ.INVENTORY_ITEM_ID = p_inventory_item_id
                       AND  MSI.INVENTORY_ITEM_ID = MOQ.INVENTORY_ITEM_ID
                       AND  MSS.SECONDARY_INVENTORY_NAME = MOQ.SUBINVENTORY_CODE
                       AND  MSS.AVAILABILITY_TYPE = 1;