DBA Data[Home] [Help]

PACKAGE: APPS.PAY_BTL_SHD

Source


1 Package pay_btl_shd as
2 /* $Header: pybtlrhi.pkh 120.2 2005/10/17 00:50:22 mkataria noship $ */
3 
4 --
5 type segment_value is varray(30) of varchar2(150);
6 --
7 -- ----------------------------------------------------------------------------
8 -- |                    Global Record Type Specification                      |
9 -- ----------------------------------------------------------------------------
10 --
11 Type g_rec_type Is Record
12   (batch_line_id                   number(15)
13   ,cost_allocation_keyflex_id      number(9)
14   ,element_type_id                 number(9)
15   ,assignment_id                   number(10)
16   ,batch_id                        number(15)
17   ,batch_line_status               varchar2(30)
18   ,assignment_number               varchar2(30)
19   ,batch_sequence                  number(9)
20   ,concatenated_segments           varchar2(240)
21   ,effective_date                  date
22   ,element_name                    varchar2(80)
23   ,entry_type                      varchar2(9)       -- Increased length
24   ,reason                          varchar2(80)
25   ,segment1                        varchar2(60)
26   ,segment2                        varchar2(60)
27   ,segment3                        varchar2(60)
28   ,segment4                        varchar2(60)
29   ,segment5                        varchar2(60)
30   ,segment6                        varchar2(60)
31   ,segment7                        varchar2(60)
32   ,segment8                        varchar2(60)
33   ,segment9                        varchar2(60)
34   ,segment10                       varchar2(60)
35   ,segment11                       varchar2(60)
36   ,segment12                       varchar2(60)
37   ,segment13                       varchar2(60)
38   ,segment14                       varchar2(60)
39   ,segment15                       varchar2(60)
40   ,segment16                       varchar2(60)
41   ,segment17                       varchar2(60)
42   ,segment18                       varchar2(60)
43   ,segment19                       varchar2(60)
44   ,segment20                       varchar2(60)
45   ,segment21                       varchar2(60)
46   ,segment22                       varchar2(60)
47   ,segment23                       varchar2(60)
48   ,segment24                       varchar2(60)
49   ,segment25                       varchar2(60)
50   ,segment26                       varchar2(60)
51   ,segment27                       varchar2(60)
52   ,segment28                       varchar2(60)
53   ,segment29                       varchar2(60)
54   ,segment30                       varchar2(60)
55   ,value_1                         varchar2(80)
56   ,value_2                         varchar2(80)
57   ,value_3                         varchar2(80)
58   ,value_4                         varchar2(80)
59   ,value_5                         varchar2(80)
60   ,value_6                         varchar2(80)
61   ,value_7                         varchar2(80)
62   ,value_8                         varchar2(80)
63   ,value_9                         varchar2(80)
64   ,value_10                        varchar2(80)
65   ,value_11                        varchar2(80)
66   ,value_12                        varchar2(80)
67   ,value_13                        varchar2(80)
68   ,value_14                        varchar2(80)
69   ,value_15                        varchar2(80)
70   ,attribute_category              varchar2(30)
71   ,attribute1                      varchar2(150)
72   ,attribute2                      varchar2(150)
73   ,attribute3                      varchar2(150)
74   ,attribute4                      varchar2(150)
75   ,attribute5                      varchar2(150)
76   ,attribute6                      varchar2(150)
77   ,attribute7                      varchar2(150)
78   ,attribute8                      varchar2(150)
79   ,attribute9                      varchar2(150)
80   ,attribute10                     varchar2(150)
81   ,attribute11                     varchar2(150)
82   ,attribute12                     varchar2(150)
83   ,attribute13                     varchar2(150)
84   ,attribute14                     varchar2(150)
85   ,attribute15                     varchar2(150)
86   ,attribute16                     varchar2(150)
87   ,attribute17                     varchar2(150)
88   ,attribute18                     varchar2(150)
89   ,attribute19                     varchar2(150)
90   ,attribute20                     varchar2(150)
91   ,entry_information_category      varchar2(30)
92   ,entry_information1              varchar2(150)
93   ,entry_information2              varchar2(150)
94   ,entry_information3              varchar2(150)
95   ,entry_information4              varchar2(150)
96   ,entry_information5              varchar2(150)
97   ,entry_information6              varchar2(150)
98   ,entry_information7              varchar2(150)
99   ,entry_information8              varchar2(150)
100   ,entry_information9              varchar2(150)
101   ,entry_information10             varchar2(150)
102   ,entry_information11             varchar2(150)
103   ,entry_information12             varchar2(150)
104   ,entry_information13             varchar2(150)
105   ,entry_information14             varchar2(150)
106   ,entry_information15             varchar2(150)
107   ,entry_information16             varchar2(150)
108   ,entry_information17             varchar2(150)
109   ,entry_information18             varchar2(150)
110   ,entry_information19             varchar2(150)
111   ,entry_information20             varchar2(150)
112   ,entry_information21             varchar2(150)
113   ,entry_information22             varchar2(150)
114   ,entry_information23             varchar2(150)
115   ,entry_information24             varchar2(150)
116   ,entry_information25             varchar2(150)
117   ,entry_information26             varchar2(150)
118   ,entry_information27             varchar2(150)
119   ,entry_information28             varchar2(150)
120   ,entry_information29             varchar2(150)
121   ,entry_information30             varchar2(150)
122   ,date_earned                     date
123   ,personal_payment_method_id      number(9)
124   ,subpriority                     number
125   ,effective_start_date            date
126   ,effective_end_date              date
127   ,object_version_number           number(9)
128   );
129 --
130 -- ----------------------------------------------------------------------------
131 -- |           Global Definitions - Internal Development Use Only             |
132 -- ----------------------------------------------------------------------------
133 --
134 g_old_rec  g_rec_type;                            -- Global record definition
135 g_api_dml  boolean;                               -- Global api dml status
136 --
137 -- ----------------------------------------------------------------------------
138 -- |------------------------< return_api_dml_status >-------------------------|
139 -- ----------------------------------------------------------------------------
140 -- {Start Of Comments}
141 --
142 -- Description:
143 --   This function will return the current g_api_dml private global
144 --   boolean status.
145 --   The g_api_dml status determines if at the time of the function
146 --   being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
147 --   is being issued from within an api.
148 --   If the status is TRUE then a dml statement is being issued from
149 --   within this entity api.
150 --   This function is primarily to support database triggers which
151 --   need to maintain the object_version_number for non-supported
152 --   dml statements (i.e. dml statement issued outside of the api layer).
153 --
154 -- Prerequisites:
155 --   None.
156 --
157 -- In Parameters:
158 --   None.
159 --
160 -- Post Success:
161 --   Processing continues.
162 --   If the function returns a TRUE value then, dml is being executed from
163 --   within this api.
164 --
165 -- Post Failure:
166 --   None.
167 --
168 -- Access Status:
169 --   Internal Row Handler Use Only.
170 --
171 -- {End Of Comments}
172 -- ----------------------------------------------------------------------------
173 Function return_api_dml_status Return Boolean;
174 --
175 -- ----------------------------------------------------------------------------
176 -- |---------------------------< constraint_error >---------------------------|
177 -- ----------------------------------------------------------------------------
178 -- {Start Of Comments}
179 --
180 -- Description:
181 --   This procedure is called when a constraint has been violated (i.e.
182 --   The exception hr_api.check_integrity_violated,
183 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
184 --   hr_api.unique_integrity_violated has been raised).
185 --   The exceptions can only be raised as follows:
186 --   1) A check constraint can only be violated during an INSERT or UPDATE
187 --      dml operation.
188 --   2) A parent integrity constraint can only be violated during an
189 --      INSERT or UPDATE dml operation.
190 --   3) A child integrity constraint can only be violated during an
191 --      DELETE dml operation.
192 --   4) A unique integrity constraint can only be violated during INSERT or
193 --      UPDATE dml operation.
194 --
195 -- Prerequisites:
196 --   1) Either hr_api.check_integrity_violated,
197 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
198 --      hr_api.unique_integrity_violated has been raised with the subsequent
199 --      stripping of the constraint name from the generated error message
200 --      text.
201 --   2) Standalone validation test which corresponds with a constraint error.
202 --
203 -- In Parameter:
204 --   p_constraint_name is in upper format and is just the constraint name
205 --   (e.g. not prefixed by brackets, schema owner etc).
206 --
207 -- Post Success:
208 --   Development dependant.
209 --
210 -- Post Failure:
211 --   Developement dependant.
212 --
213 -- Developer Implementation Notes:
214 --   For each constraint being checked the hr system package failure message
215 --   has been generated as a template only. These system error messages should
216 --   be modified as required (i.e. change the system failure message to a user
217 --   friendly defined error message).
218 --
219 -- Access Status:
220 --   Internal Development Use Only.
221 --
222 -- {End Of Comments}
223 -- ----------------------------------------------------------------------------
224 Procedure constraint_error
225   (p_constraint_name in all_constraints.constraint_name%TYPE);
226 --
227 -- ----------------------------------------------------------------------------
228 -- |-----------------------------< api_updating >-----------------------------|
229 -- ----------------------------------------------------------------------------
230 --  {Start Of Comments}
231 --
232 -- Description:
233 --   This function is used to populate the g_old_rec record with the
234 --   current row from the database for the specified primary key
235 --   provided that the primary key exists and is valid and does not
236 --   already match the current g_old_rec. The function will always return
237 --   a TRUE value if the g_old_rec is populated with the current row.
238 --   A FALSE value will be returned if all of the primary key arguments
239 --   are null.
240 --
241 -- Prerequisites:
242 --   None.
243 --
244 -- In Parameters:
245 --
246 -- Post Success:
247 --   A value of TRUE will be returned indiciating that the g_old_rec
248 --   is current.
249 --   A value of FALSE will be returned if all of the primary key arguments
250 --   have a null value (this indicates that the row has not be inserted into
251 --   the Schema), and therefore could never have a corresponding row.
252 --
253 -- Post Failure:
254 --   A failure can only occur under two circumstances:
255 --   1) The primary key is invalid (i.e. a row does not exist for the
256 --      specified primary key values).
257 --   2) If an object_version_number exists but is NOT the same as the current
258 --      g_old_rec value.
259 --
260 -- Developer Implementation Notes:
261 --   None.
262 --
263 -- Access Status:
264 --   Internal Development Use Only.
265 --
266 -- {End Of Comments}
267 -- ----------------------------------------------------------------------------
268 Function api_updating
269   (p_batch_line_id                        in     number
270   ,p_object_version_number                in     number
271   )      Return Boolean;
272 --
273 -- ----------------------------------------------------------------------------
274 -- |---------------------------------< lck >----------------------------------|
275 -- ----------------------------------------------------------------------------
276 -- {Start of comments}
277 --
278 -- Description:
279 --   The Lck process has two main functions to perform. Firstly, the row to be
280 --   updated or deleted must be locked. The locking of the row will only be
281 --   successful if the row is not currently locked by another user.
282 --   Secondly, during the locking of the row, the row is selected into
283 --   the g_old_rec data structure which enables the current row values from the
284 --   server to be available to the api.
285 --
286 -- Prerequisites:
287 --   When attempting to call the lock the object version number (if defined)
288 --   is mandatory.
289 --
290 -- In Parameters:
291 --   The arguments to the Lck process are the primary key(s) which uniquely
292 --   identify the row and the object version number of row.
293 --
294 -- Post Success:
295 --   On successful completion of the Lck process the row to be updated or
296 --   deleted will be locked and selected into the global data structure
297 --   g_old_rec.
298 --
299 -- Post Failure:
300 --   The Lck process can fail for three reasons:
301 --   1) When attempting to lock the row the row could already be locked by
302 --      another user. This will raise the HR_Api.Object_Locked exception.
303 --   2) The row which is required to be locked doesn't exist in the HR Schema.
304 --      This error is trapped and reported using the message name
305 --      'HR_7220_INVALID_PRIMARY_KEY'.
306 --   3) The row although existing in the HR Schema has a different object
307 --      version number than the object version number specified.
308 --      This error is trapped and reported using the message name
309 --      'HR_7155_OBJECT_INVALID'.
310 --
311 -- Developer Implementation Notes:
312 --   For each primary key and the object version number arguments add a
313 --   call to hr_api.mandatory_arg_error procedure to ensure that these
314 --   argument values are not null.
315 --
316 -- Access Status:
317 --   Internal Development Use Only.
318 --
319 -- {End of comments}
320 -- ----------------------------------------------------------------------------
321 Procedure lck
322   (p_batch_line_id                        in     number
323   ,p_object_version_number                in     number
324   );
325 --
326 -- ----------------------------------------------------------------------------
327 -- |-----------------------------< convert_args >-----------------------------|
328 -- ----------------------------------------------------------------------------
329 -- {Start Of Comments}
330 --
331 -- Description:
332 --   This function is used to turn attribute parameters into the record
333 --   structure parameter g_rec_type.
334 --
335 -- Prerequisites:
336 --   This is a private function and can only be called from the ins or upd
337 --   attribute processes.
338 --
339 -- In Parameters:
340 --
341 -- Post Success:
342 --   A returning record structure will be returned.
343 --
344 -- Post Failure:
345 --   No direct error handling is required within this function.  Any possible
346 --   errors within this function will be a PL/SQL value error due to conversion
347 --   of datatypes or data lengths.
348 --
349 -- Developer Implementation Notes:
350 --   None.
351 --
352 -- Access Status:
353 --   Internal Row Handler Use Only.
354 --
355 -- {End Of Comments}
356 -- ----------------------------------------------------------------------------
357 Function convert_args
358   (p_batch_line_id                  in number
359   ,p_cost_allocation_keyflex_id     in number
363   ,p_batch_line_status              in varchar2
360   ,p_element_type_id                in number
361   ,p_assignment_id                  in number
362   ,p_batch_id                       in number
364   ,p_assignment_number              in varchar2
365   ,p_batch_sequence                 in number
366   ,p_concatenated_segments          in varchar2
367   ,p_effective_date                 in date
368   ,p_element_name                   in varchar2
369   ,p_entry_type                     in varchar2
370   ,p_reason                         in varchar2
371   ,p_segment1                       in varchar2
372   ,p_segment2                       in varchar2
373   ,p_segment3                       in varchar2
374   ,p_segment4                       in varchar2
375   ,p_segment5                       in varchar2
376   ,p_segment6                       in varchar2
377   ,p_segment7                       in varchar2
378   ,p_segment8                       in varchar2
379   ,p_segment9                       in varchar2
380   ,p_segment10                      in varchar2
381   ,p_segment11                      in varchar2
382   ,p_segment12                      in varchar2
383   ,p_segment13                      in varchar2
384   ,p_segment14                      in varchar2
385   ,p_segment15                      in varchar2
386   ,p_segment16                      in varchar2
387   ,p_segment17                      in varchar2
388   ,p_segment18                      in varchar2
389   ,p_segment19                      in varchar2
390   ,p_segment20                      in varchar2
391   ,p_segment21                      in varchar2
392   ,p_segment22                      in varchar2
393   ,p_segment23                      in varchar2
394   ,p_segment24                      in varchar2
395   ,p_segment25                      in varchar2
396   ,p_segment26                      in varchar2
397   ,p_segment27                      in varchar2
398   ,p_segment28                      in varchar2
399   ,p_segment29                      in varchar2
400   ,p_segment30                      in varchar2
401   ,p_value_1                        in varchar2
402   ,p_value_2                        in varchar2
403   ,p_value_3                        in varchar2
404   ,p_value_4                        in varchar2
405   ,p_value_5                        in varchar2
406   ,p_value_6                        in varchar2
407   ,p_value_7                        in varchar2
408   ,p_value_8                        in varchar2
409   ,p_value_9                        in varchar2
410   ,p_value_10                       in varchar2
411   ,p_value_11                       in varchar2
412   ,p_value_12                       in varchar2
413   ,p_value_13                       in varchar2
414   ,p_value_14                       in varchar2
415   ,p_value_15                       in varchar2
416   ,p_attribute_category             in varchar2
417   ,p_attribute1                     in varchar2
418   ,p_attribute2                     in varchar2
419   ,p_attribute3                     in varchar2
423   ,p_attribute7                     in varchar2
420   ,p_attribute4                     in varchar2
421   ,p_attribute5                     in varchar2
422   ,p_attribute6                     in varchar2
424   ,p_attribute8                     in varchar2
425   ,p_attribute9                     in varchar2
426   ,p_attribute10                    in varchar2
427   ,p_attribute11                    in varchar2
428   ,p_attribute12                    in varchar2
429   ,p_attribute13                    in varchar2
430   ,p_attribute14                    in varchar2
431   ,p_attribute15                    in varchar2
432   ,p_attribute16                    in varchar2
433   ,p_attribute17                    in varchar2
434   ,p_attribute18                    in varchar2
435   ,p_attribute19                    in varchar2
436   ,p_attribute20                    in varchar2
437   ,p_entry_information_category     in varchar2
438   ,p_entry_information1             in varchar2
439   ,p_entry_information2             in varchar2
440   ,p_entry_information3             in varchar2
441   ,p_entry_information4             in varchar2
442   ,p_entry_information5             in varchar2
443   ,p_entry_information6             in varchar2
444   ,p_entry_information7             in varchar2
445   ,p_entry_information8             in varchar2
446   ,p_entry_information9             in varchar2
447   ,p_entry_information10            in varchar2
448   ,p_entry_information11            in varchar2
449   ,p_entry_information12            in varchar2
450   ,p_entry_information13            in varchar2
451   ,p_entry_information14            in varchar2
452   ,p_entry_information15            in varchar2
453   ,p_entry_information16            in varchar2
454   ,p_entry_information17            in varchar2
455   ,p_entry_information18            in varchar2
456   ,p_entry_information19            in varchar2
457   ,p_entry_information20            in varchar2
458   ,p_entry_information21            in varchar2
459   ,p_entry_information22            in varchar2
460   ,p_entry_information23            in varchar2
461   ,p_entry_information24            in varchar2
462   ,p_entry_information25            in varchar2
463   ,p_entry_information26            in varchar2
464   ,p_entry_information27            in varchar2
465   ,p_entry_information28            in varchar2
466   ,p_entry_information29            in varchar2
467   ,p_entry_information30            in varchar2
468   ,p_date_earned                    in date
469   ,p_personal_payment_method_id     in number
470   ,p_subpriority                    in number
471   ,p_effective_start_date           in date
472   ,p_effective_end_date             in date
473   ,p_object_version_number          in number
474   )
475   Return g_rec_type;
476 
477 -- ----------------------------------------------------------------------------
478 -- |-----------------------------< keyflex_comb >-----------------------------|
479 -- ----------------------------------------------------------------------------
480 -- {Start Of Comments}
481 --
482 -- Description:
483 --  This procedure is used to return cost_allocation_keyflex_id through OUT
484 --  parameter.
485 --
486 -- Prerequisites:
487 --   This is a private function and can only be called from the ins or upd
488 --   attribute processes.
489 --
490 -- In Parameters:
491 --
492 -- Post Success:
493 --   CCID for COST keyflex field structure will be returned in OUT parameter.
494 --
495 -- Post Failure:
496 --
497 --   app_exception.application_exception will be raised.
498 --
499 -- Developer Implementation Notes:
500 --   None.
501 --
502 -- Access Status:
503 --   Internal Row Handler Use Only.
504 --
505 -- {End Of Comments}
506 -- ----------------------------------------------------------------------------
507 
508 --
509 Procedure keyflex_comb(
510     p_dml_mode               in     varchar2  default hr_api.g_varchar2,
511     p_appl_short_name        in     varchar2  default hr_api.g_varchar2,
512     p_flex_code              in     varchar2  default hr_api.g_varchar2,
513     p_segment1               in     varchar2  default hr_api.g_varchar2,
514     p_segment2               in     varchar2  default hr_api.g_varchar2,
515     p_segment3               in     varchar2  default hr_api.g_varchar2,
516     p_segment4               in     varchar2  default hr_api.g_varchar2,
517     p_segment5               in     varchar2  default hr_api.g_varchar2,
518     p_segment6               in     varchar2  default hr_api.g_varchar2,
519     p_segment7               in     varchar2  default hr_api.g_varchar2,
520     p_segment8               in     varchar2  default hr_api.g_varchar2,
521     p_segment9               in     varchar2  default hr_api.g_varchar2,
522     p_segment10              in     varchar2  default hr_api.g_varchar2,
523     p_segment11              in     varchar2  default hr_api.g_varchar2,
524     p_segment12              in     varchar2  default hr_api.g_varchar2,
525     p_segment13              in     varchar2  default hr_api.g_varchar2,
526     p_segment14              in     varchar2  default hr_api.g_varchar2,
527     p_segment15              in     varchar2  default hr_api.g_varchar2,
528     p_segment16              in     varchar2  default hr_api.g_varchar2,
529     p_segment17              in     varchar2  default hr_api.g_varchar2,
530     p_segment18              in     varchar2  default hr_api.g_varchar2,
531     p_segment19              in     varchar2  default hr_api.g_varchar2,
532     p_segment20              in     varchar2  default hr_api.g_varchar2,
533     p_segment21              in     varchar2  default hr_api.g_varchar2,
534     p_segment22              in     varchar2  default hr_api.g_varchar2,
535     p_segment23              in     varchar2  default hr_api.g_varchar2,
536     p_segment24              in     varchar2  default hr_api.g_varchar2,
537     p_segment25              in     varchar2  default hr_api.g_varchar2,
538     p_segment26              in     varchar2  default hr_api.g_varchar2,
539     p_segment27              in     varchar2  default hr_api.g_varchar2,
540     p_segment28              in     varchar2  default hr_api.g_varchar2,
541     p_segment29              in     varchar2  default hr_api.g_varchar2,
542     p_segment30              in     varchar2  default hr_api.g_varchar2,
543     p_concat_segments_in     in     varchar2  default hr_api.g_varchar2,
544     p_batch_line_id          in     number  default hr_api.g_number,
545     p_batch_id               in     number  default hr_api.g_number,
546     --
547     -- OUT parameter,
548     -- l_rec.cost_allocation_keyflex_id may have a new value
549     --
550     p_ccid                   in out nocopy  number,
551     p_concat_segments_out    out    nocopy  varchar2
552     );
553 
554 -- ----------------------------------------------------------------------------
555 -- |---------------------------< get_flex_segs >------------------------------|
556 -- ----------------------------------------------------------------------------
557 -- {Start Of Comments}
558 --
559 -- Description:
560 --  This procedure is used to return values of segments. If segments and CCID
561 -- both are passed, segment values will be given preference.
562 --
563 -- In Parameters: Segment Values and CCID.
564 --
565 -- Post Success:
566 -- Segment values will be returned.
567 --
568 -- Post Failure:
569 --
570 --   app_exception.application_exception will be raised.
571 --
572 -- Developer Implementation Notes:
573 --   None.
574 --
575 -- Access Status:
576 --   Internal Row Handler Use Only.
577 --
578 -- {End Of Comments}
579 -- ----------------------------------------------------------------------------
580 procedure get_flex_segs
581 (
582 p_rec  in out nocopy g_rec_type
583 );
584 
585 end pay_btl_shd;