1 package pa_purge_validate_pjrm as
2 /* $Header: PAXRMVTS.pls 120.2 2005/08/19 17:19:22 mwasowic noship $ */
3
4 g_purge_summary_flag VARCHAR2(1);
5 -- Start of comments
6 -- API name : Validate_pjrm
7 -- Type : Public
8 -- Pre-reqs : None
9 -- Function : Validates the project resource management details
10 -- and a project is not purged if there exists any
11 -- PJRM transactions for a project.
12 -- Following validations are performed.
13 -- 1. If there exists any assignment or requirement.
14 -- 2. If the project is of unassigned time or
15 -- an administrative type.
16 --
17 --
18 -- Parameters
19 -- p_project_Id IN NUMBER,
20 -- The project id for which records have
21 -- to be purged/archived.
22 -- p_Active_Flag IN VARCHAR2,
23 -- Indicates if batch contains ACTIVE or CLOSED projects
24 -- ( 'A' - Active , 'C' - Closed)
25 -- p_Txn_To_Date IN DATE,
26 -- Date on or before which all transactions are to be purged
27 -- (Will be used by Costing only)
28 -- X_Err_Stack IN OUT VARCHAR2,
29 -- Error stack
30 -- X_Err_Stage IN OUT VARCHAR2,
31 -- Stage in the procedure where error occurred
32 -- X_Err_Code IN OUT NUMBER
33 -- Error code returned from the procedure
34 -- = 0 SUCCESS
35 -- > 0 Application error
36 -- < 0 Oracle error
37 -- End of comments
38 procedure validate_pjrm ( p_project_id in NUMBER,
39 p_txn_to_date in DATE,
40 p_active_flag in VARCHAR2,
41 x_err_code in OUT NOCOPY NUMBER, --File.Sql.39 bug 4440895
42 x_err_stack in OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
43 x_err_stage in OUT NOCOPY VARCHAR2 ) ; --File.Sql.39 bug 4440895
44
45 /*The below procedure is added for PJR related archive purge enhancement --phase III
46 created by : Rajnish
47 */
48 -- Start of comments
49 -- API name : Validate_Requirement
50 -- Type : Public
51 -- Pre-reqs : None
52 -- Function : Validates the project resource management details for requirements
53 -- The proceduire do following validations
54 -- 1.In case of closed project purge,if there exist any requirement in open
55 -- status, do not purge the project and PJR transactions.
56 -- 2 In case of open Indirect project if there exists any requirement in OPEN status before the purge
57 -- till date,Project and PJR transactions will not be purged.
58 -- In both the above validations, the procedure will return error message if validation fails.
59 --
60 --
61
62 -- Parameters
63 -- p_project_Id IN NUMBER The project id for which records have
64 -- to be purged/archived.
65 -- p_Active_Flag IN VARCHAR2 Indicates if batch contains ACTIVE or CLOSED projects
66 -- ( 'A' - Active , 'C' - Closed)
67 -- p_Txn_To_Date IN DATE Date on or before which all transactions are to be purged
68 --
69 -- X_Err_Stack IN OUT VARCHAR2 Error stack
70 --
71 -- X_Err_Stage IN OUT VARCHAR2 Stage in the procedure where error occurred
72 --
73 -- X_Err_Code IN OUT NUMBER Error code returned from the procedure
74 -- = 0 SUCCESS
75 -- > 0 Application error
76 -- < 0 Oracle error
77 -- End of comments
78
79
80 Procedure Validate_Requirement ( p_project_id in NUMBER,
81 p_txn_to_date in DATE,
82 p_active_flag in VARCHAR2,
83 x_err_code in OUT NOCOPY NUMBER, --File.Sql.39 bug 4440895
84 x_err_stack in OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
85 x_err_stage in OUT NOCOPY VARCHAR2 ) ; --File.Sql.39 bug 4440895
86
87
88
89 /*The below procedure is added for PJR related archive purge enhancement --phase III
90 created by : Rajnish
91 */
92 -- Start of comments
93 -- API name : Validate_Assignment_
94 -- Type : Public
95 -- Pre-reqs : None
96 -- Function : Validates the project resource management details for requirements
97 -- The proceduire do following validations
98 -- 1.In case of closed project purge,if there exist any assignment whose end date
99 -- is greater than project closed date,then pjr assignment and project will not be purged.
100 -- In above validation, the procedure will return error message if validation fails.
101 --
102
103 -- Parameters
104 -- p_project_Id IN NUMBER The project id for which records have
105 -- to be purged/archived.
106 -- p_Active_Flag IN VARCHAR2 Indicates if batch contains ACTIVE or CLOSED projects
107 -- ( 'A' - Active , 'C' - Closed)
108 -- p_Txn_To_Date IN DATE Date on or before which all transactions are to be purged
109 --
110 -- X_Err_Stack IN OUT VARCHAR2 Error stack
111 --
112 -- X_Err_Stage IN OUT VARCHAR2 Stage in the procedure where error occurred
113 --
114 -- X_Err_Code IN OUT NUMBER Error code returned from the procedure
115 -- = 0 SUCCESS
116 -- > 0 Application error
117 -- < 0 Oracle error
118 -- End of comments
119
120
121 Procedure Validate_Assignment ( p_project_id in NUMBER,
122 p_txn_to_date in DATE,
123 p_active_flag in VARCHAR2,
124 x_err_code in OUT NOCOPY NUMBER, --File.Sql.39 bug 4440895
125 x_err_stack in OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
126 x_err_stage in OUT NOCOPY VARCHAR2 ) ; --File.Sql.39 bug 4440895
127
128
129 /* The below procedure is added for bug 2962582
130 Created By: Vinay */
131
132 -- Start of comments
133 -- API name : Validate_PJI
134 -- Type : Public
135 -- Pre-reqs : None
136 -- Function : Validates the PJI details for the project.
137 -- The procedure does the following validations
138 -- 1. In case PJI is installed and the project has unsummarized transactions, then it returns
139 -- error message.
140 --
141
142 -- Parameters
143 -- p_project_Id IN NUMBER The project id for which records have
144 -- to be purged/archived.
145 -- p_project_end_date IN DATE End date of the project to be purged.
146 --
147 -- X_Err_Stack IN OUT VARCHAR2 Error stack
148 --
149 -- X_Err_Stage IN OUT VARCHAR2 Stage in the procedure where error occurred
150 --
151 -- X_Err_Code IN OUT NUMBER Error code returned from the procedure
152 -- = 0 SUCCESS
153 -- > 0 Application error
154 -- < 0 Oracle error
155 -- End of comments
156
157 Procedure Validate_PJI ( p_project_id IN NUMBER,
158 p_project_end_date IN DATE,
159 x_err_code IN OUT NOCOPY NUMBER, --File.Sql.39 bug 4440895
160 x_err_stack IN OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
161 x_err_stage IN OUT NOCOPY VARCHAR2 ) ; --File.Sql.39 bug 4440895
162
163 /* The below procedure is added for bug 4255353
164 Created By: Ajdas */
165 -- Start of comments
166 -- API name : Validate_Perf_reporting
167 -- Type : Public
168 -- Pre-reqs : None
169 -- Function : Validates the New Summarization model migration of th eprojects
170 -- The procedure does the following validations
171 --
172
173 -- Parameters
174 -- p_project_Id IN NUMBER The project id for which records have
175 -- to be purged/archived.
176 -- X_Err_Stack IN OUT VARCHAR2 Error stack
177 --
178 -- X_Err_Stage IN OUT VARCHAR2 Stage in the procedure where error occurred
179 --
180 -- X_Err_Code IN OUT NUMBER Error code returned from the procedure
181 -- = 0 SUCCESS
182 -- > 0 Application error
183 -- < 0 Oracle error
184 -- End of comments
185
186 Procedure Validate_Perf_reporting ( p_project_id IN NUMBER,
187 x_err_code IN OUT NOCOPY NUMBER, --File.Sql.39 bug 4440895
188 x_err_stack IN OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
189 x_err_stage IN OUT NOCOPY VARCHAR2 ) ; --File.Sql.39 bug 4440895
190
191 END pa_purge_validate_pjrm;