1 Package ben_cpd_shd AUTHID CURRENT_USER as
2 /* $Header: becpdrhi.pkh 120.3.12020000.4 2013/01/02 07:14:24 kmsuresh ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Global Record Type Specification |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9 (pl_id number(15)
10 ,lf_evt_ocrd_dt date
11 ,oipl_id number(15)
12 ,effective_date date
13 ,name varchar2(240)
14 ,group_pl_id number(15)
15 ,group_oipl_id number(15)
16 ,opt_hidden_flag varchar2(30)
17 ,opt_id number(15)
18 ,pl_uom varchar2(30)
19 ,pl_ordr_num number(15)
20 ,oipl_ordr_num number(15)
21 ,pl_xchg_rate number
22 ,opt_count number(9) -- Increased length
23 ,uses_bdgt_flag varchar2(30)
24 ,prsrv_bdgt_cd varchar2(30)
25 ,upd_start_dt date
26 ,upd_end_dt date
27 ,approval_mode varchar2(30)
28 ,enrt_perd_start_dt date
29 ,enrt_perd_end_dt date
30 ,yr_perd_start_dt date
31 ,yr_perd_end_dt date
32 ,wthn_yr_start_dt date
33 ,wthn_yr_end_dt date
34 ,enrt_perd_id number(15)
35 ,yr_perd_id number(15)
36 ,business_group_id number(15)
37 ,perf_revw_strt_dt date
38 ,asg_updt_eff_date date
39 ,emp_interview_typ_cd varchar2(30)
40 ,salary_change_reason varchar2(30)
41 ,ws_abr_id number(15)
42 ,ws_nnmntry_uom varchar2(30)
43 ,ws_rndg_cd varchar2(30)
44 ,ws_sub_acty_typ_cd varchar2(30)
45 ,dist_bdgt_abr_id number(15)
46 ,dist_bdgt_nnmntry_uom varchar2(30)
47 ,dist_bdgt_rndg_cd varchar2(30)
48 ,ws_bdgt_abr_id number(15)
49 ,ws_bdgt_nnmntry_uom varchar2(30)
50 ,ws_bdgt_rndg_cd varchar2(30)
51 ,rsrv_abr_id number(15)
52 ,rsrv_nnmntry_uom varchar2(30)
53 ,rsrv_rndg_cd varchar2(30)
54 ,elig_sal_abr_id number(15)
55 ,elig_sal_nnmntry_uom varchar2(30)
56 ,elig_sal_rndg_cd varchar2(30)
57 ,misc1_abr_id number(15)
58 ,misc1_nnmntry_uom varchar2(30)
59 ,misc1_rndg_cd varchar2(30)
60 ,misc2_abr_id number(15)
61 ,misc2_nnmntry_uom varchar2(30)
62 ,misc2_rndg_cd varchar2(30)
63 ,misc3_abr_id number(15)
64 ,misc3_nnmntry_uom varchar2(30)
65 ,misc3_rndg_cd varchar2(30)
66 ,stat_sal_abr_id number(15)
67 ,stat_sal_nnmntry_uom varchar2(30)
68 ,stat_sal_rndg_cd varchar2(30)
69 ,rec_abr_id number(15)
70 ,rec_nnmntry_uom varchar2(30)
71 ,rec_rndg_cd varchar2(30)
72 ,tot_comp_abr_id number(15)
73 ,tot_comp_nnmntry_uom varchar2(30)
74 ,tot_comp_rndg_cd varchar2(30)
75 ,oth_comp_abr_id number(15)
76 ,oth_comp_nnmntry_uom varchar2(30)
77 ,oth_comp_rndg_cd varchar2(30)
78 ,actual_flag varchar2(30)
79 ,acty_ref_perd_cd varchar2(30)
80 ,legislation_code varchar2(30)
81 ,pl_annulization_factor number
82 ,pl_stat_cd varchar2(30)
83 ,uom_precision number
84 ,ws_element_type_id number(15)
85 ,ws_input_value_id number(15)
86 ,data_freeze_date date
87 ,ws_amt_edit_cd varchar2(30)
88 ,ws_amt_edit_enf_cd_for_nulls varchar2(30)
89 ,ws_over_budget_edit_cd varchar2(30)
90 ,ws_over_budget_tolerance_pct number
91 ,bdgt_over_budget_edit_cd varchar2(30)
92 ,bdgt_over_budget_tolerance_pct number
93 ,auto_distr_flag varchar2(30)
94 ,pqh_document_short_name varchar2(30)
95 ,ovrid_rt_strt_dt date
96 ,do_not_process_flag varchar2(30)
97 ,ovr_perf_revw_strt_dt date
98 ,post_zero_salary_increase varchar2(10)
99 ,show_appraisals_n_days number
100 ,grade_range_validation varchar2(20)
101 ,object_version_number number(9)
102 ,email_password_protected ben_cwb_pl_dsgn.email_password_protected%type
103 ,email_cc_manager ben_cwb_pl_dsgn.email_cc_manager%type
104 ,email_subject ben_cwb_pl_dsgn.email_subject%type
105 ,email_content ben_cwb_pl_dsgn.email_content%type
106 , email_sample_address ben_cwb_pl_dsgn.email_sample_address%type
107
108 );
109 --
110 -- ----------------------------------------------------------------------------
111 -- | Global Definitions - Internal Development Use Only |
112 -- ----------------------------------------------------------------------------
113 --
114 g_old_rec g_rec_type; -- Global record definition
115 -- Global table name
116 g_tab_nam constant varchar2(30) := 'BEN_CWB_PL_DSGN';
117 g_api_dml boolean; -- Global api dml status
118 --
119 -- ----------------------------------------------------------------------------
120 -- |------------------------< return_api_dml_status >-------------------------|
121 -- ----------------------------------------------------------------------------
122 -- {Start Of Comments}
123 --
124 -- Description:
125 -- This function will return the current g_api_dml private global
126 -- boolean status.
127 -- The g_api_dml status determines if at the time of the function
128 -- being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
129 -- is being issued from within an api.
130 -- If the status is TRUE then a dml statement is being issued from
131 -- within this entity api.
132 -- This function is primarily to support database triggers which
133 -- need to maintain the object_version_number for non-supported
134 -- dml statements (i.e. dml statement issued outside of the api layer).
135 --
136 -- Prerequisites:
137 -- None.
138 --
139 -- In Parameters:
140 -- None.
141 --
142 -- Post Success:
143 -- Processing continues.
144 -- If the function returns a TRUE value then, dml is being executed from
145 -- within this api.
146 --
147 -- Post Failure:
148 -- None.
149 --
150 -- Access Status:
151 -- Internal Row Handler Use Only.
152 --
153 -- {End Of Comments}
154 -- ----------------------------------------------------------------------------
155 Function return_api_dml_status Return Boolean;
156 --
157 -- ----------------------------------------------------------------------------
158 -- |---------------------------< constraint_error >---------------------------|
159 -- ----------------------------------------------------------------------------
160 -- {Start Of Comments}
161 --
162 -- Description:
163 -- This procedure is called when a constraint has been violated (i.e.
164 -- The exception hr_api.check_integrity_violated,
165 -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
166 -- hr_api.unique_integrity_violated has been raised).
167 -- The exceptions can only be raised as follows:
168 -- 1) A check constraint can only be violated during an INSERT or UPDATE
169 -- dml operation.
170 -- 2) A parent integrity constraint can only be violated during an
171 -- INSERT or UPDATE dml operation.
172 -- 3) A child integrity constraint can only be violated during an
173 -- DELETE dml operation.
174 -- 4) A unique integrity constraint can only be violated during INSERT or
175 -- UPDATE dml operation.
176 --
177 -- Prerequisites:
178 -- 1) Either hr_api.check_integrity_violated,
179 -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
180 -- hr_api.unique_integrity_violated has been raised with the subsequent
181 -- stripping of the constraint name from the generated error message
182 -- text.
183 -- 2) Standalone validation test which corresponds with a constraint error.
184 --
185 -- In Parameter:
186 -- p_constraint_name is in upper format and is just the constraint name
187 -- (e.g. not prefixed by brackets, schema owner etc).
188 --
189 -- Post Success:
190 -- Development dependant.
191 --
192 -- Post Failure:
193 -- Developement dependant.
194 --
195 -- Developer Implementation Notes:
196 -- For each constraint being checked the hr system package failure message
197 -- has been generated as a template only. These system error messages should
198 -- be modified as required (i.e. change the system failure message to a user
199 -- friendly defined error message).
200 --
201 -- Access Status:
202 -- Internal Development Use Only.
203 --
204 -- {End Of Comments}
205 -- ----------------------------------------------------------------------------
206 Procedure constraint_error
207 (p_constraint_name in all_constraints.constraint_name%TYPE);
208 --
209 -- ----------------------------------------------------------------------------
210 -- |-----------------------------< api_updating >-----------------------------|
211 -- ----------------------------------------------------------------------------
212 -- {Start Of Comments}
213 --
214 -- Description:
215 -- This function is used to populate the g_old_rec record with the
216 -- current row from the database for the specified primary key
217 -- provided that the primary key exists and is valid and does not
218 -- already match the current g_old_rec. The function will always return
219 -- a TRUE value if the g_old_rec is populated with the current row.
220 -- A FALSE value will be returned if all of the primary key arguments
221 -- are null.
222 --
223 -- Prerequisites:
224 -- None.
225 --
226 -- In Parameters:
227 --
228 -- Post Success:
229 -- A value of TRUE will be returned indiciating that the g_old_rec
230 -- is current.
231 -- A value of FALSE will be returned if all of the primary key arguments
232 -- have a null value (this indicates that the row has not be inserted into
233 -- the Schema), and therefore could never have a corresponding row.
234 --
235 -- Post Failure:
236 -- A failure can only occur under two circumstances:
237 -- 1) The primary key is invalid (i.e. a row does not exist for the
238 -- specified primary key values).
239 -- 2) If an object_version_number exists but is NOT the same as the current
240 -- g_old_rec value.
241 --
242 -- Developer Implementation Notes:
243 -- None.
244 --
245 -- Access Status:
246 -- Internal Development Use Only.
247 --
248 -- {End Of Comments}
249 -- ----------------------------------------------------------------------------
250 Function api_updating
251 (p_pl_id in number
252 ,p_lf_evt_ocrd_dt in date
253 ,p_oipl_id in number
254 ,p_object_version_number in number
255 ) Return Boolean;
256 --
257 -- ----------------------------------------------------------------------------
258 -- |---------------------------------< lck >----------------------------------|
259 -- ----------------------------------------------------------------------------
260 -- {Start of comments}
261 --
262 -- Description:
263 -- The Lck process has two main functions to perform. Firstly, the row to be
264 -- updated or deleted must be locked. The locking of the row will only be
265 -- successful if the row is not currently locked by another user.
266 -- Secondly, during the locking of the row, the row is selected into
267 -- the g_old_rec data structure which enables the current row values from
268 -- the server to be available to the api.
269 --
270 -- Prerequisites:
271 -- When attempting to call the lock the object version number (if defined)
272 -- is mandatory.
273 --
274 -- In Parameters:
275 -- The arguments to the Lck process are the primary key(s) which uniquely
276 -- identify the row and the object version number of row.
277 --
278 -- Post Success:
279 -- On successful completion of the Lck process the row to be updated or
280 -- deleted will be locked and selected into the global data structure
281 -- g_old_rec.
282 --
283 -- Post Failure:
284 -- The Lck process can fail for three reasons:
285 -- 1) When attempting to lock the row the row could already be locked by
286 -- another user. This will raise the HR_Api.Object_Locked exception.
287 -- 2) The row which is required to be locked doesn't exist in the HR Schema.
288 -- This error is trapped and reported using the message name
289 -- 'HR_7220_INVALID_PRIMARY_KEY'.
290 -- 3) The row although existing in the HR Schema has a different object
291 -- version number than the object version number specified.
292 -- This error is trapped and reported using the message name
293 -- 'HR_7155_OBJECT_INVALID'.
294 --
295 -- Developer Implementation Notes:
296 -- For each primary key and the object version number arguments add a
297 -- call to hr_api.mandatory_arg_error procedure to ensure that these
298 -- argument values are not null.
299 --
300 -- Access Status:
301 -- Internal Development Use Only.
302 --
303 -- {End of comments}
304 -- ----------------------------------------------------------------------------
305 Procedure lck
306 (p_pl_id in number
307 ,p_lf_evt_ocrd_dt in date
308 ,p_oipl_id in number
309 ,p_object_version_number in number
310 );
311 --
312 -- ----------------------------------------------------------------------------
313 -- |-----------------------------< convert_args >-----------------------------|
314 -- ----------------------------------------------------------------------------
315 -- {Start Of Comments}
316 --
317 -- Description:
318 -- This function is used to turn attribute parameters into the record
319 -- structure parameter g_rec_type.
320 --
321 -- Prerequisites:
322 -- This is a private function and can only be called from the ins or upd
323 -- attribute processes.
324 --
325 -- In Parameters:
326 --
327 -- Post Success:
328 -- A returning record structure will be returned.
329 --
330 -- Post Failure:
331 -- No direct error handling is required within this function. Any possible
332 -- errors within this function will be a PL/SQL value error due to
333 -- conversion of datatypes or data lengths.
334 --
335 -- Developer Implementation Notes:
336 -- None.
337 --
338 -- Access Status:
339 -- Internal Row Handler Use Only.
340 --
341 -- {End Of Comments}
342 -- ----------------------------------------------------------------------------
343 Function convert_args
344 (p_pl_id in number
345 ,p_oipl_id in number
346 ,p_lf_evt_ocrd_dt in date
347 ,p_effective_date in date
348 ,p_name in varchar2
349 ,p_group_pl_id in number
350 ,p_group_oipl_id in number
351 ,p_opt_hidden_flag in varchar2
352 ,p_opt_id in number
353 ,p_pl_uom in varchar2
354 ,p_pl_ordr_num in number
355 ,p_oipl_ordr_num in number
356 ,p_pl_xchg_rate in number
357 ,p_opt_count in number
358 ,p_uses_bdgt_flag in varchar2
359 ,p_prsrv_bdgt_cd in varchar2
360 ,p_upd_start_dt in date
361 ,p_upd_end_dt in date
362 ,p_approval_mode in varchar2
363 ,p_enrt_perd_start_dt in date
364 ,p_enrt_perd_end_dt in date
365 ,p_yr_perd_start_dt in date
366 ,p_yr_perd_end_dt in date
367 ,p_wthn_yr_start_dt in date
368 ,p_wthn_yr_end_dt in date
369 ,p_enrt_perd_id in number
370 ,p_yr_perd_id in number
371 ,p_business_group_id in number
372 ,p_perf_revw_strt_dt in date
373 ,p_asg_updt_eff_date in date
374 ,p_emp_interview_typ_cd in varchar2
375 ,p_salary_change_reason in varchar2
376 ,p_ws_abr_id in number
377 ,p_ws_nnmntry_uom in varchar2
378 ,p_ws_rndg_cd in varchar2
379 ,p_ws_sub_acty_typ_cd in varchar2
380 ,p_dist_bdgt_abr_id in number
381 ,p_dist_bdgt_nnmntry_uom in varchar2
382 ,p_dist_bdgt_rndg_cd in varchar2
383 ,p_ws_bdgt_abr_id in number
384 ,p_ws_bdgt_nnmntry_uom in varchar2
385 ,p_ws_bdgt_rndg_cd in varchar2
386 ,p_rsrv_abr_id in number
387 ,p_rsrv_nnmntry_uom in varchar2
388 ,p_rsrv_rndg_cd in varchar2
389 ,p_elig_sal_abr_id in number
390 ,p_elig_sal_nnmntry_uom in varchar2
391 ,p_elig_sal_rndg_cd in varchar2
392 ,p_misc1_abr_id in number
393 ,p_misc1_nnmntry_uom in varchar2
394 ,p_misc1_rndg_cd in varchar2
395 ,p_misc2_abr_id in number
396 ,p_misc2_nnmntry_uom in varchar2
397 ,p_misc2_rndg_cd in varchar2
398 ,p_misc3_abr_id in number
399 ,p_misc3_nnmntry_uom in varchar2
400 ,p_misc3_rndg_cd in varchar2
401 ,p_stat_sal_abr_id in number
402 ,p_stat_sal_nnmntry_uom in varchar2
403 ,p_stat_sal_rndg_cd in varchar2
404 ,p_rec_abr_id in number
405 ,p_rec_nnmntry_uom in varchar2
406 ,p_rec_rndg_cd in varchar2
407 ,p_tot_comp_abr_id in number
408 ,p_tot_comp_nnmntry_uom in varchar2
409 ,p_tot_comp_rndg_cd in varchar2
410 ,p_oth_comp_abr_id in number
411 ,p_oth_comp_nnmntry_uom in varchar2
412 ,p_oth_comp_rndg_cd in varchar2
413 ,p_actual_flag in varchar2
414 ,p_acty_ref_perd_cd in varchar2
415 ,p_legislation_code in varchar2
416 ,p_pl_annulization_factor in number
417 ,p_pl_stat_cd in varchar2
418 ,p_uom_precision in number
419 ,p_ws_element_type_id in number
420 ,p_ws_input_value_id in number
421 ,p_data_freeze_date in date
422 ,p_ws_amt_edit_cd in varchar2
423 ,p_ws_amt_edit_enf_cd_for_nul in varchar2
424 ,p_ws_over_budget_edit_cd in varchar2
425 ,p_ws_over_budget_tol_pct in number
426 ,p_bdgt_over_budget_edit_cd in varchar2
427 ,p_bdgt_over_budget_tol_pct in number
428 ,p_auto_distr_flag in varchar2
429 ,p_pqh_document_short_name in varchar2
430 ,p_ovrid_rt_strt_dt in date
431 ,p_do_not_process_flag in varchar2
432 ,p_ovr_perf_revw_strt_dt in date
433 ,p_post_zero_salary_increase in varchar2
434 ,p_show_appraisals_n_days in number
435 ,p_grade_range_validation in varchar2
436 ,p_object_version_number in number
437 ,p_email_password_protected in varchar2
438 ,p_email_cc_manager in varchar2
439 ,p_email_subject in varchar2
440 ,p_email_content in clob
441 ,p_email_sample_address in varchar2
442 )
443 Return g_rec_type;
444 --
445 end ben_cpd_shd;