DBA Data[Home] [Help]

PACKAGE: APPS.AHL_UMP_UTIL_PKG

Source


1 PACKAGE AHL_UMP_UTIL_PKG AS
2 /* $Header: AHLUUMPS.pls 120.1 2008/02/11 00:26:56 sracha ship $ */
3 
4 --Constants used in UMP methods
5 G_PC_PRIMARY_FLAG       CONSTANT VARCHAR2(1) := 'P';
6 G_PC_SECONDARY_FLAG     CONSTANT VARCHAR2(1) := 'S';
7 G_PC_DRAFT_STATUS       CONSTANT VARCHAR2(30) := 'DRAFT';
8 G_PC_COMPLETE_STATUS    CONSTANT VARCHAR2(30) := 'COMPLETE';
9 G_PC_ITEM_ASSOCIATION   CONSTANT VARCHAR2(1)  := 'P';
10 G_PC_UNIT_ASSOCIATION   CONSTANT VARCHAR2(1)  := 'U';
11 
12 -----------------------------------------------------------
13 -- Function to get unit configuration name for a given   --
14 -- item instance.                                        --
15 -----------------------------------------------------------
16 FUNCTION get_unitName (p_csi_item_instance_id  IN  NUMBER)
17 RETURN VARCHAR2;
18 
19 pragma restrict_references (get_unitName, WNDS,WNPS, RNPS);
20 
21 
22 
23 
24 -------------------------------------------------------
25 -- Function to get the children count for a group MR --
26 -------------------------------------------------------
27 FUNCTION GetCount_childUE(p_ue_id IN NUMBER)
28 RETURN NUMBER;
29 
30 pragma restrict_references (GetCount_childUE, WNDS,WNPS, RNPS);
31 
32 
33 
34 
35 ------------------------------------------------------------------------
36 -- Procedure to get the last accomplishment of an MR for any given item
37 -- instance. --
38 -------------------------------------------------------------------------
39 PROCEDURE get_last_accomplishment (p_csi_item_instance_id IN         NUMBER,
40                                    p_mr_header_id         IN         NUMBER,
41                                    x_accomplishment_date  OUT NOCOPY DATE,
42                                    x_unit_effectivity_id  OUT NOCOPY NUMBER,
43                                    x_deferral_flag        OUT NOCOPY BOOLEAN,
44                                    x_status_code          OUT NOCOPY VARCHAR2,
45                                    x_return_val           OUT NOCOPY BOOLEAN);
46 
47 
48 
49 -----------------------------------------------------------
50 -- Procedure to get Visit details for a unit effectivity --
51 -----------------------------------------------------------
52 PROCEDURE get_Visit_Details ( p_unit_effectivity_id  IN         NUMBER,
53                               x_visit_Start_date     OUT NOCOPY DATE,
54                               x_visit_End_date       OUT NOCOPY DATE,
55                               x_visit_Assign_code    OUT NOCOPY VARCHAR2);
56 
57 
58 -------------------------------------------------------------------------------
59 -- Function to get the visit status - planning/released/closed/              --
60 -------------------------------------------------------------------------------
61 FUNCTION get_Visit_Status ( p_unit_effectivity_id  IN  NUMBER)
62 
63 RETURN VARCHAR2;
64 
65 
66 -----------------------------------------------------------------------------
67 -- Procedure to check if an Unit Effectivity is in execution
68 -- Uses the get_Visit_Status procedure given above
69 -----------------------------------------------------------------------------
70 FUNCTION Is_UE_In_Execution (
71   p_ue_id   NUMBER)
72 RETURN boolean;
73 
74 
75 ---------------------------------------------------------------------
76 -- Procedure to get Service Request details for a unit effectivity --
77 -- Used in Preventive Maintenance mode only                        --
78 ---------------------------------------------------------------------
79 PROCEDURE get_ServiceRequest_Details (p_unit_effectivity_id IN         NUMBER,
80                                       x_incident_id         OUT NOCOPY NUMBER,
81                                       x_incident_number     OUT NOCOPY VARCHAR2,
82                                       x_scheduled_date      OUT NOCOPY DATE);
83 
84 
85 -----------------------------------------------------------
86 -- Procedure to populate the AHL_APPLICABLE_MRS temporary --
87 -- table with the results of AHL_FMP_PUB.GET_APPLICABLE_MRS--
88 -- API.
89 -----------------------------------------------------------
90 PROCEDURE Populate_Appl_MRs (
91     p_csi_ii_id           IN            NUMBER,
92     p_include_doNotImplmt IN            VARCHAR2 := 'Y',
93     x_return_status       OUT  NOCOPY   VARCHAR2,
94     x_msg_count           OUT  NOCOPY   NUMBER,
95     x_msg_data            OUT  NOCOPY   VARCHAR2 ) ;
96 
97 
98 -----------------------------------------------------------
99 -- Procedure to construct all applicable mr relns based  --
100 -- on values in AHL_APPLICABLE_MRS table.                --
101 -----------------------------------------------------------
102 PROCEDURE Process_Group_MRs;
103 
104 -----------------------------------------------------------
105 -- Procedure to construct for one mr + item instance     --
106 -- combination, the set of descendent mr + item instances--
107 -----------------------------------------------------------
108 PROCEDURE Process_Group_MR_Instance (
109     p_top_mr_id                IN            NUMBER,
110     p_top_item_instance_id     IN            NUMBER,
111     p_init_temp_table          IN            VARCHAR2  DEFAULT 'N') ;
112 
113 
114 ------------------------------------------------------------------------
115 -- Procedure to get the first accomplishment of an MR for any given item
116 -- instance. --
117 -------------------------------------------------------------------------
118 PROCEDURE get_first_accomplishment (p_csi_item_instance_id IN         NUMBER,
119                                     p_mr_header_id         IN         NUMBER,
120                                     x_accomplishment_date  OUT NOCOPY DATE,
121                                     x_unit_effectivity_id  OUT NOCOPY NUMBER,
122                                     x_deferral_flag        OUT NOCOPY BOOLEAN,
123                                     x_status_code          OUT NOCOPY VARCHAR2,
124                                     x_return_val           OUT NOCOPY BOOLEAN);
125 
126 END AHL_UMP_UTIL_PKG;