DBA Data[Home] [Help]

PACKAGE: APPS.BEN_PEL_SHD

Source


1 Package ben_pel_shd as
2 /* $Header: bepelrhi.pkh 120.1 2007/05/13 23:00:03 rtagarra noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (
10   pil_elctbl_chc_popl_id            number(15),
11   dflt_enrt_dt                      date,
12   dflt_asnd_dt                      date,
13   elcns_made_dt                     date,
14   cls_enrt_dt_to_use_cd             varchar2(30),
15   enrt_typ_cycl_cd                  varchar2(30),
16   enrt_perd_end_dt                  date,
17   enrt_perd_strt_dt                 date,
18   procg_end_dt                      date,
19   pil_elctbl_popl_stat_cd           varchar2(30),
20   acty_ref_perd_cd                  varchar2(30),
21   uom                               varchar2(30),
22   comments                               varchar2(2000),
23   mgr_ovrid_dt                               date,
24   ws_mgr_id                               number(15),
25   mgr_ovrid_person_id                               number(15),
26   assignment_id                               number(15),
27   --cwb
28   bdgt_acc_cd                       varchar2(30),
29   pop_cd                            varchar2(30),
30   bdgt_due_dt                       date,
31   bdgt_export_flag                  varchar2(30),
32   bdgt_iss_dt                       date,
33   bdgt_stat_cd                      varchar2(30),
34   ws_acc_cd                         varchar2(30),
35   ws_due_dt                         date,
36   ws_export_flag                    varchar2(30),
37   ws_iss_dt                         date,
38   ws_stat_cd                        varchar2(30),
39   --cwb
40   reinstate_cd                      varchar2(30),
41   reinstate_ovrdn_cd                varchar2(30),
42   auto_asnd_dt                      date,
43   cbr_elig_perd_strt_dt             date,
44   cbr_elig_perd_end_dt              date,
45   lee_rsn_id                        number(15),
46   enrt_perd_id                      number(15),
47   per_in_ler_id                     number(15),
48   pgm_id                            number(15),
49   pl_id                             number(15),
50   business_group_id                 number(15),
51   pel_attribute_category            varchar2(30),
52   pel_attribute1                    varchar2(150),
53   pel_attribute2                    varchar2(150),
54   pel_attribute3                    varchar2(150),
55   pel_attribute4                    varchar2(150),
56   pel_attribute5                    varchar2(150),
57   pel_attribute6                    varchar2(150),
58   pel_attribute7                    varchar2(150),
59   pel_attribute8                    varchar2(150),
60   pel_attribute9                    varchar2(150),
61   pel_attribute10                   varchar2(150),
62   pel_attribute11                   varchar2(150),
63   pel_attribute12                   varchar2(150),
64   pel_attribute13                   varchar2(150),
65   pel_attribute14                   varchar2(150),
66   pel_attribute15                   varchar2(150),
67   pel_attribute16                   varchar2(150),
68   pel_attribute17                   varchar2(150),
69   pel_attribute18                   varchar2(150),
70   pel_attribute19                   varchar2(150),
71   pel_attribute20                   varchar2(150),
72   pel_attribute21                   varchar2(150),
73   pel_attribute22                   varchar2(150),
74   pel_attribute23                   varchar2(150),
75   pel_attribute24                   varchar2(150),
76   pel_attribute25                   varchar2(150),
77   pel_attribute26                   varchar2(150),
78   pel_attribute27                   varchar2(150),
79   pel_attribute28                   varchar2(150),
80   pel_attribute29                   varchar2(150),
81   pel_attribute30                   varchar2(150),
82   request_id                        number(15),
83   program_application_id            number(15),
84   program_id                        number(15),
85   program_update_date               date,
86   object_version_number             number(9),
87   defer_deenrol_flag                varchar2(30),
88   deenrol_made_dt                   date
89   );
90 --
91 -- ----------------------------------------------------------------------------
92 -- |           Global Definitions - Internal Development Use Only             |
93 -- ----------------------------------------------------------------------------
94 --
95 g_old_rec  g_rec_type;                            -- Global record definition
96 g_api_dml  boolean;                               -- Global api dml status
97 --
98 -- ----------------------------------------------------------------------------
99 -- |------------------------< return_api_dml_status >-------------------------|
100 -- ----------------------------------------------------------------------------
101 -- {Start Of Comments}
102 --
103 -- Description:
104 --   This function will return the current g_api_dml private global
105 --   boolean status.
106 --   The g_api_dml status determines if at the time of the function
107 --   being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
108 --   is being issued from within an api.
109 --   If the status is TRUE then a dml statement is being issued from
110 --   within this entity api.
111 --   This function is primarily to support database triggers which
112 --   need to maintain the object_version_number for non-supported
113 --   dml statements (i.e. dml statement issued outside of the api layer).
114 --
115 -- Prerequisites:
116 --   None.
117 --
118 -- In Parameters:
119 --   None.
120 --
121 -- Post Success:
122 --   Processing continues.
123 --   If the function returns a TRUE value then, dml is being executed from
124 --   within this api.
125 --
126 -- Post Failure:
127 --   None.
128 --
129 -- Access Status:
130 --   Internal Row Handler Use Only.
131 --
132 -- {End Of Comments}
133 -- ----------------------------------------------------------------------------
134 Function return_api_dml_status Return Boolean;
135 --
136 -- ----------------------------------------------------------------------------
137 -- |---------------------------< constraint_error >---------------------------|
138 -- ----------------------------------------------------------------------------
139 -- {Start Of Comments}
140 --
141 -- Description:
142 --   This procedure is called when a constraint has been violated (i.e.
143 --   The exception hr_api.check_integrity_violated,
144 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
145 --   hr_api.unique_integrity_violated has been raised).
146 --   The exceptions can only be raised as follows:
147 --   1) A check constraint can only be violated during an INSERT or UPDATE
148 --      dml operation.
149 --   2) A parent integrity constraint can only be violated during an
150 --      INSERT or UPDATE dml operation.
151 --   3) A child integrity constraint can only be violated during an
152 --      DELETE dml operation.
153 --   4) A unique integrity constraint can only be violated during INSERT or
154 --      UPDATE dml operation.
155 --
156 -- Prerequisites:
157 --   1) Either hr_api.check_integrity_violated,
158 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
159 --      hr_api.unique_integrity_violated has been raised with the subsequent
160 --      stripping of the constraint name from the generated error message
161 --      text.
162 --   2) Standalone validation test which corresponds with a constraint error.
163 --
164 -- In Parameter:
165 --   p_constraint_name is in upper format and is just the constraint name
166 --   (e.g. not prefixed by brackets, schema owner etc).
167 --
168 -- Post Success:
169 --   Development dependant.
170 --
171 -- Post Failure:
172 --   Developement dependant.
173 --
174 -- Developer Implementation Notes:
175 --   For each constraint being checked the hr system package failure message
176 --   has been generated as a template only. These system error messages should
177 --   be modified as required (i.e. change the system failure message to a user
178 --   friendly defined error message).
179 --
180 -- Access Status:
181 --   Internal Development Use Only.
182 --
183 -- {End Of Comments}
184 -- ----------------------------------------------------------------------------
185 Procedure constraint_error
186             (p_constraint_name in all_constraints.constraint_name%TYPE);
187 --
188 -- ----------------------------------------------------------------------------
189 -- |-----------------------------< api_updating >-----------------------------|
190 -- ----------------------------------------------------------------------------
191 -- {Start Of Comments}
192 --
193 -- Description:
194 --   This function is used to populate the g_old_rec record with the
195 --   current row from the database for the specified primary key
196 --   provided that the primary key exists and is valid and does not
197 --   already match the current g_old_rec. The function will always return
198 --   a TRUE value if the g_old_rec is populated with the current row.
199 --   A FALSE value will be returned if all of the primary key arguments
200 --   are null.
201 --
202 -- Prerequisites:
203 --   None.
204 --
205 -- In Parameters:
206 --
207 -- Post Success:
208 --   A value of TRUE will be returned indiciating that the g_old_rec
209 --   is current.
210 --   A value of FALSE will be returned if all of the primary key arguments
211 --   have a null value (this indicates that the row has not be inserted into
212 --   the Schema), and therefore could never have a corresponding row.
213 --
214 -- Post Failure:
215 --   A failure can only occur under two circumstances:
216 --   1) The primary key is invalid (i.e. a row does not exist for the
217 --      specified primary key values).
218 --   2) If an object_version_number exists but is NOT the same as the current
219 --      g_old_rec value.
220 --
221 -- Developer Implementation Notes:
222 --   None.
223 --
224 -- Access Status:
225 --   Internal Development Use Only.
226 --
227 -- {End Of Comments}
228 -- ----------------------------------------------------------------------------
229 Function api_updating
230   (
231   p_pil_elctbl_chc_popl_id             in number,
232   p_object_version_number              in number
233   )      Return Boolean;
234 --
235 -- ----------------------------------------------------------------------------
236 -- |---------------------------------< lck >----------------------------------|
237 -- ----------------------------------------------------------------------------
238 -- {Start Of Comments}
239 --
240 -- Description:
241 --   The Lck process has two main functions to perform. Firstly, the row to be
242 --   updated or deleted must be locked. The locking of the row will only be
243 --   successful if the row is not currently locked by another user.
244 --   Secondly, during the locking of the row, the row is selected into
245 --   the g_old_rec data structure which enables the current row values from the
246 --   server to be available to the api.
247 --
248 -- Prerequisites:
249 --   When attempting to call the lock the object version number (if defined)
250 --   is mandatory.
251 --
252 -- In Parameters:
253 --   The arguments to the Lck process are the primary key(s) which uniquely
254 --   identify the row and the object version number of row.
255 --
256 -- Post Success:
257 --   On successful completion of the Lck process the row to be updated or
258 --   deleted will be locked and selected into the global data structure
259 --   g_old_rec.
260 --
261 -- Post Failure:
262 --   The Lck process can fail for three reasons:
263 --   1) When attempting to lock the row the row could already be locked by
264 --      another user. This will raise the HR_Api.Object_Locked exception.
265 --   2) The row which is required to be locked doesn't exist in the HR Schema.
266 --      This error is trapped and reported using the message name
267 --      'HR_7220_INVALID_PRIMARY_KEY'.
268 --   3) The row although existing in the HR Schema has a different object
269 --      version number than the object version number specified.
270 --      This error is trapped and reported using the message name
271 --      'HR_7155_OBJECT_INVALID'.
272 --
273 -- Developer Implementation Notes:
274 --   For each primary key and the object version number arguments add a
275 --   call to hr_api.mandatory_arg_error procedure to ensure that these
276 --   argument values are not null.
277 --
278 -- Access Status:
279 --   Internal Development Use Only.
280 --
281 -- {End Of Comments}
282 -- ----------------------------------------------------------------------------
283 Procedure lck
284   (
285   p_pil_elctbl_chc_popl_id             in number,
286   p_object_version_number              in number
287   );
288 --
289 -- ----------------------------------------------------------------------------
290 -- |-----------------------------< convert_args >-----------------------------|
291 -- ----------------------------------------------------------------------------
292 -- {Start Of Comments}
293 --
294 -- Description:
295 --   This function is used to turn attribute parameters into the record
296 --   structure parameter g_rec_type.
297 --
298 -- Prerequisites:
299 --   This is a private function and can only be called from the ins or upd
300 --   attribute processes.
301 --
302 -- In Parameters:
303 --
304 -- Post Success:
305 --   A returning record structure will be returned.
306 --
307 -- Post Failure:
308 --   No direct error handling is required within this function. Any possible
309 --   errors within this function will be a PL/SQL value error due to conversion
310 --   of datatypes or data lengths.
311 --
312 -- Developer Implementation Notes:
313 --   None.
314 --
315 -- Access Status:
316 --   Internal Row Handler Use Only.
317 --
318 -- {End Of Comments}
319 -- ----------------------------------------------------------------------------
320 Function convert_args
324 	p_dflt_asnd_dt                  in date,
321 	(
322 	p_pil_elctbl_chc_popl_id        in number,
323 	p_dflt_enrt_dt                  in date,
325 	p_elcns_made_dt                 in date,
326 	p_cls_enrt_dt_to_use_cd         in varchar2,
327 	p_enrt_typ_cycl_cd              in varchar2,
328 	p_enrt_perd_end_dt              in date,
329 	p_enrt_perd_strt_dt             in date,
330 	p_procg_end_dt                  in date,
331 	p_pil_elctbl_popl_stat_cd       in varchar2,
332 	p_acty_ref_perd_cd              in varchar2,
333 	p_uom                           in varchar2,
334 	p_comments                           in varchar2,
335 	p_mgr_ovrid_dt                           in date,
336 	p_ws_mgr_id                           in number,
337 	p_mgr_ovrid_person_id                           in number,
338 	p_assignment_id                           in number,
339         --cwb
340         p_bdgt_acc_cd                   in varchar2,
341         p_pop_cd                        in varchar2,
342         p_bdgt_due_dt                   in date,
343         p_bdgt_export_flag              in varchar2,
344         p_bdgt_iss_dt                   in date,
345         p_bdgt_stat_cd                  in varchar2,
346         p_ws_acc_cd                     in varchar2,
347         p_ws_due_dt                     in date,
348         p_ws_export_flag                in varchar2,
349         p_ws_iss_dt                     in date,
350         p_ws_stat_cd                    in varchar2,
351         --cwb
352         p_reinstate_cd                  in varchar2,
353         p_reinstate_ovrdn_cd            in varchar2,
354 	p_auto_asnd_dt                  in date,
355         p_cbr_elig_perd_strt_dt         in date,
356         p_cbr_elig_perd_end_dt          in date,
357 	p_lee_rsn_id                    in number,
358 	p_enrt_perd_id                  in number,
359 	p_per_in_ler_id                 in number,
360 	p_pgm_id                        in number,
361 	p_pl_id                         in number,
362 	p_business_group_id             in number,
363 	p_pel_attribute_category        in varchar2,
364 	p_pel_attribute1                in varchar2,
365 	p_pel_attribute2                in varchar2,
366 	p_pel_attribute3                in varchar2,
367 	p_pel_attribute4                in varchar2,
368 	p_pel_attribute5                in varchar2,
369 	p_pel_attribute6                in varchar2,
370 	p_pel_attribute7                in varchar2,
371 	p_pel_attribute8                in varchar2,
372 	p_pel_attribute9                in varchar2,
373 	p_pel_attribute10               in varchar2,
374 	p_pel_attribute11               in varchar2,
375 	p_pel_attribute12               in varchar2,
376 	p_pel_attribute13               in varchar2,
377 	p_pel_attribute14               in varchar2,
378 	p_pel_attribute15               in varchar2,
379 	p_pel_attribute16               in varchar2,
380 	p_pel_attribute17               in varchar2,
381 	p_pel_attribute18               in varchar2,
382 	p_pel_attribute19               in varchar2,
383 	p_pel_attribute20               in varchar2,
384 	p_pel_attribute21               in varchar2,
385 	p_pel_attribute22               in varchar2,
386 	p_pel_attribute23               in varchar2,
387 	p_pel_attribute24               in varchar2,
388 	p_pel_attribute25               in varchar2,
389 	p_pel_attribute26               in varchar2,
390 	p_pel_attribute27               in varchar2,
391 	p_pel_attribute28               in varchar2,
392 	p_pel_attribute29               in varchar2,
393 	p_pel_attribute30               in varchar2,
394 	p_request_id                    in number,
395 	p_program_application_id        in number,
396 	p_program_id                    in number,
397 	p_program_update_date           in date,
398 	p_object_version_number         in number,
399 	p_defer_deenrol_flag            in varchar2,
400 	p_deenrol_made_dt               in date
401 	)
402 	Return g_rec_type;
403 --
404 end ben_pel_shd;