DBA Data[Home] [Help]

APPS.INV_CONVERT SQL Statements

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

Line: 75

        select  t.conversion_rate      std_to_rate,
                t.uom_class            std_to_class,
                f.conversion_rate      std_from_rate,
                f.uom_class            std_from_class
        from  mtl_uom_conversions t,
              mtl_uom_conversions f
        where t.inventory_item_id in (item_id, 0)
        and   t.uom_code = to_unit
        and   nvl(t.disable_date, trunc(sysdate) + 1) > trunc(sysdate)
        and   f.inventory_item_id in (item_id, 0)
        and   f.uom_code = from_unit
        and   nvl(f.disable_date, trunc(sysdate) + 1) > trunc(sysdate)
        order by t.inventory_item_id desc,
                 f.inventory_item_id desc;
Line: 95

	 select  conversion_rate      std_from_rate,
	         uom_class            std_from_class
	   from  mtl_uom_conversions
	   where inventory_item_id in (item_id, 0)
	   and   uom_code = from_unit
	   and   nvl(disable_date, trunc(sysdate) + 1) > trunc(sysdate)
	   order by inventory_item_id desc;
Line: 106

       select  conversion_rate      std_to_rate,
	       uom_class            std_to_class
	 from  mtl_uom_conversions
	 where inventory_item_id in (item_id, 0)
	 and   uom_code = to_unit
	 and   nvl(disable_date, trunc(sysdate) + 1) > trunc(sysdate)
	 order by inventory_item_id desc;
Line: 118

        select decode(to_uom_class, to_class, 1, 2) to_flag,
               decode(from_uom_class, from_class, 1, to_class, 2, 0) from_flag,
               conversion_rate rate
        from   mtl_uom_class_conversions
        where  inventory_item_id = item_id
        and    to_uom_class in (from_class, to_class)
        and    nvl(disable_date, trunc(sysdate) + 1) > trunc(sysdate);
Line: 135

        select decode(to_uom_class, to_class, 1, 2) to_flag,
               decode(from_uom_class, from_class, 1, to_class, 2, 0) from_flag,
               conversion_rate rate
        from   mtl_lot_uom_class_conversions
        where  inventory_item_id = item_id
        and    organization_id = p_organization_id
        and    lot_number = p_lot_number
        and    to_uom_class in (from_class, to_class)
        and    nvl(disable_date, trunc(sysdate) + 1) > trunc(sysdate);
Line: 543

          SELECT uom_code INTO fm_unt FROM mtl_units_of_measure
          WHERE  unit_of_measure = from_name;
Line: 546

	  SELECT uom_code INTO to_unt FROM mtl_units_of_measure
          WHERE  unit_of_measure = to_name;
Line: 662

          SELECT uom_code INTO fm_unt FROM mtl_units_of_measure
          WHERE  unit_of_measure = from_name;
Line: 665

	  SELECT uom_code INTO to_unt FROM mtl_units_of_measure
          WHERE  unit_of_measure = to_name;
Line: 763

	select PRIMARY_UOM_CODE, ALLOWED_UNITS_LOOKUP_CODE
	  from mtl_system_items msi,
	  MTL_UNITS_OF_MEASURE MTLUOM2
	  where msi.ORGANIZATION_ID = p_organization_id AND
	  msi.INVENTORY_ITEM_ID = p_item_id  AND
	  MTLUOM2.uom_code = msi.PRIMARY_UOM_CODE AND
	  NVL(MTLUOM2.DISABLE_DATE,TRUNC(SYSDATE)+1) > TRUNC(SYSDATE);
Line: 773

	select MTLUOM2.uom_code, MTLUCV.uom_class
	  from  MTL_UNITS_OF_MEASURE MTLUOM2,
	  MTL_UOM_CONVERSIONS  MTLUCV,
	  MTL_UOM_CLASSES      MTLCLS
	  where
	  MTLUOM2.uom_code = p_uom_code  AND
	  MTLUCV.uom_code  = MTLUOM2.uom_code AND
	  MTLUCV.inventory_item_id=0 AND
	  MTLCLS.uom_class = MTLUOM2.uom_class AND
	  NVL(MTLCLS.DISABLE_DATE,TRUNC(SYSDATE)+1) > TRUNC(SYSDATE) AND
	  NVL(MTLUCV.DISABLE_DATE,TRUNC(SYSDATE)+1) > TRUNC(SYSDATE) AND
	  NVL(MTLUOM2.DISABLE_DATE,TRUNC(SYSDATE)+1) > TRUNC(SYSDATE) AND
	  MTLUCV.uom_class = (select MTLPRI1.uom_class
			      from MTL_UNITS_OF_MEASURE MTLPRI1
			      where MTLPRI1.uom_code = l_primary_uom_code AND
			      NVL(MTLPRI1.DISABLE_DATE,TRUNC(SYSDATE)+1) > TRUNC(SYSDATE)
			      );
