DBA Data[Home] [Help]

PACKAGE BODY: APPS.GMD_QC_STATUS_NEXT_PVT

Source


1 Package Body GMD_QC_STATUS_NEXT_PVT AS
2 /* $Header: GMDVSTNB.pls 115.0 2002/09/12 15:31:40 sschinch noship $ */
3 
4 /* Purpose: The package has code used in status management                 */
5 /*          The package will usually be called from the Change Status form */
6 /*                                                                         */
7 /*                                                                         */
8 /* Check_Dependent_Status  FUNCTION                                        */
9 /*                                                                         */
10 
11 
12   FUNCTION GET_REWORK_STATUS(p_from_status VARCHAR2,
13                              p_to_status VARCHAR2,
14 							 p_entity_type VARCHAR2)
15                                RETURN VARCHAR2
16   IS
17     CURSOR Cur_get_rework IS
18       SELECT rework_status
19       FROM GMD_QC_STATUS_NEXT
20       WHERE current_status = p_from_status
21       AND target_status  = p_to_status
22 	  AND entity_type  = p_entity_type
23 	  AND pending_status IS NOT NULL;
24 
25     l_rework_status  VARCHAR2(30);
26   BEGIN
27     OPEN Cur_get_rework;
28     FETCH Cur_get_rework INTO l_rework_status;
29     CLOSE Cur_get_rework;
30     RETURN (l_rework_status);
31 
32   END get_rework_status;
33 
34 
35   FUNCTION GET_PENDING_STATUS(p_from_status VARCHAR2,
36                               p_to_status VARCHAR2,
37  			  p_entity_type VARCHAR2)
38                                RETURN VARCHAR2
39   IS
40     CURSOR Cur_get_pending IS
41       SELECT pending_status
42       FROM GMD_QC_STATUS_NEXT
43       WHERE current_status = p_from_status
44       AND target_status  = p_to_status
45 	  AND  entity_type = p_entity_type;
46 
47     l_pending_status  VARCHAR2(30);
48   BEGIN
49     OPEN Cur_get_pending;
50     FETCH Cur_get_pending INTO l_pending_status;
51     CLOSE Cur_get_pending;
52     RETURN (l_pending_status);
53 
54   END get_pending_status;
55 
56 END GMD_QC_STATUS_NEXT_PVT;