DBA Data[Home] [Help]

PACKAGE: APPS.BEN_ENP_SHD

Source


1 Package ben_enp_shd AUTHID CURRENT_USER as
2 /* $Header: beenprhi.pkh 120.1.12020000.2 2012/07/03 12:10:19 amnaraya ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (
10   enrt_perd_id                      number(15),
11   business_group_id                 number(15),
12   yr_perd_id                        number(15),
13   popl_enrt_typ_cycl_id             number(15),
14   end_dt                            date,
15   strt_dt                           date,
16   asnd_lf_evt_dt                    date,
17   cls_enrt_dt_to_use_cd             varchar2(30),
18   dflt_enrt_dt                      date,
19   enrt_cvg_strt_dt_cd               varchar2(30),
20   rt_strt_dt_rl                     number(15),
21   enrt_cvg_end_dt_cd                varchar2(30),
22   enrt_cvg_strt_dt_rl               number(15),
23   enrt_cvg_end_dt_rl                number(15),
24   procg_end_dt                      date,
25   rt_strt_dt_cd                     varchar2(30),
26   rt_end_dt_cd                      varchar2(30),
27   rt_end_dt_rl                      number(15),
28   bdgt_upd_strt_dt                date,
29   bdgt_upd_end_dt                 date,
30   ws_upd_strt_dt                  date,
31   ws_upd_end_dt                   date,
32   dflt_ws_acc_cd                  varchar2(30),
33   prsvr_bdgt_cd                   varchar2(30),
34   uses_bdgt_flag                  varchar2(30),
35   auto_distr_flag                 varchar2(30),
36   hrchy_to_use_cd                 varchar2(30),
37   pos_structure_version_id           number(15),
38   emp_interview_type_cd           varchar2(30),
39   wthn_yr_perd_id                 number(15),
40   ler_id                          number(15),
41   perf_revw_strt_dt               date,
42   asg_updt_eff_date               date,
43   enp_attribute_category            varchar2(30),
44   enp_attribute1                    varchar2(150),
45   enp_attribute2                    varchar2(150),
46   enp_attribute3                    varchar2(150),
47   enp_attribute4                    varchar2(150),
48   enp_attribute5                    varchar2(150),
49   enp_attribute6                    varchar2(150),
50   enp_attribute7                    varchar2(150),
51   enp_attribute8                    varchar2(150),
52   enp_attribute9                    varchar2(150),
53   enp_attribute10                   varchar2(150),
54   enp_attribute11                   varchar2(150),
55   enp_attribute12                   varchar2(150),
56   enp_attribute13                   varchar2(150),
57   enp_attribute14                   varchar2(150),
58   enp_attribute15                   varchar2(150),
59   enp_attribute16                   varchar2(150),
60   enp_attribute17                   varchar2(150),
61   enp_attribute18                   varchar2(150),
62   enp_attribute19                   varchar2(150),
63   enp_attribute20                   varchar2(150),
64   enp_attribute21                   varchar2(150),
65   enp_attribute22                   varchar2(150),
66   enp_attribute23                   varchar2(150),
67   enp_attribute24                   varchar2(150),
68   enp_attribute25                   varchar2(150),
69   enp_attribute26                   varchar2(150),
70   enp_attribute27                   varchar2(150),
71   enp_attribute28                   varchar2(150),
72   enp_attribute29                   varchar2(150),
73   enp_attribute30                   varchar2(150),
74   enrt_perd_det_ovrlp_bckdt_cd      varchar2(30),
75   --cwb
76   data_freeze_date                date         ,
77   Sal_chg_reason_cd               varchar2(30) ,
78   Approval_mode_cd                varchar2(30) ,
79   hrchy_ame_trn_cd                varchar2(30) ,
80   hrchy_rl                        number(15)   ,
81   hrchy_ame_app_id                number(15)   ,
82   --
83   object_version_number             number(9),
84   reinstate_cd				varchar2(30),
85   reinstate_ovrdn_cd		varchar2(30),
86   reopen_le_on_reprocess         varchar2(30),
87   defer_deenrol_flag            varchar2(30)
88   );
89 --
90 -- ----------------------------------------------------------------------------
91 -- |           Global Definitions - Internal Development Use Only             |
92 -- ----------------------------------------------------------------------------
93 --
94 g_old_rec  g_rec_type;                            -- Global record definition
95 g_api_dml  boolean;                               -- Global api dml status
96 --
97 -- ----------------------------------------------------------------------------
98 -- |------------------------< return_api_dml_status >-------------------------|
99 -- ----------------------------------------------------------------------------
100 -- {Start Of Comments}
101 --
102 -- Description:
103 --   This function will return the current g_api_dml private global
104 --   boolean status.
105 --   The g_api_dml status determines if at the time of the function
106 --   being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
107 --   is being issued from within an api.
108 --   If the status is TRUE then a dml statement is being issued from
109 --   within this entity api.
110 --   This function is primarily to support database triggers which
111 --   need to maintain the object_version_number for non-supported
112 --   dml statements (i.e. dml statement issued outside of the api layer).
113 --
114 -- Prerequisites:
115 --   None.
116 --
117 -- In Parameters:
118 --   None.
119 --
120 -- Post Success:
121 --   Processing continues.
122 --   If the function returns a TRUE value then, dml is being executed from
123 --   within this api.
124 --
125 -- Post Failure:
126 --   None.
127 --
128 -- Access Status:
129 --   Internal Row Handler Use Only.
130 --
131 -- {End Of Comments}
132 -- ----------------------------------------------------------------------------
133 Function return_api_dml_status Return Boolean;
134 --
135 -- ----------------------------------------------------------------------------
136 -- |---------------------------< constraint_error >---------------------------|
137 -- ----------------------------------------------------------------------------
138 -- {Start Of Comments}
139 --
140 -- Description:
141 --   This procedure is called when a constraint has been violated (i.e.
142 --   The exception hr_api.check_integrity_violated,
143 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
144 --   hr_api.unique_integrity_violated has been raised).
145 --   The exceptions can only be raised as follows:
146 --   1) A check constraint can only be violated during an INSERT or UPDATE
147 --      dml operation.
148 --   2) A parent integrity constraint can only be violated during an
149 --      INSERT or UPDATE dml operation.
150 --   3) A child integrity constraint can only be violated during an
151 --      DELETE dml operation.
152 --   4) A unique integrity constraint can only be violated during INSERT or
153 --      UPDATE dml operation.
154 --
155 -- Prerequisites:
156 --   1) Either hr_api.check_integrity_violated,
157 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
158 --      hr_api.unique_integrity_violated has been raised with the subsequent
159 --      stripping of the constraint name from the generated error message
160 --      text.
161 --   2) Standalone validation test which corresponds with a constraint error.
162 --
163 -- In Parameter:
164 --   p_constraint_name is in upper format and is just the constraint name
165 --   (e.g. not prefixed by brackets, schema owner etc).
166 --
167 -- Post Success:
168 --   Development dependant.
169 --
170 -- Post Failure:
171 --   Developement dependant.
172 --
173 -- Developer Implementation Notes:
174 --   For each constraint being checked the hr system package failure message
175 --   has been generated as a template only. These system error messages should
176 --   be modified as required (i.e. change the system failure message to a user
177 --   friendly defined error message).
178 --
179 -- Access Status:
180 --   Internal Development Use Only.
181 --
182 -- {End Of Comments}
183 -- ----------------------------------------------------------------------------
184 Procedure constraint_error
185             (p_constraint_name in all_constraints.constraint_name%TYPE);
186 --
187 -- ----------------------------------------------------------------------------
188 -- |-----------------------------< api_updating >-----------------------------|
189 -- ----------------------------------------------------------------------------
190 -- {Start Of Comments}
191 --
192 -- Description:
193 --   This function is used to populate the g_old_rec record with the
194 --   current row from the database for the specified primary key
195 --   provided that the primary key exists and is valid and does not
196 --   already match the current g_old_rec. The function will always return
197 --   a TRUE value if the g_old_rec is populated with the current row.
198 --   A FALSE value will be returned if all of the primary key arguments
199 --   are null.
200 --
201 -- Prerequisites:
202 --   None.
203 --
204 -- In Parameters:
205 --
206 -- Post Success:
207 --   A value of TRUE will be returned indiciating that the g_old_rec
208 --   is current.
209 --   A value of FALSE will be returned if all of the primary key arguments
210 --   have a null value (this indicates that the row has not be inserted into
211 --   the Schema), and therefore could never have a corresponding row.
212 --
213 -- Post Failure:
214 --   A failure can only occur under two circumstances:
215 --   1) The primary key is invalid (i.e. a row does not exist for the
216 --      specified primary key values).
217 --   2) If an object_version_number exists but is NOT the same as the current
218 --      g_old_rec value.
219 --
220 -- Developer Implementation Notes:
221 --   None.
222 --
223 -- Access Status:
224 --   Internal Development Use Only.
225 --
226 -- {End Of Comments}
227 -- ----------------------------------------------------------------------------
228 Function api_updating
229   (
230   p_enrt_perd_id                       in number,
231   p_object_version_number              in number
232   )      Return Boolean;
233 --
234 -- ----------------------------------------------------------------------------
235 -- |---------------------------------< lck >----------------------------------|
236 -- ----------------------------------------------------------------------------
237 -- {Start Of Comments}
238 --
239 -- Description:
240 --   The Lck process has two main functions to perform. Firstly, the row to be
241 --   updated or deleted must be locked. The locking of the row will only be
242 --   successful if the row is not currently locked by another user.
243 --   Secondly, during the locking of the row, the row is selected into
244 --   the g_old_rec data structure which enables the current row values from the
245 --   server to be available to the api.
246 --
247 -- Prerequisites:
248 --   When attempting to call the lock the object version number (if defined)
249 --   is mandatory.
250 --
251 -- In Parameters:
252 --   The arguments to the Lck process are the primary key(s) which uniquely
253 --   identify the row and the object version number of row.
254 --
255 -- Post Success:
256 --   On successful completion of the Lck process the row to be updated or
257 --   deleted will be locked and selected into the global data structure
258 --   g_old_rec.
259 --
260 -- Post Failure:
261 --   The Lck process can fail for three reasons:
262 --   1) When attempting to lock the row the row could already be locked by
263 --      another user. This will raise the HR_Api.Object_Locked exception.
264 --   2) The row which is required to be locked doesn't exist in the HR Schema.
265 --      This error is trapped and reported using the message name
266 --      'HR_7220_INVALID_PRIMARY_KEY'.
267 --   3) The row although existing in the HR Schema has a different object
268 --      version number than the object version number specified.
269 --      This error is trapped and reported using the message name
270 --      'HR_7155_OBJECT_INVALID'.
271 --
272 -- Developer Implementation Notes:
273 --   For each primary key and the object version number arguments add a
274 --   call to hr_api.mandatory_arg_error procedure to ensure that these
275 --   argument values are not null.
276 --
277 -- Access Status:
278 --   Internal Development Use Only.
279 --
280 -- {End Of Comments}
281 -- ----------------------------------------------------------------------------
282 Procedure lck
283   (
284   p_enrt_perd_id                       in number,
285   p_object_version_number              in number
286   );
287 --
288 -- ----------------------------------------------------------------------------
289 -- |-----------------------------< convert_args >-----------------------------|
290 -- ----------------------------------------------------------------------------
291 -- {Start Of Comments}
292 --
293 -- Description:
294 --   This function is used to turn attribute parameters into the record
295 --   structure parameter g_rec_type.
296 --
297 -- Prerequisites:
298 --   This is a private function and can only be called from the ins or upd
299 --   attribute processes.
300 --
301 -- In Parameters:
302 --
303 -- Post Success:
304 --   A returning record structure will be returned.
305 --
306 -- Post Failure:
307 --   No direct error handling is required within this function. Any possible
308 --   errors within this function will be a PL/SQL value error due to conversion
309 --   of datatypes or data lengths.
310 --
311 -- Developer Implementation Notes:
312 --   None.
313 --
314 -- Access Status:
315 --   Internal Row Handler Use Only.
316 --
317 -- {End Of Comments}
318 -- ----------------------------------------------------------------------------
319 Function convert_args
320 	(
321 	p_enrt_perd_id                  in number,
322 	p_business_group_id             in number,
323 	p_yr_perd_id                    in number,
324 	p_popl_enrt_typ_cycl_id         in number,
325 	p_end_dt                        in date,
326 	p_strt_dt                       in date,
327 	p_asnd_lf_evt_dt                in date,
328 	p_cls_enrt_dt_to_use_cd         in varchar2,
329 	p_dflt_enrt_dt                  in date,
330 	p_enrt_cvg_strt_dt_cd           in varchar2,
331 	p_rt_strt_dt_rl                 in number,
332 	p_enrt_cvg_end_dt_cd            in varchar2,
333 	p_enrt_cvg_strt_dt_rl           in number,
334 	p_enrt_cvg_end_dt_rl            in number,
335 	p_procg_end_dt                  in date,
336 	p_rt_strt_dt_cd                 in varchar2,
337 	p_rt_end_dt_cd                  in varchar2,
338 	p_rt_end_dt_rl                  in number,
339         p_bdgt_upd_strt_dt              in date,
340         p_bdgt_upd_end_dt               in date,
341         p_ws_upd_strt_dt                in date,
342         p_ws_upd_end_dt                 in date,
343         p_dflt_ws_acc_cd                in varchar2,
344         p_prsvr_bdgt_cd                 in varchar2,
345         p_uses_bdgt_flag                in varchar2,
346         p_auto_distr_flag               in varchar2,
347         p_hrchy_to_use_cd               in varchar2,
348         p_pos_structure_version_id         in number,
349         p_emp_interview_type_cd         in varchar2,
350         p_wthn_yr_perd_id               in number,
351         p_ler_id                        in number,
352         p_perf_revw_strt_dt             in date,
353         p_asg_updt_eff_date             in date,
354 	p_enp_attribute_category        in varchar2,
355 	p_enp_attribute1                in varchar2,
356 	p_enp_attribute2                in varchar2,
357 	p_enp_attribute3                in varchar2,
358 	p_enp_attribute4                in varchar2,
359 	p_enp_attribute5                in varchar2,
360 	p_enp_attribute6                in varchar2,
361 	p_enp_attribute7                in varchar2,
362 	p_enp_attribute8                in varchar2,
363 	p_enp_attribute9                in varchar2,
364 	p_enp_attribute10               in varchar2,
365 	p_enp_attribute11               in varchar2,
366 	p_enp_attribute12               in varchar2,
367 	p_enp_attribute13               in varchar2,
368 	p_enp_attribute14               in varchar2,
369 	p_enp_attribute15               in varchar2,
370 	p_enp_attribute16               in varchar2,
371 	p_enp_attribute17               in varchar2,
372 	p_enp_attribute18               in varchar2,
373 	p_enp_attribute19               in varchar2,
374 	p_enp_attribute20               in varchar2,
375 	p_enp_attribute21               in varchar2,
376 	p_enp_attribute22               in varchar2,
377 	p_enp_attribute23               in varchar2,
378 	p_enp_attribute24               in varchar2,
379 	p_enp_attribute25               in varchar2,
380 	p_enp_attribute26               in varchar2,
381 	p_enp_attribute27               in varchar2,
382 	p_enp_attribute28               in varchar2,
383 	p_enp_attribute29               in varchar2,
384 	p_enp_attribute30               in varchar2,
385 	p_enrt_perd_det_ovrlp_bckdt_cd  in varchar2,
386           --cwb
387         p_data_freeze_date              in  date    ,
388         p_Sal_chg_reason_cd             in  varchar2,
389         p_Approval_mode_cd              in  varchar2,
390         p_hrchy_ame_trn_cd              in  varchar2,
391         p_hrchy_rl                      in  number,
392         p_hrchy_ame_app_id              in  number,
393 	p_object_version_number         in number,
394 	p_reinstate_cd			in varchar2,
395 	p_reinstate_ovrdn_cd		in varchar2,
396 	p_reopen_le_on_reprocess         in  varchar2,
397 	p_defer_deenrol_flag            varchar2
398 	)
399 	Return g_rec_type;
400 --
401 end ben_enp_shd;