DBA Data[Home] [Help]

PACKAGE: APPS.OTA_TMT_BUS1

Source


1 Package ota_tmt_bus1 as
2 /* $Header: ottmtrhi.pkh 120.0 2005/05/29 07:45:01 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |----------------------<chk_tp_measurement_code>---------------------------|
6 -- ----------------------------------------------------------------------------
7 -- {Start Of Comments}
8 --
9 -- Description:
10 --   Validates that the tp_measurement_code exists in hr_lookups and
11 --   that the combination with business_group_id is unique.
12 --
13 -- Prerequisites:
14 --   Both this parameter and the business_group_id are present.
15 --
16 -- In Parameters:
17 --   p_effective_date
18 --   p_tp_measurement_code
19 --   p_business_group_id
20 --
21 -- Post Success:
22 --   Processing continues if the values are legal.
23 --
24 -- Post Failure:
25 --   If an error has occurred, an error message will be raised.
26 --
27 -- Developer Implementation Notes:
28 --   This can be called for the form to validate if the business_group_id and
29 --   tp_measurement_code combination are valid. This should only be called
30 --   for an insert operation.
31 --
32 -- Access Status:
33 --   Internal Development Use Only.
34 --
35 -- {End Of Comments}
36 -- ----------------------------------------------------------------------------
37 Procedure chk_tp_measurement_code
38   (p_effective_date            in     date
39   ,p_tp_measurement_code       in     ota_tp_measurement_types.tp_measurement_code%TYPE
40   ,p_business_group_id         in     ota_tp_measurement_types.business_group_id%TYPE
41   );
42 -- ----------------------------------------------------------------------------
43 -- |----------------------<chk_del_tp_measurement_code>------------------------|
44 -- ----------------------------------------------------------------------------
45 -- {Start Of Comments}
46 --
47 -- Description:
48 --   Validates that the tp_measurement_code can be deleted from OTA_TP_MEASUREMENT_CODE
49 --   by checking that it does not exist in per_budgets.
50 --
51 -- Prerequisites:
52 --   Both this parameter and the business_group_id are present.
53 --
54 -- In Parameters:
55 --   p_tp_measurement_code
56 --   p_tp_measurement_Type_id
57 --   p_business_group_id
58 --
59 -- Post Success:
60 --   Processing continues if the row can be deleted.
61 --
62 -- Post Failure:
63 --   If the row cannot be deleted, an error is raised.
64 --
65 -- Developer Implementation Notes:
66 --   This can be called for the form to validate if the measure type
67 --   can be deleted.
68 --
69 -- Access Status:
70 --   Internal Development Use Only.
71 --
72 -- {End Of Comments}
73 -- ----------------------------------------------------------------------------
74 Procedure chk_del_tp_measurement_code
75   (p_tp_measurement_code       in     ota_tp_measurement_types.tp_measurement_code%TYPE
76   ,p_tp_measurement_type_id    in     ota_tp_measurement_types.tp_measurement_type_id%TYPE
77   ,p_business_group_id         in     ota_tp_measurement_types.business_group_id%TYPE
78   );
79 -- ----------------------------------------------------------------------------
80 -- |--------------------------------<chk_unit>--------------------------------|
81 -- ----------------------------------------------------------------------------
82 -- {Start Of Comments}
83 --
84 -- Description:
85 --   Validates that the unit is valid for both insert and update.
86 --
87 -- Prerequisites:
88 --   All parameters are persent.
89 --
90 -- In Parameters:
91 --   p_unit
92 --   p_business_group_id
93 --   p_effective_date
94 --   p_object_version_number
95 --   p_tp_measurement_type_id
96 --
97 -- Post Success:
98 --   Processing continues.
99 --
100 -- Post Failure:
101 --   An error is raised and processing stops.
102 --
103 -- Developer Implementation Notes:
104 --   None.
105 --
106 -- Access Status:
107 --   Internal Row Handler Use Only.
108 --
109 -- {End Of Comments}
110 -- ----------------------------------------------------------------------------
111 Procedure chk_unit
112   (p_effective_date            in     date
113   ,p_unit                      in     ota_tp_measurement_types.unit%TYPE
114   ,p_business_group_id         in     ota_tp_measurement_types.business_group_id%TYPE
115   ,p_object_version_number     in     ota_tp_measurement_types.object_version_number%TYPE
116   ,p_tp_measurement_type_id    in     ota_tp_measurement_types.tp_measurement_type_id%TYPE
117   );
118 -- ----------------------------------------------------------------------------
119 -- |--------------------------------<chk_budget_level>------------------------|
120 -- ----------------------------------------------------------------------------
121 -- {Start Of Comments}
122 --
123 -- Description:
124 --   Validates that the budget level is valid.
125 --
126 -- Prerequisites:
127 --   None.
128 --
129 -- In Parameters:
130 --  p_effective_date
131 --  p_business_group_id
132 --  p_budget_level
133 --  p_tp_measurement_code
134 --  p_object_version_number
135 --  p_tp_measurement_type_id
136 --
137 -- Post Success:
138 --   Processing continues.
139 --
140 -- Post Failure:
141 --   An error is raised and processing stops.
142 --
143 -- Developer Implementation Notes:
144 --   The budget-cost combination check has been passed out to a separate chk
145 --   procedure, as it is shared with the chk_cost procedure.
146 --
147 -- Access Status:
148 --   Internal Row Handler Use Only.
149 --
150 -- {End Of Comments}
151 -- ----------------------------------------------------------------------------
152 Procedure chk_budget_level
153   (p_effective_date            in     date
154   ,p_business_group_id         in     ota_tp_measurement_types.business_group_id%TYPE
155   ,p_budget_level              in     ota_tp_measurement_types.budget_level%TYPE
156   ,p_tp_measurement_code       in     ota_tp_measurement_types.tp_measurement_code%TYPE
157   ,p_object_version_number     in     ota_tp_measurement_types.object_version_number%TYPE
158   ,p_tp_measurement_type_id    in     ota_tp_measurement_types.tp_measurement_type_id%TYPE
159   );
160 -- ----------------------------------------------------------------------------
161 -- |--------------------------------<chk_budget_cost_combination>-------------|
162 -- ----------------------------------------------------------------------------
163 -- {Start Of Comments}
164 --
165 -- Description:
166 --   Validates that the budget level and cost level combination is valid.
167 --
168 -- Prerequisites:
169 --   All parameters are present.
170 --
171 -- In Parameters:
172 --   p_budget_level
173 --   p_cost_level
174 --   p_object_version_number
175 --   p_tp_measurement_type_id
176 --
177 -- Post Success:
178 --   Processing continues.
179 --
180 -- Post Failure:
181 --   An error is raised and processing stops.
182 --
183 -- Developer Implementation Notes:
184 --   None.
185 --
186 -- Access Status:
187 --   Internal Row Handler Use Only.
188 --
189 -- {End Of Comments}
190 -- ----------------------------------------------------------------------------
191 Procedure chk_budget_cost_combination
192   (p_budget_level              in     ota_tp_measurement_types.budget_level%TYPE
193   ,p_cost_level                in     ota_tp_measurement_types.cost_level%TYPE
194   ,p_object_version_number     in     ota_tp_measurement_types.object_version_number%TYPE
195   ,p_tp_measurement_type_id    in     ota_tp_measurement_types.tp_measurement_type_id%TYPE
196   );
197 -- ----------------------------------------------------------------------------
198 -- |--------------------------------<chk_cost_level>---------------------------|
199 -- ----------------------------------------------------------------------------
200 -- {Start Of Comments}
201 --
202 -- Description:
203 --   Validates that the cost level is valid.
204 --
205 -- Prerequisites:
206 --   All parameters are present.
207 --
208 -- In Parameters:
209 --   p_effective_date
210 --   p_business_group_id
211 --   p_cost_level
212 --   p_object_version_number
213 --   p_tp_measurement_type_id
214 --
215 -- Post Success:
216 --   Processing continues.
217 --
218 -- Post Failure:
219 --   An error is raised and processing stops.
220 --
221 -- Developer Implementation Notes:
222 --   The budget-cost combination check has been passed out to a separate chk
223 --   procedure, as it is shared with the chk_budget procedure.
224 --
225 -- Access Status:
226 --   Internal Row Handler Use Only.
227 --
228 -- {End Of Comments}
229 -- ----------------------------------------------------------------------------
230 Procedure chk_cost_level
231   (p_effective_date            in     date
232   ,p_business_group_id         in     ota_tp_measurement_types.business_group_id%TYPE
233   ,p_cost_level                in     ota_tp_measurement_types.cost_level%TYPE
234   ,p_object_version_number     in     ota_tp_measurement_types.object_version_number%TYPE
235   ,p_tp_measurement_type_id    in     ota_tp_measurement_types.tp_measurement_type_id%TYPE
236   );
237 -- ----------------------------------------------------------------------------
238 -- |-----------------------<chk_many_budget_values_flag>----------------------|
239 -- ----------------------------------------------------------------------------
240 -- {Start Of Comments}
241 --
242 -- Description:
243 --   Validates that the budget values flag is legal.
244 --
245 -- Prerequisites:
246 --   All parameters are present.
247 --
248 -- Parameters
249 --   p_effective_date
250 --   p_business_group_id
251 --   p_many_budget_values_flag
252 --   p_tp_measurement_code
253 --   p_object_version_number
254 --   p_tp_measurement_type_id
255 --
256 -- Post Success:
257 --   Processing continues.
258 --
259 -- Post Failure:
260 --   An error is raised and processing stops.
261 --
262 -- Developer Implementation Notes:
263 --   None.
264 --
265 -- Access Status:
266 --   Internal Row Handler Use Only.
267 --
268 -- {End Of Comments}
269 -- ----------------------------------------------------------------------------
270 Procedure chk_many_budget_values_flag
271   (p_effective_date            in     date
272   ,p_business_group_id         in     ota_tp_measurement_types.business_group_id%TYPE
273   ,p_many_budget_values_flag   in     ota_tp_measurement_types.many_budget_values_flag%TYPE
274   ,p_tp_measurement_code       in     ota_tp_measurement_types.tp_measurement_code%TYPE
275   ,p_object_version_number     in     ota_tp_measurement_types.object_version_number%TYPE
276   ,p_tp_measurement_type_id    in     ota_tp_measurement_types.tp_measurement_type_id%TYPE
277   );
278 -- ----------------------------------------------------------------------------
279 -- |-----------------------<chk_item_type_usage_id>---------------------------|
280 -- ----------------------------------------------------------------------------
281 -- {Start Of Comments}
282 --
283 -- Description:
284 --   Validates that the item type usage id is legal.
285 --
286 -- Prerequisites:
287 --   All parameters are present.
288 --
289 -- Parameters
290 --   p_item_type_usage_id
291 --   p_business_group_id
292 --   p_object_version_number
293 --   p_tp_measurement_type_id
294 --
295 -- Post Success:
296 --   Processing continues.
297 --
298 -- Post Failure:
299 --   An error is raised and processing stops.
300 --
301 -- Developer Implementation Notes:
302 --   None.
303 --
304 -- Access Status:
305 --   Internal Development Use Only.
306 --
307 -- {End Of Comments}
308 -- ----------------------------------------------------------------------------
309 Procedure chk_item_type_usage_id
310   (p_item_type_usage_id        in     ota_tp_measurement_types.item_type_usage_id%TYPE
311   ,p_business_group_id         in     ota_tp_measurement_types.business_group_id%TYPE
312   ,p_object_version_number     in     ota_tp_measurement_types.object_version_number%TYPE
313   ,p_tp_measurement_type_id    in     ota_tp_measurement_types.tp_measurement_type_id%TYPE
314   );
315 -- ----------------------------------------------------------------------------
316 -- |----------------------<chk_del_tp_measurement_type>------------------------|
317 -- ----------------------------------------------------------------------------
318 -- {Start Of Comments}
319 --
320 -- Description:
321 --   Validates that the tp_measurement_type_id can be deleted from OTA_TP_MEASUREMENT_CODE
322 --   by checking that no foreign key references exist.
323 --
324 -- Prerequisites:
325 --   tp_measurement_type_id is valid.
326 --
327 -- In Parameters:
328 --   p_tp_measurement_type_id
329 --
330 -- Post Success:
331 --   Processing continues if the row can be deleted.
332 --
333 -- Post Failure:
334 --   If the row cannot be deleted, an error is raised.
335 --
336 -- Developer Implementation Notes:
337 --   This can be called for the form to validate if the measure type
338 --   can be deleted.
339 --
340 -- Access Status:
341 --   Internal Development Use Only.
342 --
343 -- {End Of Comments}
344 -- ----------------------------------------------------------------------------
345 Procedure chk_del_tp_measurement_type_id
346   (p_tp_measurement_type_id    in     ota_tp_measurement_types.tp_measurement_type_id%TYPE
347   );
348 -- ----------------------------------------------------------------------------
349 -- |----------------------<chk_legislative_setup>-----------------------------|
350 -- ----------------------------------------------------------------------------
351 -- {Start Of Comments}
352 --
353 -- Description:
354 --   Validates that the tp_measurement_codes are valid for a given legislation.
355 --   This ensures that measurement types specifically required for a
356 --   legislation are correctly specified
357 --
358 -- Prerequisites:
359 --   All other chk_ procedures have been called
360 --
361 -- In Parameters:
362 --   p_tp_measurement_type_id
363 --
364 -- Post Success:
365 --   Processing continues if the row can be deleted.
366 --
367 -- Post Failure:
368 --   If the row cannot be deleted, an error is raised.
369 --
370 -- Developer Implementation Notes:
371 --   This can be called for the form to validate if the measure type
372 --   is correct for the legislation
373 --
374 -- Access Status:
375 --   Internal Development Use Only.
376 --
377 -- {End Of Comments}
378 -- ----------------------------------------------------------------------------
379 Procedure chk_legislative_setup(
380   p_legislation_code        in per_business_groups.legislation_code%TYPE
381  ,p_tp_measurement_code     in ota_tp_measurement_types.tp_measurement_code%TYPE
382  ,p_unit                    in ota_tp_measurement_types.unit%TYPE
383  ,p_budget_level            in ota_tp_measurement_types.budget_level%TYPE
384  ,p_cost_level              in ota_tp_measurement_types.cost_level%TYPE
385  ,p_many_budget_values_flag in ota_tp_measurement_types.many_budget_values_flag%TYPE
389 end ota_tmt_bus1;
386  ,p_object_version_number   in ota_tp_measurement_types.object_version_number%TYPE
387  ,p_tp_measurement_type_id  in ota_tp_measurement_types.tp_measurement_type_id%TYPE
388 );