DBA Data[Home] [Help]

PACKAGE: APPS.PAY_CTY_SHD

Source


1 PACKAGE pay_cty_shd AS
2 /* $Header: pyctyrhi.pkh 120.0.12000000.2 2007/05/01 22:38:44 ahanda noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (
10   emp_city_tax_rule_id              number(9),
11   effective_start_date              date,
12   effective_end_date                date,
13   assignment_id                     number(9),
14   state_code                        varchar2(9),      -- Increased length
15   county_code                       varchar2(9),      -- Increased length
16   city_code                         varchar2(9),      -- Increased length
17   business_group_id                 number(15),
18   additional_wa_rate                number(11,2),      -- Increased length
19   filing_status_code                varchar2(30),
20   jurisdiction_code                 varchar2(11),
21   lit_additional_tax                number(11,2),
22   lit_override_amount               number(11,2),
23   lit_override_rate                 number(11,2),      -- Increased length
24   withholding_allowances            number(11),        -- Increased length
25   lit_exempt                        varchar2(30),
26   sd_exempt                         varchar2(30),
27   ht_exempt                         varchar2(30),
28   wage_exempt                       varchar2(30),
29   school_district_code              varchar2(9),      -- Increased length
30   object_version_number             number(9),
31   attribute_category                varchar2(30),
32   attribute1                        varchar2(150),
33   attribute2                        varchar2(150),
34   attribute3                        varchar2(150),
35   attribute4                        varchar2(150),
36   attribute5                        varchar2(150),
37   attribute6                        varchar2(150),
38   attribute7                        varchar2(150),
39   attribute8                        varchar2(150),
40   attribute9                        varchar2(150),
41   attribute10                       varchar2(150),
42   attribute11                       varchar2(150),
43   attribute12                       varchar2(150),
44   attribute13                       varchar2(150),
45   attribute14                       varchar2(150),
46   attribute15                       varchar2(150),
47   attribute16                       varchar2(150),
48   attribute17                       varchar2(150),
49   attribute18                       varchar2(150),
50   attribute19                       varchar2(150),
51   attribute20                       varchar2(150),
52   attribute21                       varchar2(150),
53   attribute22                       varchar2(150),
54   attribute23                      varchar2(150),
55   attribute24                      varchar2(150),
56   attribute25                       varchar2(150),
57   attribute26                       varchar2(150),
58   attribute27                       varchar2(150),
59   attribute28                       varchar2(150),
60   attribute29                       varchar2(150),
61   attribute30                       varchar2(150),
62   cty_information_category                varchar2(30),
63   cty_information1                        varchar2(150),
64   cty_information2                        varchar2(150),
65   cty_information3                        varchar2(150),
66   cty_information4                        varchar2(150),
67   cty_information5                        varchar2(150),
68   cty_information6                        varchar2(150),
69   cty_information7                        varchar2(150),
70   cty_information8                        varchar2(150),
71   cty_information9                        varchar2(150),
72   cty_information10                       varchar2(150),
73   cty_information11                       varchar2(150),
74   cty_information12                       varchar2(150),
75   cty_information13                       varchar2(150),
76   cty_information14                       varchar2(150),
77   cty_information15                       varchar2(150),
78   cty_information16                       varchar2(150),
79   cty_information17                       varchar2(150),
80   cty_information18                       varchar2(150),
81   cty_information19                       varchar2(150),
82   cty_information20                       varchar2(150),
83   cty_information21                       varchar2(150),
84   cty_information22                       varchar2(150),
85   cty_information23                      varchar2(150),
86   cty_information24                      varchar2(150),
87   cty_information25                       varchar2(150),
88   cty_information26                       varchar2(150),
89   cty_information27                       varchar2(150),
90   cty_information28                       varchar2(150),
91   cty_information29                       varchar2(150),
92   cty_information30                       varchar2(150)
93   );
94 --
95 -- ----------------------------------------------------------------------------
96 -- |           Global Definitions - Internal Development Use Only             |
97 -- ----------------------------------------------------------------------------
98 --
99 g_old_rec  g_rec_type;                            -- Global record definition
100 g_api_dml  boolean;                               -- Global api dml status
101 --
102 -- ----------------------------------------------------------------------------
103 -- |------------------------< return_api_dml_status >-------------------------|
104 -- ----------------------------------------------------------------------------
105 -- {Start Of Comments}
106 --
107 -- Description:
108 --   This function will return the current g_api_dml private global
109 --   boolean status.
110 --   The g_api_dml status determines if at the time of the function
111 --   being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
112 --   is being issued from within an api.
113 --   If the status is TRUE then a dml statement is being issued from
114 --   within this entity api.
115 --   This function is primarily to support database triggers which
116 --   need to maintain the object_version_number for non-supported
117 --   dml statements (i.e. dml statement issued outside of the api layer).
118 --
119 -- Prerequisites:
120 --   None.
121 --
122 -- In Parameters:
123 --   None.
124 --
125 -- Post Success:
126 --   Processing continues.
127 --   If the function returns a TRUE value then, dml is being executed from
128 --   within this api.
129 --
130 -- Post Failure:
131 --   None.
132 --
133 -- Access Status:
134 --   Internal Row Handler Use Only.
135 --
136 -- {End Of Comments}
137 -- ----------------------------------------------------------------------------
138 Function return_api_dml_status Return Boolean;
139 --
140 -- ----------------------------------------------------------------------------
141 -- |---------------------------< constraint_error >---------------------------|
142 -- ----------------------------------------------------------------------------
143 -- {Start Of Comments}
144 --
145 -- Description:
146 --   This procedure is called when a constraint has been violated (i.e.
147 --   The exception hr_api.check_integrity_violated,
148 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
149 --   hr_api.unique_integrity_violated has been raised).
150 --   The exceptions can only be raised as follows:
151 --   1) A check constraint can only be violated during an INSERT or UPDATE
152 --      dml operation.
153 --   2) A parent integrity constraint can only be violated during an
154 --      INSERT or UPDATE dml operation.
155 --   3) A child integrity constraint can only be violated during an
156 --      DELETE dml operation.
157 --   4) A unique integrity constraint can only be violated during INSERT or
158 --      UPDATE dml operation.
159 --
160 -- Prerequisites:
161 --   1) Either hr_api.check_integrity_violated,
162 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
163 --      hr_api.unique_integrity_violated has been raised with the subsequent
164 --      stripping of the constraint name from the generated error message
165 --      text.
166 --   2) Standalone validation test which corresponds with a constraint error.
167 --
168 -- In Parameter:
169 --   p_constraint_name is in upper format and is just the constraint name
170 --   (e.g. not prefixed by brackets, schema owner etc).
171 --
172 -- Post Success:
173 --   Development dependant.
174 --
175 -- Post Failure:
176 --   Developement dependant.
177 --
178 -- Developer Implementation Notes:
179 --   For each constraint being checked the hr system package failure message
180 --   has been generated as a template only. These system error messages should
181 --   be modified as required (i.e. change the system failure message to a user
182 --   friendly defined error message).
183 --
184 -- Access Status:
185 --   Internal Development Use Only.
186 --
187 -- {End Of Comments}
188 -- ----------------------------------------------------------------------------
189 Procedure constraint_error
190             (p_constraint_name in all_constraints.constraint_name%TYPE);
191 --
192 -- ----------------------------------------------------------------------------
193 -- |-----------------------------< api_updating >-----------------------------|
194 -- ----------------------------------------------------------------------------
195 -- {Start Of Comments}
196 --
197 -- Description:
198 --   This function is used to populate the g_old_rec record with the current
199 --   row from the database for the specified primary key provided that the
200 --   primary key exists, and is valid, and does not already match the current
201 --   g_old_rec.
202 --   The function will always return a TRUE value if the g_old_rec is
203 --   populated with the current row. A FALSE value will be returned if all of
204 --   the primary key arguments are null.
205 --
206 -- Prerequisites:
207 --   None.
208 --
209 -- In Parameters:
210 --
211 -- Post Success:
212 --   A value of TRUE will be returned indiciating that the g_old_rec is
213 --   current.
214 --   A value of FALSE will be returned if all of the primary key arguments
215 --   have a null value (this indicates that the row has not be inserted into
216 --   the Schema), and therefore could never have a corresponding row.
217 --
218 -- Post Failure:
219 --   A failure can only occur under two circumstances:
220 --   1) The primary key is invalid (i.e. a row does not exist for the
221 --      specified primary key values).
222 --   2) If an object_version_number exists but is NOT the same as the current
223 --      g_old_rec value.
224 --
225 -- Developer Implementation Notes:
226 --   None.
227 --
228 -- Access Status:
229 --   Internal Development Use Only.
230 --
231 -- {End Of Comments}
232 -- ----------------------------------------------------------------------------
233 Function api_updating
234   (p_effective_date            in date,
235    p_emp_city_tax_rule_id      in number,
236    p_object_version_number      in number
237   ) Return Boolean;
238 --
239 -- ----------------------------------------------------------------------------
240 -- |--------------------------< find_dt_del_modes >---------------------------|
241 -- ----------------------------------------------------------------------------
242 -- {Start Of Comments}
243 --
244 -- Description:
245 --   This procedure is used to determine what datetrack delete modes are
246 --   allowed as of the effective date for this entity. The procedure will
247 --   return a corresponding Boolean value for each of the delete modes
248 --   available where TRUE indicates that the corresponding delete mode is
249 --   available.
250 --
251 -- Prerequisites:
252 --   None.
253 --
254 -- In Parameters:
255 --   p_effective_date
256 --     Specifies the date at which the datetrack modes will be operated on.
257 --   p_base_key_value
258 --     Specifies the primary key value for this datetrack entity.
259 --     (E.g. For this entity the assignment of the argument would be:
260 --           p_base_key_value = :emp_city_tax_rule_id).
261 --
262 -- Post Success:
263 --   Processing continues.
264 --
265 -- Post Failure:
266 --   Failure might occur if for the specified effective date and primary key
267 --   value a row doesn't exist.
268 --
269 -- Developer Implementation Notes:
270 --   This procedure could require changes if this entity has any sepcific
271 --   delete restrictions.
272 --   For example, this entity might disallow the datetrack delete mode of
273 --   ZAP. To implement this you would have to set and return a Boolean value
274 --   of FALSE after the call to the dt_api.find_dt_del_modes procedure.
275 --
276 -- Access Status:
277 --   Internal Development Use Only.
278 --
279 -- {End Of Comments}
280 -- ----------------------------------------------------------------------------
281 Procedure find_dt_del_modes
282       (p_effective_date      in  date,
283        p_base_key_value      in  number,
284        p_zap                  out nocopy boolean,
285        p_delete               out nocopy boolean,
286        p_future_change        out nocopy boolean,
287        p_delete_next_change   out nocopy boolean);
288 --
289 -- ----------------------------------------------------------------------------
290 -- |--------------------------< find_dt_upd_modes >---------------------------|
291 -- ----------------------------------------------------------------------------
292 -- {Start Of Comments}
293 --
294 -- Description:
295 --   This procedure is used to determine what datetrack update modes are
296 --   allowed as of the effective date for this entity. The procedure will
297 --   return a corresponding Boolean value for each of the update modes
298 --   available where TRUE indicates that the corresponding update mode
299 --   is available.
300 --
301 -- Prerequisites:
302 --   None.
303 --
304 -- In Parameters:
305 --   p_effective_date
306 --     Specifies the date at which the datetrack modes will be operated on.
307 --   p_base_key_value
308 --     Specifies the primary key value for this datetrack entity.
309 --     (E.g. For this entity the assignment of the argument would be:
310 --           p_base_key_value = :emp_city_tax_rule_id).
311 --
312 -- Post Success:
313 --   Processing continues.
314 --
315 -- Post Failure:
316 --   Failure might occur if for the specified effective date and primary key
317 --   value a row doesn't exist.
318 --
319 -- Developer Implementation Notes:
320 --   This procedure could require changes if this entity has any sepcific
321 --   delete restrictions.
322 --   For example, this entity might disallow the datetrack update mode of
323 --   UPDATE. To implement this you would have to set and return a Boolean
324 --   value of FALSE after the call to the dt_api.find_dt_upd_modes procedure.
325 --
326 -- Access Status:
327 --   Internal Development Use Only.
328 --
329 -- {End Of Comments}
330 -- ----------------------------------------------------------------------------
331 Procedure find_dt_upd_modes
332       (p_effective_date      in  date,
333        p_base_key_value      in  number,
334        p_correction            out nocopy boolean,
335        p_update                out nocopy boolean,
336        p_update_override       out nocopy boolean,
337        p_update_change_insert  out nocopy boolean);
338 --
339 -- ----------------------------------------------------------------------------
340 -- |------------------------< upd_effective_end_date >------------------------|
341 -- ----------------------------------------------------------------------------
342 -- {Start Of Comments}
343 --
344 -- Description:
345 --   This procedure will update the specified datetrack row with the
346 --   specified new effective end date. The object version number is also
347 --   set to the next object version number. DateTrack modes which call
348 --   this procedure are: UPDATE, UPDATE_CHANGE_INSERT,
349 --   UPDATE_OVERRIDE, DELETE, FUTURE_CHANGE and DELETE_NEXT_CHANGE.
350 --   This is an internal datetrack maintenance procedure which should
351 --   not be modified in anyway.
352 --
353 -- Prerequisites:
354 --   None.
355 --
356 -- In Parameters:
357 --   p_new_effective_end_date
361 --     Specifies the primary key value for this datetrack entity.
358 --     Specifies the new effective end date which will be set for the
359 --     row as of the effective date.
360 --   p_base_key_value
362 --     (E.g. For this entity the assignment of the argument would be:
363 --           p_base_key_value = :emp_city_tax_rule_id).
364 --
365 -- Post Success:
366 --   The specified row will be updated with the new effective end date and
367 --   object_version_number.
368 --
369 -- Post Failure:
370 --   Failure might occur if for the specified effective date and primary key
371 --   value a row doesn't exist.
372 --
373 -- Developer Implementation Notes:
374 --   This is an internal datetrack maintenance procedure which should
375 --   not be modified in anyway.
376 --
377 -- Access Status:
378 --   Internal Row Handler Use Only.
379 --
380 -- {End Of Comments}
381 -- ----------------------------------------------------------------------------
382 Procedure upd_effective_end_date
383       (p_effective_date            in date,
384        p_base_key_value            in number,
385        p_new_effective_end_date    in date,
386        p_validation_start_date     in date,
387        p_validation_end_date       in date,
388        p_object_version_number     out nocopy number);
389 --
390 -- ----------------------------------------------------------------------------
391 -- |---------------------------------< lck >----------------------------------|
392 -- ----------------------------------------------------------------------------
393 -- {Start Of Comments}
394 --
395 -- Description:
396 --   The Lck process for datetrack is complicated and comprises of the
397 --   following processing
398 --   The processing steps are as follows:
399 --   1) The row to be updated or deleted must be locked.
400 --      By locking this row, the g_old_rec record data type is populated.
401 --   2) If a comment exists the text is selected from hr_comments.
402 --   3) The datetrack mode is then validated to ensure the operation is
403 --      valid. If the mode is valid the validation start and end dates for
404 --      the mode will be derived and returned. Any required locking is
405 --      completed when the datetrack mode is validated.
406 --
407 -- Prerequisites:
408 --   When attempting to call the lck procedure the object version number,
409 --   primary key, effective date and datetrack mode must be specified.
410 --
411 -- In Parameters:
412 --   p_effective_date
413 --     Specifies the date of the datetrack update operation.
414 --   p_datetrack_mode
415 --     Determines the datetrack update or delete mode.
416 --
417 -- Post Success:
418 --   On successful completion of the Lck process the row to be updated or
419 --   deleted will be locked and selected into the global data structure
420 --   g_old_rec.
421 --
422 -- Post Failure:
423 --   The Lck process can fail for three reasons:
424 --   1) When attempting to lock the row the row could already be locked by
425 --      another user. This will raise the HR_Api.Object_Locked exception.
426 --   2) The row which is required to be locked doesn't exist in the HR Schema.
427 --      This error is trapped and reported using the message name
428 --      'HR_7220_INVALID_PRIMARY_KEY'.
429 --   3) The row although existing in the HR Schema has a different object
430 --      version number than the object version number specified.
431 --      This error is trapped and reported using the message name
432 --      'HR_7155_OBJECT_INVALID'.
433 --
434 -- Developer Implementation Notes:
435 --   None.
436 --
437 -- Access Status:
438 --   Internal Development Use Only.
439 --
440 -- {End Of Comments}
441 -- ----------------------------------------------------------------------------
442 Procedure lck
443       (p_effective_date         in  date,
444        p_datetrack_mode         in  varchar2,
445        p_emp_city_tax_rule_id   in  number,
446        p_object_version_number  in  number,
447        p_validation_start_date  out nocopy date,
448        p_validation_end_date    out nocopy date);
449 --
450 -- ----------------------------------------------------------------------------
451 -- |-----------------------------< convert_args >-----------------------------|
452 -- ----------------------------------------------------------------------------
453 -- {Start Of Comments}
454 --
455 -- Description:
456 --   This function is used to turn attribute parameters into the record
457 --   structure parameter g_rec_type.
458 --
459 -- Prerequisites:
460 --   This is a private function and can only be called from the ins or upd
461 --   attribute processes.
462 --
463 -- In Parameters:
464 --
465 -- Post Success:
466 --   A returning record structure will be returned.
467 --
468 -- Post Failure:
469 --   No direct error handling is required within this function. Any possible
470 --   errors within this function will be a PL/SQL value error due to conversion
471 --   of datatypes or data lengths.
472 --
473 -- Developer Implementation Notes:
474 --   None.
475 --
476 -- Access Status:
477 --   Internal Row Handler Use Only.
478 --
479 -- {End Of Comments}
480 -- ----------------------------------------------------------------------------
481 Function convert_args
482       (
483       p_emp_city_tax_rule_id          in number,
487       p_state_code                    in varchar2,
484       p_effective_start_date          in date,
485       p_effective_end_date            in date,
486       p_assignment_id                 in number,
488       p_county_code                   in varchar2,
489       p_city_code                     in varchar2,
490       p_business_group_id             in number,
491       p_additional_wa_rate            in number,
492       p_filing_status_code            in varchar2,
493       p_jurisdiction_code             in varchar2,
494       p_lit_additional_tax            in number,
495       p_lit_override_amount           in number,
496       p_lit_override_rate             in number,
497       p_withholding_allowances        in number,
498       p_lit_exempt                    in varchar2,
499       p_sd_exempt                     in varchar2,
500       p_ht_exempt                     in varchar2,
501       p_wage_exempt                   in varchar2,
502       p_school_district_code          in varchar2,
503       p_object_version_number         in number,
504       p_attribute_category              in varchar2,
505       p_attribute1                      in varchar2,
506       p_attribute2                      in varchar2,
507       p_attribute3                      in varchar2,
508       p_attribute4                      in varchar2,
509       p_attribute5                      in varchar2,
510       p_attribute6                      in varchar2,
511       p_attribute7                      in varchar2,
512       p_attribute8                      in varchar2,
513       p_attribute9                      in varchar2,
514       p_attribute10                     in varchar2,
515       p_attribute11                     in varchar2,
516       p_attribute12                     in varchar2,
517       p_attribute13                     in varchar2,
518       p_attribute14                     in varchar2,
519       p_attribute15                     in varchar2,
520       p_attribute16                     in varchar2,
521       p_attribute17                     in varchar2,
522       p_attribute18                     in varchar2,
523       p_attribute19                     in varchar2,
524       p_attribute20                     in varchar2,
525       p_attribute21                     in varchar2,
526       p_attribute22                     in varchar2,
527       p_attribute23                     in varchar2,
528       p_attribute24                     in varchar2,
529       p_attribute25                     in varchar2,
530       p_attribute26                     in varchar2,
531       p_attribute27                     in varchar2,
532       p_attribute28                     in varchar2,
533       p_attribute29                     in varchar2,
534       p_attribute30                     in varchar2,
535       p_cty_information_category        in varchar2,
536       p_cty_information1                in varchar2,
537       p_cty_information2                in varchar2,
538       p_cty_information3                in varchar2,
539       p_cty_information4                in varchar2,
540       p_cty_information5                in varchar2,
541       p_cty_information6                in varchar2,
542       p_cty_information7                in varchar2,
543       p_cty_information8                in varchar2,
544       p_cty_information9                in varchar2,
545       p_cty_information10               in varchar2,
546       p_cty_information11               in varchar2,
547       p_cty_information12               in varchar2,
548       p_cty_information13               in varchar2,
549       p_cty_information14               in varchar2,
550       p_cty_information15               in varchar2,
551       p_cty_information16               in varchar2,
552       p_cty_information17               in varchar2,
553       p_cty_information18               in varchar2,
554       p_cty_information19               in varchar2,
555       p_cty_information20               in varchar2,
556       p_cty_information21               in varchar2,
557       p_cty_information22               in varchar2,
558       p_cty_information23               in varchar2,
559       p_cty_information24               in varchar2,
560       p_cty_information25               in varchar2,
561       p_cty_information26               in varchar2,
562       p_cty_information27               in varchar2,
563       p_cty_information28               in varchar2,
564       p_cty_information29               in varchar2,
565       p_cty_information30               in varchar2
566       )
567       Return g_rec_type;
568 --
569 end pay_cty_shd;