85: --| Validates Unit Of Measure exists |
86: --| |
87: --| DESCRIPTION |
88: --| This generic function validates that the Unit Of Measure supplied |
89: --| exists on sy_uoms_mst |
90: --| |
91: --| PARAMETERS |
92: --| p_um IN VARCHAR2 - Unit Of Measure Code |
93: --| |
99: --| |
100: --+==========================================================================+
101: -- Func end of comments
102: FUNCTION Validate_Um
103: ( p_um IN sy_uoms_mst.um_code%TYPE
104: )
105: RETURN BOOLEAN
106: IS
107: l_um_desc SY_UOMS_MST.um_desc%TYPE;
103: ( p_um IN sy_uoms_mst.um_code%TYPE
104: )
105: RETURN BOOLEAN
106: IS
107: l_um_desc SY_UOMS_MST.um_desc%TYPE;
108: CURSOR sy_uoms_mst_c1 IS
109: SELECT
110: um_desc
111: FROM
104: )
105: RETURN BOOLEAN
106: IS
107: l_um_desc SY_UOMS_MST.um_desc%TYPE;
108: CURSOR sy_uoms_mst_c1 IS
109: SELECT
110: um_desc
111: FROM
112: sy_uoms_mst
108: CURSOR sy_uoms_mst_c1 IS
109: SELECT
110: um_desc
111: FROM
112: sy_uoms_mst
113: WHERE
114: um_code = p_um
115: AND delete_mark = 0;
116:
115: AND delete_mark = 0;
116:
117: BEGIN
118:
119: OPEN sy_uoms_mst_c1;
120:
121: FETCH sy_uoms_mst_c1 INTO l_um_desc;
122: IF (sy_uoms_mst_c1%NOTFOUND)
123: THEN
117: BEGIN
118:
119: OPEN sy_uoms_mst_c1;
120:
121: FETCH sy_uoms_mst_c1 INTO l_um_desc;
122: IF (sy_uoms_mst_c1%NOTFOUND)
123: THEN
124: CLOSE sy_uoms_mst_c1;
125: RETURN FALSE;
118:
119: OPEN sy_uoms_mst_c1;
120:
121: FETCH sy_uoms_mst_c1 INTO l_um_desc;
122: IF (sy_uoms_mst_c1%NOTFOUND)
123: THEN
124: CLOSE sy_uoms_mst_c1;
125: RETURN FALSE;
126: ELSE
120:
121: FETCH sy_uoms_mst_c1 INTO l_um_desc;
122: IF (sy_uoms_mst_c1%NOTFOUND)
123: THEN
124: CLOSE sy_uoms_mst_c1;
125: RETURN FALSE;
126: ELSE
127: CLOSE sy_uoms_mst_c1;
128: RETURN TRUE;
123: THEN
124: CLOSE sy_uoms_mst_c1;
125: RETURN FALSE;
126: ELSE
127: CLOSE sy_uoms_mst_c1;
128: RETURN TRUE;
129: END IF;
130:
131: EXCEPTION