DBA Data[Home] [Help]

PACKAGE BODY: APPS.GML_ITEM_AUTOLOT

Source


1 PACKAGE BODY GML_ITEM_AUTOLOT AS
2 /* $Header: GMLATLTB.pls 115.1 2003/05/06 16:08:46 pbamb noship $ */
3 
4   /*##########################################################################
5   #
6   #  FUNCTION
7   #   item_autolot_enabled
8   #
9   #  DESCRIPTION
10   #
11   #      This package contains a function which determines
12   #	 whether opm item is autlot active or not
13   # 	 The Zeroth version of the package function will
14   #      return FALSE indicating that item is not autlot
15   #      enabled and the next version will return check
16   #      ic_item_mst indicating that item is autolot active
17   #
18   # MODIFICATION HISTORY
19   # 05-MAY-2003  PBamb Created
20   #########################################################################*/
21 
22 FUNCTION item_autolot_enabled(P_item_id IN NUMBER) RETURN BOOLEAN IS
23 
24 Cursor Cr_autolot IS
25 Select	AUTOLOT_ACTIVE_INDICATOR
26 From	ic_item_mst
27 Where	item_id = p_item_id;
28 
29 v_autolot_active NUMBER;
30 
31 BEGIN
32 	Open  Cr_autolot;
33 	Fetch Cr_autolot into v_autolot_active;
34 	If Cr_autolot%NOTFOUND THEN
35 	  Close Cr_autolot;
36 	  RETURN FALSE;
37 	ELSE
38 	  Close Cr_autolot;
39 	  IF v_autolot_active = 1 THEN
40 	     RETURN TRUE;
41 	  ELSE
42 	     RETURN FALSE;
43 	  END IF;
44 	END IF;
45 
46 EXCEPTION
47  WHEN OTHERS THEN
48    RETURN (FALSE);
49 
50 END item_autolot_enabled ;
51 
52 END GML_ITEM_AUTOLOT;