DBA Data[Home] [Help]

PACKAGE BODY: APPS.GMAUOM

Source


1 package body gmaUom as
2 /*      $Header: gmauomvb.pls 115.2 2002/02/20 07:39:04 pkm ship       $ */
3 
4 /* This function will return true if uom_code passed to this function
5    exists as unit_of_measure in another row. */
6  function isUomCodeThere(
7 		p_row_id varchar2,
8 		p_uom_code varchar2) return boolean is
9 
10  uom_count number:=0;
11 
12  Begin
13 
14 	select count(*) into uom_count
15 	from mtl_units_of_measure
16 	where unit_of_measure = p_uom_code
17 	and (row_id <> p_row_id
18 	or p_row_id is null);
19 
20 	if ( uom_count >= 1) THEN
21 	  return true;
22 	else
23 	  return false;
24 	end if;
25  exception
26 	when others then
27 		return false;
28  end;
29 
30 /* This function will return true if unit_of_measure passed to this function
31    exists as uom_code in another row. */
32  function isUnitOfMeasureThere(
33 			p_row_id varchar2,
34 			p_unit_of_measure varchar2) return boolean  is
35  uom_count number :=0;
36 
37  Begin
38 
39 	select count(*) into uom_count
40 	from mtl_units_of_measure
41 	where uom_code = p_unit_of_measure
42 	and (row_id <> p_row_id
43 	or p_row_id is null);
44 
45 	if ( uom_count >= 1) THEN
46 	  return true;
47 	else
48 	  return false;
49 	end if;
50  exception
51 	when others then
52 		return false;
53  end;
54 
55 end gmaUom;