Line: 792

	select MTLUOM2.uom_code, MTLUCV.uom_class
	  from  MTL_UNITS_OF_MEASURE MTLUOM2,
	  MTL_UOM_CONVERSIONS  MTLUCV,
	  MTL_UOM_CLASSES      MTLCLS
	  where MTLUOM2.uom_code = p_uom_code  AND
	  MTLUCV.uom_code  = MTLUOM2.uom_code AND
	  MTLUCV.inventory_item_id = p_item_id AND
	  MTLCLS.uom_class = MTLUOM2.uom_class AND
	  NVL(MTLCLS.DISABLE_DATE,TRUNC(SYSDATE)+1) > TRUNC(SYSDATE) AND
	  NVL(MTLUOM2.DISABLE_DATE,TRUNC(SYSDATE)+1) > TRUNC(SYSDATE) AND
	  NVL(MTLUCV.DISABLE_DATE,TRUNC(SYSDATE)+1) > TRUNC(SYSDATE);
Line: 807

	select MTLUOM2.uom_code, MTLUOM2.uom_class
	  from   MTL_UNITS_OF_MEASURE MTLUOM2,
	  MTL_UOM_CONVERSIONS  MTLUCV,
	  MTL_UOM_CLASSES      MTLCLS
	  where
	  MTLUOM2.uom_code = p_uom_code  AND
	  MTLUCV.uom_code  = MTLUOM2.uom_code AND
	  MTLCLS.uom_class = MTLUOM2.uom_class AND
	  NVL(MTLCLS.DISABLE_DATE,TRUNC(SYSDATE)+1) > TRUNC(SYSDATE) AND
	  NVL(MTLUOM2.DISABLE_DATE,TRUNC(SYSDATE)+1) > TRUNC(SYSDATE) AND
	  NVL(MTLUCV.DISABLE_DATE,TRUNC(SYSDATE)+1) > TRUNC(SYSDATE) AND
	  l_allowed_units in (1,3) AND MTLUCV.inventory_item_id = p_item_id
	  UNION ALL
	  select MTLUOM2.uom_code, MTLUOM2.uom_class
	  from   MTL_UNITS_OF_MEASURE MTLUOM2,
	  MTL_UOM_CONVERSIONS  MTLUCV,
	  MTL_UOM_CLASSES      MTLCLS
	  where
	  MTLUOM2.uom_code = p_uom_code  AND
	  MTLUCV.uom_code  = MTLUOM2.uom_code AND
	  MTLCLS.uom_class = MTLUOM2.uom_class AND
	  NVL(MTLCLS.DISABLE_DATE,TRUNC(SYSDATE)+1) > TRUNC(SYSDATE) AND
	  NVL(MTLUOM2.DISABLE_DATE,TRUNC(SYSDATE)+1) > TRUNC(SYSDATE) AND
	  NVL(MTLUCV.DISABLE_DATE,TRUNC(SYSDATE)+1) > TRUNC(SYSDATE) AND
	  l_allowed_units in (1,3) AND MTLUCV.inventory_item_id=0 AND
	  MTLUCV.uom_class = (select MTLPRI1.uom_class
			      from MTL_UNITS_OF_MEASURE MTLPRI1
			      where MTLPRI1.uom_code = l_primary_uom_code
			      )
	  UNION ALL
	  select MTLUOM2.uom_code, MTLUOM2.uom_class
	  from   MTL_UNITS_OF_MEASURE MTLUOM2,
	  MTL_UOM_CONVERSIONS  MTLUCV,
	  MTL_UOM_CLASSES      MTLCLS
	  where
	  MTLUOM2.uom_code = p_uom_code  AND
	  MTLUCV.uom_code  = MTLUOM2.uom_code AND
	  MTLCLS.uom_class = MTLUOM2.uom_class AND
	  NVL(MTLCLS.DISABLE_DATE,TRUNC(SYSDATE)+1) > TRUNC(SYSDATE) AND
	  NVL(MTLUOM2.DISABLE_DATE,TRUNC(SYSDATE)+1) > TRUNC(SYSDATE) AND
	  NVL(MTLUCV.DISABLE_DATE,TRUNC(SYSDATE)+1) > TRUNC(SYSDATE) AND
	  l_allowed_units in (1,3) AND MTLUCV.inventory_item_id=0 AND
	  exists(
		 select 'UOM_CLASS conversion exists for the class of UOM supplied'
		 from MTL_UOM_CLASS_CONVERSIONS MTLUCC1
		 where
		 MTLUCC1.to_uom_class = MTLUCV.uom_class AND
		 MTLUCC1.inventory_item_id = p_item_id AND
		 NVL(MTLUCC1.DISABLE_DATE,TRUNC(SYSDATE)+1) > TRUNC(SYSDATE)
		 )
	  UNION ALL
	  select MTLUOM2.uom_code, MTLUOM2.uom_class
	  from   MTL_UNITS_OF_MEASURE MTLUOM2,
	  MTL_UOM_CONVERSIONS  MTLUCV,
	  MTL_UOM_CLASSES      MTLCLS
	  where
	  MTLUOM2.uom_code = p_uom_code  AND
	  MTLUCV.uom_code  = MTLUOM2.uom_code AND
	  MTLCLS.uom_class = MTLUOM2.uom_class AND
	  NVL(MTLCLS.DISABLE_DATE,TRUNC(SYSDATE)+1) > TRUNC(SYSDATE) AND
	  NVL(MTLUOM2.DISABLE_DATE,TRUNC(SYSDATE)+1) > TRUNC(SYSDATE) AND
	  NVL(MTLUCV.DISABLE_DATE,TRUNC(SYSDATE)+1) > TRUNC(SYSDATE) AND
	  l_allowed_units in (2,3) AND MTLUCV.inventory_item_id=0 AND
	  exists(
		 select 'UOM_CLASS conversion exists for the class of UOM supplied'
		 from MTL_UOM_CLASS_CONVERSIONS MTLUCC
		 where
		 MTLUCC.to_uom_class = MTLUCV.uom_class AND
		 MTLUCC.INVENTORY_ITEM_ID = p_item_id  AND
              NVL(MTLUCC.DISABLE_DATE,TRUNC(SYSDATE)+1) > TRUNC(SYSDATE)
		 )
	  UNION ALL
	  select MTLUOM2.uom_code, MTLUOM2.uom_class
	  from   MTL_UNITS_OF_MEASURE MTLUOM2,
	  MTL_UOM_CONVERSIONS  MTLUCV,
	  MTL_UOM_CLASSES      MTLCLS
	  where
	  MTLUOM2.uom_code = p_uom_code  AND
	  MTLUCV.uom_code  = MTLUOM2.uom_code AND
	  MTLCLS.uom_class = MTLUOM2.uom_class AND
	  NVL(MTLCLS.DISABLE_DATE,TRUNC(SYSDATE)+1) > TRUNC(SYSDATE) AND
	  NVL(MTLUOM2.DISABLE_DATE,TRUNC(SYSDATE)+1) > TRUNC(SYSDATE) AND
	  NVL(MTLUCV.DISABLE_DATE,TRUNC(SYSDATE)+1) > TRUNC(SYSDATE) AND
	  l_allowed_units in (2,3) AND MTLUCV.inventory_item_id=0 AND
	  MTLUCV.uom_class = (select MTLPRI.uom_class
			      from MTL_UNITS_OF_MEASURE MTLPRI
			      where MTLPRI.uom_code = l_primary_uom_code
			      );
Line: 1046

           SELECT pick_uom_code, inv_ui_item_lovs.get_conversion_rate(pick_uom_code, p_org_Id, p_item_Id)
           INTO   l_loc_uom, l_uom_string
           FROM   mtl_item_locations
           WHERE  organization_id = p_org_id
           AND    subinventory_code = p_sub_code
           AND    inventory_location_id = p_loc_id;
Line: 1069

           SELECT pick_uom_code, inv_ui_item_lovs.get_conversion_rate(pick_uom_code,
                                   p_org_Id,
                                   p_item_Id)
           INTO   l_loc_uom, l_uom_string
           FROM   MTL_SECONDARY_INVENTORIES
           WHERE  secondary_inventory_name = p_sub_code
           AND    organization_id = p_org_id;
Line: 1150

SELECT uom_code
FROM   mtl_units_of_measure
WHERE  unit_of_measure = p_unit;