DBA Data[Home] [Help]

PACKAGE BODY: APPS.PAY_BTL_UPD

Source


1 Package Body pay_btl_upd as
2 /* $Header: pybtlrhi.pkb 120.7 2005/11/09 08:16:09 mkataria noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33)	:= '  pay_btl_upd.';  -- Global package name
9 --
10 -- ----------------------------------------------------------------------------
11 -- |------------------------------< update_dml >------------------------------|
12 -- ----------------------------------------------------------------------------
13 -- {Start Of Comments}
14 --
15 -- Description:
16 --   This procedure controls the actual dml update logic. The processing of
17 --   this procedure is:
18 --   1) Increment the object_version_number by 1 if the object_version_number
19 --      is defined as an attribute for this entity.
20 --   2) To set and unset the g_api_dml status as required (as we are about to
21 --      perform dml).
22 --   3) To update the specified row in the schema using the primary key in
23 --      the predicates.
24 --   4) To trap any constraint violations that may have occurred.
25 --   5) To raise any other errors.
26 --
27 -- Prerequisites:
28 --   This is an internal private procedure which must be called from the upd
29 --   procedure.
30 --
31 -- In Parameters:
32 --   A Pl/Sql record structre.
33 --
34 -- Post Success:
35 --   The specified row will be updated in the schema.
36 --
37 -- Post Failure:
38 --   On the update dml failure it is important to note that we always reset the
39 --   g_api_dml status to false.
40 --   If a check, unique or parent integrity constraint violation is raised the
41 --   constraint_error procedure will be called.
42 --   If any other error is reported, the error will be raised after the
43 --   g_api_dml status is reset.
44 --
45 -- Developer Implementation Notes:
46 --   The update 'set' attribute list should be modified if any of your
47 --   attributes are not updateable.
48 --
49 -- Access Status:
50 --   Internal Row Handler Use Only.
51 --
52 -- {End Of Comments}
53 -- ----------------------------------------------------------------------------
54 Procedure update_dml
55   (p_rec in out nocopy pay_btl_shd.g_rec_type
56   ) is
57 --
58   l_proc  varchar2(72) := g_package||'update_dml';
59 --
60 Begin
61   hr_utility.set_location('Entering:'||l_proc, 5);
62   --
63   -- Increment the object version
64   p_rec.object_version_number := p_rec.object_version_number + 1;
65   --
66   pay_btl_shd.g_api_dml := true;  -- Set the api dml status
67   --
68   -- Update the pay_batch_lines Row
69   --
70   update pay_batch_lines
71     set
72      batch_line_id                   = p_rec.batch_line_id
73     ,cost_allocation_keyflex_id      = p_rec.cost_allocation_keyflex_id
74     ,element_type_id                 = p_rec.element_type_id
75     ,assignment_id                   = p_rec.assignment_id
76     ,batch_line_status               = p_rec.batch_line_status
77     ,assignment_number               = p_rec.assignment_number
78     ,batch_sequence                  = p_rec.batch_sequence
79     ,concatenated_segments           = p_rec.concatenated_segments
80     ,effective_date                  = p_rec.effective_date
81     ,element_name                    = p_rec.element_name
82     ,entry_type                      = p_rec.entry_type
83     ,reason                          = p_rec.reason
84     ,segment1                        = p_rec.segment1
85     ,segment2                        = p_rec.segment2
86     ,segment3                        = p_rec.segment3
87     ,segment4                        = p_rec.segment4
88     ,segment5                        = p_rec.segment5
89     ,segment6                        = p_rec.segment6
90     ,segment7                        = p_rec.segment7
91     ,segment8                        = p_rec.segment8
92     ,segment9                        = p_rec.segment9
93     ,segment10                       = p_rec.segment10
94     ,segment11                       = p_rec.segment11
95     ,segment12                       = p_rec.segment12
96     ,segment13                       = p_rec.segment13
97     ,segment14                       = p_rec.segment14
98     ,segment15                       = p_rec.segment15
99     ,segment16                       = p_rec.segment16
100     ,segment17                       = p_rec.segment17
101     ,segment18                       = p_rec.segment18
102     ,segment19                       = p_rec.segment19
103     ,segment20                       = p_rec.segment20
104     ,segment21                       = p_rec.segment21
105     ,segment22                       = p_rec.segment22
106     ,segment23                       = p_rec.segment23
107     ,segment24                       = p_rec.segment24
108     ,segment25                       = p_rec.segment25
109     ,segment26                       = p_rec.segment26
110     ,segment27                       = p_rec.segment27
111     ,segment28                       = p_rec.segment28
112     ,segment29                       = p_rec.segment29
113     ,segment30                       = p_rec.segment30
114     ,value_1                         = p_rec.value_1
115     ,value_2                         = p_rec.value_2
116     ,value_3                         = p_rec.value_3
117     ,value_4                         = p_rec.value_4
118     ,value_5                         = p_rec.value_5
119     ,value_6                         = p_rec.value_6
120     ,value_7                         = p_rec.value_7
121     ,value_8                         = p_rec.value_8
122     ,value_9                         = p_rec.value_9
123     ,value_10                        = p_rec.value_10
124     ,value_11                        = p_rec.value_11
125     ,value_12                        = p_rec.value_12
126     ,value_13                        = p_rec.value_13
127     ,value_14                        = p_rec.value_14
128     ,value_15                        = p_rec.value_15
129     ,attribute_category              = p_rec.attribute_category
130     ,attribute1                      = p_rec.attribute1
131     ,attribute2                      = p_rec.attribute2
132     ,attribute3                      = p_rec.attribute3
133     ,attribute4                      = p_rec.attribute4
134     ,attribute5                      = p_rec.attribute5
135     ,attribute6                      = p_rec.attribute6
136     ,attribute7                      = p_rec.attribute7
137     ,attribute8                      = p_rec.attribute8
138     ,attribute9                      = p_rec.attribute9
139     ,attribute10                     = p_rec.attribute10
140     ,attribute11                     = p_rec.attribute11
141     ,attribute12                     = p_rec.attribute12
142     ,attribute13                     = p_rec.attribute13
143     ,attribute14                     = p_rec.attribute14
144     ,attribute15                     = p_rec.attribute15
145     ,attribute16                     = p_rec.attribute16
146     ,attribute17                     = p_rec.attribute17
147     ,attribute18                     = p_rec.attribute18
148     ,attribute19                     = p_rec.attribute19
149     ,attribute20                     = p_rec.attribute20
150     ,entry_information_category      = p_rec.entry_information_category
151     ,entry_information1              = p_rec.entry_information1
152     ,entry_information2              = p_rec.entry_information2
153     ,entry_information3              = p_rec.entry_information3
154     ,entry_information4              = p_rec.entry_information4
155     ,entry_information5              = p_rec.entry_information5
156     ,entry_information6              = p_rec.entry_information6
157     ,entry_information7              = p_rec.entry_information7
158     ,entry_information8              = p_rec.entry_information8
159     ,entry_information9              = p_rec.entry_information9
160     ,entry_information10             = p_rec.entry_information10
161     ,entry_information11             = p_rec.entry_information11
162     ,entry_information12             = p_rec.entry_information12
163     ,entry_information13             = p_rec.entry_information13
164     ,entry_information14             = p_rec.entry_information14
165     ,entry_information15             = p_rec.entry_information15
166     ,entry_information16             = p_rec.entry_information16
167     ,entry_information17             = p_rec.entry_information17
168     ,entry_information18             = p_rec.entry_information18
169     ,entry_information19             = p_rec.entry_information19
170     ,entry_information20             = p_rec.entry_information20
171     ,entry_information21             = p_rec.entry_information21
172     ,entry_information22             = p_rec.entry_information22
173     ,entry_information23             = p_rec.entry_information23
174     ,entry_information24             = p_rec.entry_information24
175     ,entry_information25             = p_rec.entry_information25
176     ,entry_information26             = p_rec.entry_information26
177     ,entry_information27             = p_rec.entry_information27
178     ,entry_information28             = p_rec.entry_information28
179     ,entry_information29             = p_rec.entry_information29
180     ,entry_information30             = p_rec.entry_information30
181     ,date_earned                     = p_rec.date_earned
182     ,personal_payment_method_id      = p_rec.personal_payment_method_id
183     ,subpriority                     = p_rec.subpriority
184     ,effective_start_date            = p_rec.effective_start_date
185     ,effective_end_date              = p_rec.effective_end_date
186     ,object_version_number           = p_rec.object_version_number
187     where batch_line_id = p_rec.batch_line_id;
188   --
189   pay_btl_shd.g_api_dml := false;   -- Unset the api dml status
190   --
191   hr_utility.set_location(' Leaving:'||l_proc, 10);
192 --
193 Exception
194   When hr_api.check_integrity_violated Then
195     -- A check constraint has been violated
196     pay_btl_shd.g_api_dml := false;   -- Unset the api dml status
197     pay_btl_shd.constraint_error
198       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
199   When hr_api.parent_integrity_violated Then
200     -- Parent integrity has been violated
201     pay_btl_shd.g_api_dml := false;   -- Unset the api dml status
202     pay_btl_shd.constraint_error
203       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
204   When hr_api.unique_integrity_violated Then
205     -- Unique integrity has been violated
206     pay_btl_shd.g_api_dml := false;   -- Unset the api dml status
207     pay_btl_shd.constraint_error
208       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
209   When Others Then
210     pay_btl_shd.g_api_dml := false;   -- Unset the api dml status
211     Raise;
212 End update_dml;
213 --
214 -- ----------------------------------------------------------------------------
215 -- |------------------------------< pre_update >------------------------------|
216 -- ----------------------------------------------------------------------------
217 -- {Start Of Comments}
218 --
219 -- Description:
220 --   This private procedure contains any processing which is required before
221 --   the update dml.
222 --
223 -- Prerequisites:
224 --   This is an internal procedure which is called from the upd procedure.
225 --
226 -- In Parameters:
227 --   A Pl/Sql record structure.
228 --
229 -- Post Success:
230 --   Processing continues.
231 --
232 -- Post Failure:
233 --   If an error has occurred, an error message and exception wil be raised
234 --   but not handled.
235 --
236 -- Developer Implementation Notes:
237 --   Any pre-processing required before the update dml is issued should be
238 --   coded within this procedure. It is important to note that any 3rd party
239 --   maintenance should be reviewed before placing in this procedure.
240 --
241 -- Access Status:
242 --   Internal Row Handler Use Only.
243 --
244 -- {End Of Comments}
245 -- ----------------------------------------------------------------------------
246 Procedure pre_update
247   (p_rec in pay_btl_shd.g_rec_type
248   ) is
249 --
250   l_proc  varchar2(72) := g_package||'pre_update';
251 --
252 Begin
253   hr_utility.set_location('Entering:'||l_proc, 5);
254   --
255   hr_utility.set_location(' Leaving:'||l_proc, 10);
256 End pre_update;
257 --
258 -- ----------------------------------------------------------------------------
259 -- |-----------------------------< post_update >------------------------------|
260 -- ----------------------------------------------------------------------------
261 -- {Start Of Comments}
262 --
263 -- Description:
264 --   This private procedure contains any processing which is required after the
265 --   update dml.
266 --
267 -- Prerequisites:
268 --   This is an internal procedure which is called from the upd procedure.
269 --
270 -- In Parameters:
271 --   A Pl/Sql record structure.
272 --
273 -- Post Success:
274 --   Processing continues.
275 --
276 -- Post Failure:
277 --   If an error has occurred, an error message and exception will be raised
278 --   but not handled.
279 --
280 -- Developer Implementation Notes:
281 --   Any post-processing required after the update dml is issued should be
282 --   coded within this procedure. It is important to note that any 3rd party
283 --   maintenance should be reviewed before placing in this procedure.
284 --
285 -- Access Status:
286 --   Internal Row Handler Use Only.
287 --
288 -- {End Of Comments}
289 -- ----------------------------------------------------------------------------
290 Procedure post_update
291   (p_session_date                 in date
292   ,p_rec                          in pay_btl_shd.g_rec_type
293   ) is
294 --
295   l_proc  varchar2(72) := g_package||'post_update';
296 --
297 Begin
298   hr_utility.set_location('Entering:'||l_proc, 5);
299   begin
300     --
301     pay_btl_rku.after_update
302       (p_session_date
303       => p_session_date
304       ,p_batch_line_id
305       => p_rec.batch_line_id
306       ,p_cost_allocation_keyflex_id
307       => p_rec.cost_allocation_keyflex_id
308       ,p_element_type_id
309       => p_rec.element_type_id
310       ,p_assignment_id
311       => p_rec.assignment_id
312       ,p_batch_line_status
313       => p_rec.batch_line_status
314       ,p_assignment_number
315       => p_rec.assignment_number
316       ,p_batch_sequence
317       => p_rec.batch_sequence
318       ,p_concatenated_segments
319       => p_rec.concatenated_segments
320       ,p_effective_date
321       => p_rec.effective_date
322       ,p_element_name
323       => p_rec.element_name
324       ,p_entry_type
325       => p_rec.entry_type
326       ,p_reason
327       => p_rec.reason
328       ,p_segment1
329       => p_rec.segment1
330       ,p_segment2
331       => p_rec.segment2
332       ,p_segment3
333       => p_rec.segment3
334       ,p_segment4
335       => p_rec.segment4
336       ,p_segment5
337       => p_rec.segment5
338       ,p_segment6
339       => p_rec.segment6
340       ,p_segment7
341       => p_rec.segment7
342       ,p_segment8
343       => p_rec.segment8
344       ,p_segment9
345       => p_rec.segment9
346       ,p_segment10
347       => p_rec.segment10
348       ,p_segment11
349       => p_rec.segment11
350       ,p_segment12
351       => p_rec.segment12
352       ,p_segment13
353       => p_rec.segment13
354       ,p_segment14
355       => p_rec.segment14
356       ,p_segment15
357       => p_rec.segment15
358       ,p_segment16
359       => p_rec.segment16
360       ,p_segment17
361       => p_rec.segment17
362       ,p_segment18
363       => p_rec.segment18
364       ,p_segment19
365       => p_rec.segment19
366       ,p_segment20
367       => p_rec.segment20
368       ,p_segment21
369       => p_rec.segment21
370       ,p_segment22
371       => p_rec.segment22
372       ,p_segment23
373       => p_rec.segment23
374       ,p_segment24
375       => p_rec.segment24
376       ,p_segment25
377       => p_rec.segment25
378       ,p_segment26
379       => p_rec.segment26
380       ,p_segment27
381       => p_rec.segment27
382       ,p_segment28
383       => p_rec.segment28
384       ,p_segment29
385       => p_rec.segment29
386       ,p_segment30
387       => p_rec.segment30
388       ,p_value_1
389       => p_rec.value_1
390       ,p_value_2
391       => p_rec.value_2
392       ,p_value_3
393       => p_rec.value_3
394       ,p_value_4
395       => p_rec.value_4
396       ,p_value_5
397       => p_rec.value_5
398       ,p_value_6
399       => p_rec.value_6
400       ,p_value_7
401       => p_rec.value_7
402       ,p_value_8
403       => p_rec.value_8
404       ,p_value_9
405       => p_rec.value_9
406       ,p_value_10
407       => p_rec.value_10
408       ,p_value_11
409       => p_rec.value_11
410       ,p_value_12
411       => p_rec.value_12
412       ,p_value_13
413       => p_rec.value_13
414       ,p_value_14
415       => p_rec.value_14
416       ,p_value_15
417       => p_rec.value_15
418       ,p_attribute_category
419       => p_rec.attribute_category
420       ,p_attribute1
421       => p_rec.attribute1
422       ,p_attribute2
423       => p_rec.attribute2
424       ,p_attribute3
425       => p_rec.attribute3
426       ,p_attribute4
427       => p_rec.attribute4
428       ,p_attribute5
429       => p_rec.attribute5
430       ,p_attribute6
431       => p_rec.attribute6
432       ,p_attribute7
433       => p_rec.attribute7
434       ,p_attribute8
435       => p_rec.attribute8
436       ,p_attribute9
437       => p_rec.attribute9
438       ,p_attribute10
439       => p_rec.attribute10
440       ,p_attribute11
441       => p_rec.attribute11
442       ,p_attribute12
443       => p_rec.attribute12
444       ,p_attribute13
445       => p_rec.attribute13
446       ,p_attribute14
447       => p_rec.attribute14
448       ,p_attribute15
449       => p_rec.attribute15
450       ,p_attribute16
451       => p_rec.attribute16
452       ,p_attribute17
453       => p_rec.attribute17
454       ,p_attribute18
455       => p_rec.attribute18
456       ,p_attribute19
457       => p_rec.attribute19
458       ,p_attribute20
459       => p_rec.attribute20
460       ,p_entry_information_category
461       => p_rec.entry_information_category
462       ,p_entry_information1
463       => p_rec.entry_information1
464       ,p_entry_information2
465       => p_rec.entry_information2
466       ,p_entry_information3
467       => p_rec.entry_information3
468       ,p_entry_information4
469       => p_rec.entry_information4
470       ,p_entry_information5
471       => p_rec.entry_information5
472       ,p_entry_information6
473       => p_rec.entry_information6
474       ,p_entry_information7
475       => p_rec.entry_information7
476       ,p_entry_information8
477       => p_rec.entry_information8
478       ,p_entry_information9
479       => p_rec.entry_information9
480       ,p_entry_information10
481       => p_rec.entry_information10
482       ,p_entry_information11
483       => p_rec.entry_information11
484       ,p_entry_information12
485       => p_rec.entry_information12
486       ,p_entry_information13
487       => p_rec.entry_information13
488       ,p_entry_information14
489       => p_rec.entry_information14
490       ,p_entry_information15
491       => p_rec.entry_information15
492       ,p_entry_information16
493       => p_rec.entry_information16
494       ,p_entry_information17
495       => p_rec.entry_information17
496       ,p_entry_information18
497       => p_rec.entry_information18
498       ,p_entry_information19
499       => p_rec.entry_information19
500       ,p_entry_information20
501       => p_rec.entry_information20
502       ,p_entry_information21
503       => p_rec.entry_information21
504       ,p_entry_information22
505       => p_rec.entry_information22
506       ,p_entry_information23
507       => p_rec.entry_information23
508       ,p_entry_information24
509       => p_rec.entry_information24
510       ,p_entry_information25
511       => p_rec.entry_information25
512       ,p_entry_information26
513       => p_rec.entry_information26
514       ,p_entry_information27
515       => p_rec.entry_information27
516       ,p_entry_information28
517       => p_rec.entry_information28
518       ,p_entry_information29
519       => p_rec.entry_information29
520       ,p_entry_information30
521       => p_rec.entry_information30
522       ,p_date_earned
523       => p_rec.date_earned
524       ,p_personal_payment_method_id
525       => p_rec.personal_payment_method_id
526       ,p_subpriority
527       => p_rec.subpriority
528       ,p_effective_start_date
529       => p_rec.effective_start_date
530       ,p_effective_end_date
531       => p_rec.effective_end_date
532       ,p_object_version_number
533       => p_rec.object_version_number
534       ,p_cost_allocation_keyflex_id_o
535       => pay_btl_shd.g_old_rec.cost_allocation_keyflex_id
536       ,p_element_type_id_o
537       => pay_btl_shd.g_old_rec.element_type_id
538       ,p_assignment_id_o
539       => pay_btl_shd.g_old_rec.assignment_id
540       ,p_batch_id_o
541       => pay_btl_shd.g_old_rec.batch_id
542       ,p_batch_line_status_o
543       => pay_btl_shd.g_old_rec.batch_line_status
544       ,p_assignment_number_o
545       => pay_btl_shd.g_old_rec.assignment_number
546       ,p_batch_sequence_o
547       => pay_btl_shd.g_old_rec.batch_sequence
548       ,p_concatenated_segments_o
549       => pay_btl_shd.g_old_rec.concatenated_segments
550       ,p_effective_date_o
551       => pay_btl_shd.g_old_rec.effective_date
552       ,p_element_name_o
553       => pay_btl_shd.g_old_rec.element_name
554       ,p_entry_type_o
555       => pay_btl_shd.g_old_rec.entry_type
556       ,p_reason_o
557       => pay_btl_shd.g_old_rec.reason
558       ,p_segment1_o
559       => pay_btl_shd.g_old_rec.segment1
560       ,p_segment2_o
561       => pay_btl_shd.g_old_rec.segment2
562       ,p_segment3_o
563       => pay_btl_shd.g_old_rec.segment3
564       ,p_segment4_o
565       => pay_btl_shd.g_old_rec.segment4
566       ,p_segment5_o
567       => pay_btl_shd.g_old_rec.segment5
568       ,p_segment6_o
569       => pay_btl_shd.g_old_rec.segment6
570       ,p_segment7_o
571       => pay_btl_shd.g_old_rec.segment7
572       ,p_segment8_o
573       => pay_btl_shd.g_old_rec.segment8
574       ,p_segment9_o
575       => pay_btl_shd.g_old_rec.segment9
576       ,p_segment10_o
577       => pay_btl_shd.g_old_rec.segment10
578       ,p_segment11_o
579       => pay_btl_shd.g_old_rec.segment11
580       ,p_segment12_o
581       => pay_btl_shd.g_old_rec.segment12
582       ,p_segment13_o
583       => pay_btl_shd.g_old_rec.segment13
584       ,p_segment14_o
585       => pay_btl_shd.g_old_rec.segment14
586       ,p_segment15_o
587       => pay_btl_shd.g_old_rec.segment15
588       ,p_segment16_o
589       => pay_btl_shd.g_old_rec.segment16
590       ,p_segment17_o
591       => pay_btl_shd.g_old_rec.segment17
592       ,p_segment18_o
593       => pay_btl_shd.g_old_rec.segment18
594       ,p_segment19_o
595       => pay_btl_shd.g_old_rec.segment19
596       ,p_segment20_o
597       => pay_btl_shd.g_old_rec.segment20
598       ,p_segment21_o
599       => pay_btl_shd.g_old_rec.segment21
600       ,p_segment22_o
601       => pay_btl_shd.g_old_rec.segment22
602       ,p_segment23_o
603       => pay_btl_shd.g_old_rec.segment23
604       ,p_segment24_o
605       => pay_btl_shd.g_old_rec.segment24
606       ,p_segment25_o
607       => pay_btl_shd.g_old_rec.segment25
608       ,p_segment26_o
609       => pay_btl_shd.g_old_rec.segment26
610       ,p_segment27_o
611       => pay_btl_shd.g_old_rec.segment27
612       ,p_segment28_o
613       => pay_btl_shd.g_old_rec.segment28
614       ,p_segment29_o
615       => pay_btl_shd.g_old_rec.segment29
616       ,p_segment30_o
617       => pay_btl_shd.g_old_rec.segment30
618       ,p_value_1_o
619       => pay_btl_shd.g_old_rec.value_1
620       ,p_value_2_o
621       => pay_btl_shd.g_old_rec.value_2
622       ,p_value_3_o
623       => pay_btl_shd.g_old_rec.value_3
624       ,p_value_4_o
625       => pay_btl_shd.g_old_rec.value_4
626       ,p_value_5_o
627       => pay_btl_shd.g_old_rec.value_5
628       ,p_value_6_o
629       => pay_btl_shd.g_old_rec.value_6
630       ,p_value_7_o
631       => pay_btl_shd.g_old_rec.value_7
632       ,p_value_8_o
633       => pay_btl_shd.g_old_rec.value_8
634       ,p_value_9_o
635       => pay_btl_shd.g_old_rec.value_9
636       ,p_value_10_o
637       => pay_btl_shd.g_old_rec.value_10
638       ,p_value_11_o
639       => pay_btl_shd.g_old_rec.value_11
640       ,p_value_12_o
641       => pay_btl_shd.g_old_rec.value_12
642       ,p_value_13_o
643       => pay_btl_shd.g_old_rec.value_13
644       ,p_value_14_o
645       => pay_btl_shd.g_old_rec.value_14
646       ,p_value_15_o
647       => pay_btl_shd.g_old_rec.value_15
648       ,p_attribute_category_o
649       => pay_btl_shd.g_old_rec.attribute_category
650       ,p_attribute1_o
651       => pay_btl_shd.g_old_rec.attribute1
652       ,p_attribute2_o
653       => pay_btl_shd.g_old_rec.attribute2
654       ,p_attribute3_o
655       => pay_btl_shd.g_old_rec.attribute3
656       ,p_attribute4_o
657       => pay_btl_shd.g_old_rec.attribute4
658       ,p_attribute5_o
659       => pay_btl_shd.g_old_rec.attribute5
660       ,p_attribute6_o
661       => pay_btl_shd.g_old_rec.attribute6
662       ,p_attribute7_o
663       => pay_btl_shd.g_old_rec.attribute7
664       ,p_attribute8_o
665       => pay_btl_shd.g_old_rec.attribute8
666       ,p_attribute9_o
667       => pay_btl_shd.g_old_rec.attribute9
668       ,p_attribute10_o
669       => pay_btl_shd.g_old_rec.attribute10
670       ,p_attribute11_o
671       => pay_btl_shd.g_old_rec.attribute11
672       ,p_attribute12_o
673       => pay_btl_shd.g_old_rec.attribute12
674       ,p_attribute13_o
675       => pay_btl_shd.g_old_rec.attribute13
676       ,p_attribute14_o
677       => pay_btl_shd.g_old_rec.attribute14
678       ,p_attribute15_o
679       => pay_btl_shd.g_old_rec.attribute15
680       ,p_attribute16_o
681       => pay_btl_shd.g_old_rec.attribute16
682       ,p_attribute17_o
683       => pay_btl_shd.g_old_rec.attribute17
684       ,p_attribute18_o
685       => pay_btl_shd.g_old_rec.attribute18
686       ,p_attribute19_o
687       => pay_btl_shd.g_old_rec.attribute19
688       ,p_attribute20_o
689       => pay_btl_shd.g_old_rec.attribute20
690       ,p_entry_information_category_o
691       => pay_btl_shd.g_old_rec.entry_information_category
692       ,p_entry_information1_o
693       => pay_btl_shd.g_old_rec.entry_information1
694       ,p_entry_information2_o
695       => pay_btl_shd.g_old_rec.entry_information2
696       ,p_entry_information3_o
697       => pay_btl_shd.g_old_rec.entry_information3
698       ,p_entry_information4_o
699       => pay_btl_shd.g_old_rec.entry_information4
700       ,p_entry_information5_o
701       => pay_btl_shd.g_old_rec.entry_information5
702       ,p_entry_information6_o
703       => pay_btl_shd.g_old_rec.entry_information6
704       ,p_entry_information7_o
705       => pay_btl_shd.g_old_rec.entry_information7
706       ,p_entry_information8_o
707       => pay_btl_shd.g_old_rec.entry_information8
708       ,p_entry_information9_o
709       => pay_btl_shd.g_old_rec.entry_information9
710       ,p_entry_information10_o
711       => pay_btl_shd.g_old_rec.entry_information10
712       ,p_entry_information11_o
713       => pay_btl_shd.g_old_rec.entry_information11
714       ,p_entry_information12_o
715       => pay_btl_shd.g_old_rec.entry_information12
716       ,p_entry_information13_o
717       => pay_btl_shd.g_old_rec.entry_information13
718       ,p_entry_information14_o
719       => pay_btl_shd.g_old_rec.entry_information14
720       ,p_entry_information15_o
721       => pay_btl_shd.g_old_rec.entry_information15
722       ,p_entry_information16_o
723       => pay_btl_shd.g_old_rec.entry_information16
724       ,p_entry_information17_o
725       => pay_btl_shd.g_old_rec.entry_information17
726       ,p_entry_information18_o
727       => pay_btl_shd.g_old_rec.entry_information18
728       ,p_entry_information19_o
729       => pay_btl_shd.g_old_rec.entry_information19
730       ,p_entry_information20_o
731       => pay_btl_shd.g_old_rec.entry_information20
732       ,p_entry_information21_o
733       => pay_btl_shd.g_old_rec.entry_information21
734       ,p_entry_information22_o
735       => pay_btl_shd.g_old_rec.entry_information22
736       ,p_entry_information23_o
737       => pay_btl_shd.g_old_rec.entry_information23
738       ,p_entry_information24_o
739       => pay_btl_shd.g_old_rec.entry_information24
740       ,p_entry_information25_o
741       => pay_btl_shd.g_old_rec.entry_information25
742       ,p_entry_information26_o
743       => pay_btl_shd.g_old_rec.entry_information26
744       ,p_entry_information27_o
745       => pay_btl_shd.g_old_rec.entry_information27
746       ,p_entry_information28_o
747       => pay_btl_shd.g_old_rec.entry_information28
748       ,p_entry_information29_o
749       => pay_btl_shd.g_old_rec.entry_information29
750       ,p_entry_information30_o
751       => pay_btl_shd.g_old_rec.entry_information30
752       ,p_date_earned_o
753       => pay_btl_shd.g_old_rec.date_earned
754       ,p_personal_payment_method_id_o
755       => pay_btl_shd.g_old_rec.personal_payment_method_id
756       ,p_subpriority_o
757       => pay_btl_shd.g_old_rec.subpriority
758       ,p_effective_start_date_o
759       => pay_btl_shd.g_old_rec.effective_start_date
760       ,p_effective_end_date_o
761       => pay_btl_shd.g_old_rec.effective_end_date
762       ,p_object_version_number_o
763       => pay_btl_shd.g_old_rec.object_version_number
764       );
765     --
766   exception
767     --
768     when hr_api.cannot_find_prog_unit then
769       --
770       hr_api.cannot_find_prog_unit_error
771         (p_module_name => 'PAY_BATCH_LINES'
772         ,p_hook_type   => 'AU');
773       --
774   end;
775   --
776   hr_utility.set_location(' Leaving:'||l_proc, 10);
777 End post_update;
778 --
779 -- ----------------------------------------------------------------------------
780 -- |-----------------------------< convert_defs >-----------------------------|
781 -- ----------------------------------------------------------------------------
782 -- {Start Of Comments}
783 --
784 -- Description:
785 --   The Convert_Defs procedure has one very important function:
786 --   It must return the record structure for the row with all system defaulted
787 --   values converted into its corresponding parameter value for update. When
788 --   we attempt to update a row through the Upd process , certain
789 --   parameters can be defaulted which enables flexibility in the calling of
790 --   the upd process (e.g. only attributes which need to be updated need to be
791 --   specified). For the upd process to determine which attributes
792 --   have NOT been specified we need to check if the parameter has a reserved
793 --   system default value. Therefore, for all parameters which have a
794 --   corresponding reserved system default mechanism specified we need to
795 --   check if a system default is being used. If a system default is being
796 --   used then we convert the defaulted value into its corresponding attribute
797 --   value held in the g_old_rec data structure.
798 --
799 -- Prerequisites:
800 --   This private function can only be called from the upd process.
801 --
802 -- In Parameters:
803 --   A Pl/Sql record structure.
804 --
805 -- Post Success:
806 --   The record structure will be returned with all system defaulted parameter
807 --   values converted into its current row attribute value.
808 --
809 -- Post Failure:
810 --   No direct error handling is required within this function. Any possible
811 --   errors within this procedure will be a PL/SQL value error due to
812 --   conversion of datatypes or data lengths.
813 --
814 -- Developer Implementation Notes:
815 --   None.
816 --
817 -- Access Status:
818 --   Internal Row Handler Use Only.
819 --
820 -- {End Of Comments}
821 -- ----------------------------------------------------------------------------
822 Procedure convert_defs
823   (p_rec in out nocopy pay_btl_shd.g_rec_type
824   ) is
825 --
826 Begin
827   --
828   -- We must now examine each argument value in the
829   -- p_rec plsql record structure
830   -- to see if a system default is being used. If a system default
831   -- is being used then we must set to the 'current' argument value.
832   --
833   If (p_rec.cost_allocation_keyflex_id = hr_api.g_number) then
834     p_rec.cost_allocation_keyflex_id :=
835     pay_btl_shd.g_old_rec.cost_allocation_keyflex_id;
836   End If;
837   If (p_rec.element_type_id = hr_api.g_number) then
838     p_rec.element_type_id :=
839     pay_btl_shd.g_old_rec.element_type_id;
840   End If;
841   If (p_rec.assignment_id = hr_api.g_number) then
842     p_rec.assignment_id :=
843     pay_btl_shd.g_old_rec.assignment_id;
844   End If;
845   If (p_rec.batch_id = hr_api.g_number) then
846     p_rec.batch_id :=
847     pay_btl_shd.g_old_rec.batch_id;
848   End If;
849   If (p_rec.batch_line_status = hr_api.g_varchar2) then
850     p_rec.batch_line_status :=
851     pay_btl_shd.g_old_rec.batch_line_status;
852   End If;
853   If (p_rec.assignment_number = hr_api.g_varchar2) then
854     p_rec.assignment_number :=
855     pay_btl_shd.g_old_rec.assignment_number;
856   End If;
857   If (p_rec.batch_sequence = hr_api.g_number) then
858     p_rec.batch_sequence :=
859     pay_btl_shd.g_old_rec.batch_sequence;
860   End If;
861   If (p_rec.concatenated_segments = hr_api.g_varchar2) then
862     p_rec.concatenated_segments :=
863     pay_btl_shd.g_old_rec.concatenated_segments;
864   End If;
865   If (p_rec.effective_date = hr_api.g_date) then
866     p_rec.effective_date :=
867     pay_btl_shd.g_old_rec.effective_date;
868   End If;
869   If (p_rec.element_name = hr_api.g_varchar2) then
870     p_rec.element_name :=
871     pay_btl_shd.g_old_rec.element_name;
872   End If;
873   If (p_rec.entry_type = hr_api.g_varchar2) then
874     p_rec.entry_type :=
875     pay_btl_shd.g_old_rec.entry_type;
876   End If;
877   If (p_rec.reason = hr_api.g_varchar2) then
878     p_rec.reason :=
879     pay_btl_shd.g_old_rec.reason;
880   End If;
881   If (p_rec.segment1 = hr_api.g_varchar2) then
882     p_rec.segment1 :=
883     pay_btl_shd.g_old_rec.segment1;
884   End If;
885   If (p_rec.segment2 = hr_api.g_varchar2) then
886     p_rec.segment2 :=
887     pay_btl_shd.g_old_rec.segment2;
888   End If;
889   If (p_rec.segment3 = hr_api.g_varchar2) then
890     p_rec.segment3 :=
891     pay_btl_shd.g_old_rec.segment3;
892   End If;
893   If (p_rec.segment4 = hr_api.g_varchar2) then
894     p_rec.segment4 :=
895     pay_btl_shd.g_old_rec.segment4;
896   End If;
897   If (p_rec.segment5 = hr_api.g_varchar2) then
898     p_rec.segment5 :=
899     pay_btl_shd.g_old_rec.segment5;
900   End If;
901   If (p_rec.segment6 = hr_api.g_varchar2) then
902     p_rec.segment6 :=
903     pay_btl_shd.g_old_rec.segment6;
904   End If;
905   If (p_rec.segment7 = hr_api.g_varchar2) then
906     p_rec.segment7 :=
907     pay_btl_shd.g_old_rec.segment7;
908   End If;
909   If (p_rec.segment8 = hr_api.g_varchar2) then
910     p_rec.segment8 :=
911     pay_btl_shd.g_old_rec.segment8;
912   End If;
913   If (p_rec.segment9 = hr_api.g_varchar2) then
914     p_rec.segment9 :=
915     pay_btl_shd.g_old_rec.segment9;
916   End If;
917   If (p_rec.segment10 = hr_api.g_varchar2) then
918     p_rec.segment10 :=
919     pay_btl_shd.g_old_rec.segment10;
920   End If;
921   If (p_rec.segment11 = hr_api.g_varchar2) then
922     p_rec.segment11 :=
923     pay_btl_shd.g_old_rec.segment11;
924   End If;
925   If (p_rec.segment12 = hr_api.g_varchar2) then
926     p_rec.segment12 :=
927     pay_btl_shd.g_old_rec.segment12;
928   End If;
929   If (p_rec.segment13 = hr_api.g_varchar2) then
930     p_rec.segment13 :=
931     pay_btl_shd.g_old_rec.segment13;
932   End If;
933   If (p_rec.segment14 = hr_api.g_varchar2) then
934     p_rec.segment14 :=
935     pay_btl_shd.g_old_rec.segment14;
936   End If;
937   If (p_rec.segment15 = hr_api.g_varchar2) then
938     p_rec.segment15 :=
939     pay_btl_shd.g_old_rec.segment15;
940   End If;
941   If (p_rec.segment16 = hr_api.g_varchar2) then
942     p_rec.segment16 :=
943     pay_btl_shd.g_old_rec.segment16;
944   End If;
945   If (p_rec.segment17 = hr_api.g_varchar2) then
946     p_rec.segment17 :=
947     pay_btl_shd.g_old_rec.segment17;
948   End If;
949   If (p_rec.segment18 = hr_api.g_varchar2) then
950     p_rec.segment18 :=
951     pay_btl_shd.g_old_rec.segment18;
952   End If;
953   If (p_rec.segment19 = hr_api.g_varchar2) then
954     p_rec.segment19 :=
955     pay_btl_shd.g_old_rec.segment19;
956   End If;
957   If (p_rec.segment20 = hr_api.g_varchar2) then
958     p_rec.segment20 :=
959     pay_btl_shd.g_old_rec.segment20;
960   End If;
961   If (p_rec.segment21 = hr_api.g_varchar2) then
962     p_rec.segment21 :=
963     pay_btl_shd.g_old_rec.segment21;
964   End If;
965   If (p_rec.segment22 = hr_api.g_varchar2) then
966     p_rec.segment22 :=
967     pay_btl_shd.g_old_rec.segment22;
968   End If;
969   If (p_rec.segment23 = hr_api.g_varchar2) then
970     p_rec.segment23 :=
971     pay_btl_shd.g_old_rec.segment23;
972   End If;
973   If (p_rec.segment24 = hr_api.g_varchar2) then
974     p_rec.segment24 :=
975     pay_btl_shd.g_old_rec.segment24;
976   End If;
977   If (p_rec.segment25 = hr_api.g_varchar2) then
978     p_rec.segment25 :=
979     pay_btl_shd.g_old_rec.segment25;
980   End If;
981   If (p_rec.segment26 = hr_api.g_varchar2) then
982     p_rec.segment26 :=
983     pay_btl_shd.g_old_rec.segment26;
984   End If;
985   If (p_rec.segment27 = hr_api.g_varchar2) then
986     p_rec.segment27 :=
987     pay_btl_shd.g_old_rec.segment27;
988   End If;
989   If (p_rec.segment28 = hr_api.g_varchar2) then
990     p_rec.segment28 :=
991     pay_btl_shd.g_old_rec.segment28;
992   End If;
993   If (p_rec.segment29 = hr_api.g_varchar2) then
994     p_rec.segment29 :=
995     pay_btl_shd.g_old_rec.segment29;
996   End If;
997   If (p_rec.segment30 = hr_api.g_varchar2) then
998     p_rec.segment30 :=
999     pay_btl_shd.g_old_rec.segment30;
1000   End If;
1001   If (p_rec.value_1 = hr_api.g_varchar2) then
1002     p_rec.value_1 :=
1003     pay_btl_shd.g_old_rec.value_1;
1004   End If;
1005   If (p_rec.value_2 = hr_api.g_varchar2) then
1006     p_rec.value_2 :=
1007     pay_btl_shd.g_old_rec.value_2;
1008   End If;
1009   If (p_rec.value_3 = hr_api.g_varchar2) then
1010     p_rec.value_3 :=
1011     pay_btl_shd.g_old_rec.value_3;
1012   End If;
1013   If (p_rec.value_4 = hr_api.g_varchar2) then
1014     p_rec.value_4 :=
1015     pay_btl_shd.g_old_rec.value_4;
1016   End If;
1017   If (p_rec.value_5 = hr_api.g_varchar2) then
1018     p_rec.value_5 :=
1019     pay_btl_shd.g_old_rec.value_5;
1020   End If;
1021   If (p_rec.value_6 = hr_api.g_varchar2) then
1022     p_rec.value_6 :=
1023     pay_btl_shd.g_old_rec.value_6;
1024   End If;
1025   If (p_rec.value_7 = hr_api.g_varchar2) then
1026     p_rec.value_7 :=
1027     pay_btl_shd.g_old_rec.value_7;
1028   End If;
1029   If (p_rec.value_8 = hr_api.g_varchar2) then
1030     p_rec.value_8 :=
1031     pay_btl_shd.g_old_rec.value_8;
1032   End If;
1033   If (p_rec.value_9 = hr_api.g_varchar2) then
1034     p_rec.value_9 :=
1035     pay_btl_shd.g_old_rec.value_9;
1036   End If;
1037   If (p_rec.value_10 = hr_api.g_varchar2) then
1038     p_rec.value_10 :=
1039     pay_btl_shd.g_old_rec.value_10;
1040   End If;
1041   If (p_rec.value_11 = hr_api.g_varchar2) then
1042     p_rec.value_11 :=
1043     pay_btl_shd.g_old_rec.value_11;
1044   End If;
1045   If (p_rec.value_12 = hr_api.g_varchar2) then
1046     p_rec.value_12 :=
1047     pay_btl_shd.g_old_rec.value_12;
1048   End If;
1049   If (p_rec.value_13 = hr_api.g_varchar2) then
1050     p_rec.value_13 :=
1051     pay_btl_shd.g_old_rec.value_13;
1052   End If;
1053   If (p_rec.value_14 = hr_api.g_varchar2) then
1054     p_rec.value_14 :=
1055     pay_btl_shd.g_old_rec.value_14;
1056   End If;
1057   If (p_rec.value_15 = hr_api.g_varchar2) then
1058     p_rec.value_15 :=
1059     pay_btl_shd.g_old_rec.value_15;
1060   End If;
1061   If (p_rec.attribute_category = hr_api.g_varchar2) then
1062     p_rec.attribute_category :=
1063     pay_btl_shd.g_old_rec.attribute_category;
1064   End If;
1065   If (p_rec.attribute1 = hr_api.g_varchar2) then
1066     p_rec.attribute1 :=
1067     pay_btl_shd.g_old_rec.attribute1;
1068   End If;
1069   If (p_rec.attribute2 = hr_api.g_varchar2) then
1070     p_rec.attribute2 :=
1071     pay_btl_shd.g_old_rec.attribute2;
1072   End If;
1073   If (p_rec.attribute3 = hr_api.g_varchar2) then
1074     p_rec.attribute3 :=
1075     pay_btl_shd.g_old_rec.attribute3;
1076   End If;
1077   If (p_rec.attribute4 = hr_api.g_varchar2) then
1078     p_rec.attribute4 :=
1079     pay_btl_shd.g_old_rec.attribute4;
1080   End If;
1081   If (p_rec.attribute5 = hr_api.g_varchar2) then
1082     p_rec.attribute5 :=
1083     pay_btl_shd.g_old_rec.attribute5;
1084   End If;
1085   If (p_rec.attribute6 = hr_api.g_varchar2) then
1086     p_rec.attribute6 :=
1087     pay_btl_shd.g_old_rec.attribute6;
1088   End If;
1089   If (p_rec.attribute7 = hr_api.g_varchar2) then
1090     p_rec.attribute7 :=
1091     pay_btl_shd.g_old_rec.attribute7;
1092   End If;
1093   If (p_rec.attribute8 = hr_api.g_varchar2) then
1094     p_rec.attribute8 :=
1095     pay_btl_shd.g_old_rec.attribute8;
1096   End If;
1097   If (p_rec.attribute9 = hr_api.g_varchar2) then
1098     p_rec.attribute9 :=
1099     pay_btl_shd.g_old_rec.attribute9;
1100   End If;
1101   If (p_rec.attribute10 = hr_api.g_varchar2) then
1102     p_rec.attribute10 :=
1103     pay_btl_shd.g_old_rec.attribute10;
1104   End If;
1105   If (p_rec.attribute11 = hr_api.g_varchar2) then
1106     p_rec.attribute11 :=
1107     pay_btl_shd.g_old_rec.attribute11;
1108   End If;
1109   If (p_rec.attribute12 = hr_api.g_varchar2) then
1110     p_rec.attribute12 :=
1111     pay_btl_shd.g_old_rec.attribute12;
1112   End If;
1113   If (p_rec.attribute13 = hr_api.g_varchar2) then
1114     p_rec.attribute13 :=
1115     pay_btl_shd.g_old_rec.attribute13;
1116   End If;
1117   If (p_rec.attribute14 = hr_api.g_varchar2) then
1118     p_rec.attribute14 :=
1119     pay_btl_shd.g_old_rec.attribute14;
1120   End If;
1121   If (p_rec.attribute15 = hr_api.g_varchar2) then
1122     p_rec.attribute15 :=
1123     pay_btl_shd.g_old_rec.attribute15;
1124   End If;
1125   If (p_rec.attribute16 = hr_api.g_varchar2) then
1126     p_rec.attribute16 :=
1127     pay_btl_shd.g_old_rec.attribute16;
1128   End If;
1129   If (p_rec.attribute17 = hr_api.g_varchar2) then
1130     p_rec.attribute17 :=
1131     pay_btl_shd.g_old_rec.attribute17;
1132   End If;
1133   If (p_rec.attribute18 = hr_api.g_varchar2) then
1134     p_rec.attribute18 :=
1135     pay_btl_shd.g_old_rec.attribute18;
1136   End If;
1137   If (p_rec.attribute19 = hr_api.g_varchar2) then
1138     p_rec.attribute19 :=
1139     pay_btl_shd.g_old_rec.attribute19;
1140   End If;
1141   If (p_rec.attribute20 = hr_api.g_varchar2) then
1142     p_rec.attribute20 :=
1143     pay_btl_shd.g_old_rec.attribute20;
1144   End If;
1145   If (p_rec.entry_information_category = hr_api.g_varchar2) then
1146     p_rec.entry_information_category :=
1147     pay_btl_shd.g_old_rec.entry_information_category;
1148   End If;
1149   If (p_rec.entry_information1 = hr_api.g_varchar2) then
1150     p_rec.entry_information1 :=
1151     pay_btl_shd.g_old_rec.entry_information1;
1152   End If;
1153   If (p_rec.entry_information2 = hr_api.g_varchar2) then
1154     p_rec.entry_information2 :=
1155     pay_btl_shd.g_old_rec.entry_information2;
1156   End If;
1157   If (p_rec.entry_information3 = hr_api.g_varchar2) then
1158     p_rec.entry_information3 :=
1159     pay_btl_shd.g_old_rec.entry_information3;
1160   End If;
1161   If (p_rec.entry_information4 = hr_api.g_varchar2) then
1162     p_rec.entry_information4 :=
1163     pay_btl_shd.g_old_rec.entry_information4;
1164   End If;
1165   If (p_rec.entry_information5 = hr_api.g_varchar2) then
1166     p_rec.entry_information5 :=
1167     pay_btl_shd.g_old_rec.entry_information5;
1168   End If;
1169   If (p_rec.entry_information6 = hr_api.g_varchar2) then
1170     p_rec.entry_information6 :=
1171     pay_btl_shd.g_old_rec.entry_information6;
1172   End If;
1173   If (p_rec.entry_information7 = hr_api.g_varchar2) then
1174     p_rec.entry_information7 :=
1175     pay_btl_shd.g_old_rec.entry_information7;
1176   End If;
1177   If (p_rec.entry_information8 = hr_api.g_varchar2) then
1178     p_rec.entry_information8 :=
1179     pay_btl_shd.g_old_rec.entry_information8;
1180   End If;
1181   If (p_rec.entry_information9 = hr_api.g_varchar2) then
1182     p_rec.entry_information9 :=
1183     pay_btl_shd.g_old_rec.entry_information9;
1184   End If;
1185   If (p_rec.entry_information10 = hr_api.g_varchar2) then
1186     p_rec.entry_information10 :=
1187     pay_btl_shd.g_old_rec.entry_information10;
1188   End If;
1189   If (p_rec.entry_information11 = hr_api.g_varchar2) then
1190     p_rec.entry_information11 :=
1191     pay_btl_shd.g_old_rec.entry_information11;
1192   End If;
1193   If (p_rec.entry_information12 = hr_api.g_varchar2) then
1194     p_rec.entry_information12 :=
1195     pay_btl_shd.g_old_rec.entry_information12;
1196   End If;
1197   If (p_rec.entry_information13 = hr_api.g_varchar2) then
1198     p_rec.entry_information13 :=
1199     pay_btl_shd.g_old_rec.entry_information13;
1200   End If;
1201   If (p_rec.entry_information14 = hr_api.g_varchar2) then
1202     p_rec.entry_information14 :=
1203     pay_btl_shd.g_old_rec.entry_information14;
1204   End If;
1205   If (p_rec.entry_information15 = hr_api.g_varchar2) then
1206     p_rec.entry_information15 :=
1207     pay_btl_shd.g_old_rec.entry_information15;
1208   End If;
1209   If (p_rec.entry_information16 = hr_api.g_varchar2) then
1210     p_rec.entry_information16 :=
1211     pay_btl_shd.g_old_rec.entry_information16;
1212   End If;
1213   If (p_rec.entry_information17 = hr_api.g_varchar2) then
1214     p_rec.entry_information17 :=
1215     pay_btl_shd.g_old_rec.entry_information17;
1216   End If;
1217   If (p_rec.entry_information18 = hr_api.g_varchar2) then
1218     p_rec.entry_information18 :=
1219     pay_btl_shd.g_old_rec.entry_information18;
1220   End If;
1221   If (p_rec.entry_information19 = hr_api.g_varchar2) then
1222     p_rec.entry_information19 :=
1223     pay_btl_shd.g_old_rec.entry_information19;
1224   End If;
1225   If (p_rec.entry_information20 = hr_api.g_varchar2) then
1226     p_rec.entry_information20 :=
1227     pay_btl_shd.g_old_rec.entry_information20;
1228   End If;
1229   If (p_rec.entry_information21 = hr_api.g_varchar2) then
1230     p_rec.entry_information21 :=
1231     pay_btl_shd.g_old_rec.entry_information21;
1232   End If;
1233   If (p_rec.entry_information22 = hr_api.g_varchar2) then
1234     p_rec.entry_information22 :=
1235     pay_btl_shd.g_old_rec.entry_information22;
1236   End If;
1237   If (p_rec.entry_information23 = hr_api.g_varchar2) then
1238     p_rec.entry_information23 :=
1239     pay_btl_shd.g_old_rec.entry_information23;
1240   End If;
1241   If (p_rec.entry_information24 = hr_api.g_varchar2) then
1242     p_rec.entry_information24 :=
1243     pay_btl_shd.g_old_rec.entry_information24;
1244   End If;
1245   If (p_rec.entry_information25 = hr_api.g_varchar2) then
1246     p_rec.entry_information25 :=
1247     pay_btl_shd.g_old_rec.entry_information25;
1248   End If;
1249   If (p_rec.entry_information26 = hr_api.g_varchar2) then
1250     p_rec.entry_information26 :=
1251     pay_btl_shd.g_old_rec.entry_information26;
1252   End If;
1253   If (p_rec.entry_information27 = hr_api.g_varchar2) then
1254     p_rec.entry_information27 :=
1255     pay_btl_shd.g_old_rec.entry_information27;
1256   End If;
1257   If (p_rec.entry_information28 = hr_api.g_varchar2) then
1258     p_rec.entry_information28 :=
1259     pay_btl_shd.g_old_rec.entry_information28;
1260   End If;
1261   If (p_rec.entry_information29 = hr_api.g_varchar2) then
1262     p_rec.entry_information29 :=
1263     pay_btl_shd.g_old_rec.entry_information29;
1264   End If;
1265   If (p_rec.entry_information30 = hr_api.g_varchar2) then
1266     p_rec.entry_information30 :=
1267     pay_btl_shd.g_old_rec.entry_information30;
1268   End If;
1269   If (p_rec.date_earned = hr_api.g_date) then
1270     p_rec.date_earned :=
1271     pay_btl_shd.g_old_rec.date_earned;
1272   End If;
1273   If (p_rec.personal_payment_method_id = hr_api.g_number) then
1274     p_rec.personal_payment_method_id :=
1275     pay_btl_shd.g_old_rec.personal_payment_method_id;
1276   End If;
1277   If (p_rec.subpriority = hr_api.g_number) then
1278     p_rec.subpriority :=
1279     pay_btl_shd.g_old_rec.subpriority;
1280   End If;
1281   If (p_rec.effective_start_date = hr_api.g_date) then
1282     p_rec.effective_start_date :=
1283     pay_btl_shd.g_old_rec.effective_start_date;
1284   End If;
1285   If (p_rec.effective_end_date = hr_api.g_date) then
1286     p_rec.effective_end_date :=
1287     pay_btl_shd.g_old_rec.effective_end_date;
1288   End If;
1289   --
1290 End convert_defs;
1291 --
1292 -- ----------------------------------------------------------------------------
1293 -- |---------------------------------< upd >----------------------------------|
1294 -- ----------------------------------------------------------------------------
1295 Procedure upd
1296   (p_session_date                 in     date
1297   ,p_rec                          in out nocopy pay_btl_shd.g_rec_type
1298   ) is
1299 --
1300   l_proc  varchar2(72) := g_package||'upd';
1301   l_cost_allocation_keyflex_id   pay_batch_lines.cost_allocation_keyflex_id%type;
1302   l_concat_segments_out   pay_batch_lines.concatenated_segments%type;
1303   l_segments  pay_btl_shd.segment_value;
1304   l_segment_passed  boolean;
1305 --
1306 Begin
1307   hr_utility.set_location('Entering:'||l_proc, 5);
1308   --
1309   -- We must lock the row which we need to update.
1310   --
1311   pay_btl_shd.lck
1312     (p_rec.batch_line_id
1313     ,p_rec.object_version_number
1314     );
1315 
1316 --
1317 -- The user might pass either CCID or segment values to update the
1318 -- flexfield information. In case the user passes both, we need to
1319 -- give preference to segment values and ignore the CCID.
1320 -- If only CCID is passed, get the segment values from the Combinations
1321 -- table so that the segments can be validated.
1322 --
1323   l_segment_passed := false;
1324 
1325   if ( p_rec.cost_allocation_keyflex_id  <> hr_api.g_number ) then
1326   l_segments := pay_btl_shd.segment_value( p_rec.segment1, p_rec.segment2, p_rec.segment3, p_rec.segment4,
1327                              p_rec.segment5, p_rec.segment6, p_rec.segment7, p_rec.segment8,
1328                              p_rec.segment9, p_rec.segment10,p_rec.segment11,p_rec.segment12,
1329                              p_rec.segment13,p_rec.segment14,p_rec.segment15,p_rec.segment16,
1330                              p_rec.segment17,p_rec.segment18,p_rec.segment19,p_rec.segment20,
1331                              p_rec.segment21,p_rec.segment22,p_rec.segment23,p_rec.segment24,
1332                              p_rec.segment25,p_rec.segment26,p_rec.segment27,p_rec.segment28,
1333                              p_rec.segment29,p_rec.segment30);
1334   for i in 1..30 loop
1335       if l_segments(i) = hr_api.g_varchar2 then
1336          null;
1337       else
1338          l_segment_passed := true;
1339 	 exit;
1340       end if;
1341   end loop;
1342 
1343   if ( l_segment_passed = false ) then
1344       pay_btl_shd.get_flex_segs(p_rec);
1345   end if;
1346 
1347   end if;
1348 
1349   --
1350   -- 1. During an update system defaults are used to determine if
1351   --    arguments have been defaulted or not. We must therefore
1352   --    derive the full record structure values to be updated.
1353   --
1354   -- 2. Call the supporting update validate operations.
1355   --
1356 
1357   convert_defs(p_rec);
1358 
1359 
1360   pay_btl_bus.update_validate
1361      (p_session_date,
1362       p_rec
1363      );
1364 
1365 
1366   if not (p_rec.segment1 is null and
1367      p_rec.segment2 is null and
1368      p_rec.segment3 is null and
1369      p_rec.segment4 is null and
1370      p_rec.segment5 is null and
1371      p_rec.segment6 is null and
1372      p_rec.segment7 is null and
1373      p_rec.segment8 is null and
1374      p_rec.segment9 is null and
1375      p_rec.segment10 is null and
1376      p_rec.segment11 is null and
1377      p_rec.segment12 is null and
1378      p_rec.segment13 is null and
1379      p_rec.segment14 is null and
1380      p_rec.segment15 is null and
1381      p_rec.segment16 is null and
1382      p_rec.segment17 is null and
1383      p_rec.segment18 is null and
1384      p_rec.segment19 is null and
1385      p_rec.segment20 is null and
1386      p_rec.segment21 is null and
1387      p_rec.segment22 is null and
1388      p_rec.segment23 is null and
1389      p_rec.segment24 is null and
1390      p_rec.segment25 is null and
1391      p_rec.segment26 is null and
1392      p_rec.segment27 is null and
1393      p_rec.segment28 is null and
1394      p_rec.segment29 is null and
1395      p_rec.segment30 is null) then
1396 
1397     l_cost_allocation_keyflex_id := p_rec.cost_allocation_keyflex_id;
1398     pay_btl_shd.keyflex_comb(
1399     p_dml_mode               => 'UPDATE',
1400     p_appl_short_name        => 'PAY',
1401     p_flex_code              => 'COST',
1402     p_segment1               => p_rec.segment1,
1403     p_segment2               => p_rec.segment2,
1404     p_segment3               => p_rec.segment3,
1405     p_segment4               => p_rec.segment4,
1406     p_segment5               => p_rec.segment5,
1407     p_segment6               => p_rec.segment6,
1408     p_segment7               => p_rec.segment7,
1409     p_segment8               => p_rec.segment8,
1410     p_segment9               => p_rec.segment9,
1411     p_segment10              => p_rec.segment10,
1412     p_segment11              => p_rec.segment11,
1413     p_segment12              => p_rec.segment12,
1414     p_segment13              => p_rec.segment13,
1415     p_segment14              => p_rec.segment14,
1416     p_segment15              => p_rec.segment15,
1417     p_segment16              => p_rec.segment16,
1418     p_segment17              => p_rec.segment17,
1419     p_segment18              => p_rec.segment18,
1420     p_segment19              => p_rec.segment19,
1421     p_segment20              => p_rec.segment20,
1422     p_segment21              => p_rec.segment21,
1423     p_segment22              => p_rec.segment22,
1424     p_segment23              => p_rec.segment23,
1425     p_segment24              => p_rec.segment24,
1426     p_segment25              => p_rec.segment25,
1427     p_segment26              => p_rec.segment26,
1428     p_segment27              => p_rec.segment27,
1429     p_segment28              => p_rec.segment28,
1430     p_segment29              => p_rec.segment29,
1431     p_segment30              => p_rec.segment30,
1432     p_concat_segments_in     => p_rec.concatenated_segments,
1433     p_batch_line_id          => p_rec.batch_line_id,
1434     --
1435     -- OUT parameter,
1436     -- l_rec.cost_allocation_keyflex_id may have a new value
1437     --
1438     p_ccid                   => l_cost_allocation_keyflex_id,
1439     p_concat_segments_out    => l_concat_segments_out
1440     );
1441 
1442   end if;
1443 
1444   p_rec.cost_allocation_keyflex_id := l_cost_allocation_keyflex_id;
1445   p_rec.concatenated_segments := l_concat_segments_out;
1446   --
1447   -- Call the supporting pre-update operation
1448   --
1449   pay_btl_upd.pre_update(p_rec);
1450   --
1451   -- Update the row.
1452   --
1453   pay_btl_upd.update_dml(p_rec);
1454   --
1455   -- Call the supporting post-update operation
1456   --
1457   pay_btl_upd.post_update
1458      (p_session_date
1459      ,p_rec
1460      );
1461 End upd;
1462 --
1463 -- ----------------------------------------------------------------------------
1464 -- |---------------------------------< upd >----------------------------------|
1465 -- ----------------------------------------------------------------------------
1466 Procedure upd
1467   (p_session_date                 in     date
1468   ,p_batch_line_id                in     number
1469   ,p_object_version_number        in out nocopy number
1470   ,p_batch_line_status            in     varchar2  default hr_api.g_varchar2
1471   ,p_cost_allocation_keyflex_id   in     number    default hr_api.g_number
1472   ,p_element_type_id              in     number    default hr_api.g_number
1473   ,p_assignment_id                in     number    default hr_api.g_number
1474   ,p_assignment_number            in     varchar2  default hr_api.g_varchar2
1475   ,p_batch_sequence               in     number    default hr_api.g_number
1476   ,p_concatenated_segments        in     varchar2  default hr_api.g_varchar2
1477   ,p_effective_date               in     date      default hr_api.g_date
1478   ,p_element_name                 in     varchar2  default hr_api.g_varchar2
1479   ,p_entry_type                   in     varchar2  default hr_api.g_varchar2
1480   ,p_reason                       in     varchar2  default hr_api.g_varchar2
1481   ,p_segment1                     in     varchar2  default hr_api.g_varchar2
1482   ,p_segment2                     in     varchar2  default hr_api.g_varchar2
1483   ,p_segment3                     in     varchar2  default hr_api.g_varchar2
1484   ,p_segment4                     in     varchar2  default hr_api.g_varchar2
1485   ,p_segment5                     in     varchar2  default hr_api.g_varchar2
1486   ,p_segment6                     in     varchar2  default hr_api.g_varchar2
1487   ,p_segment7                     in     varchar2  default hr_api.g_varchar2
1488   ,p_segment8                     in     varchar2  default hr_api.g_varchar2
1489   ,p_segment9                     in     varchar2  default hr_api.g_varchar2
1490   ,p_segment10                    in     varchar2  default hr_api.g_varchar2
1491   ,p_segment11                    in     varchar2  default hr_api.g_varchar2
1492   ,p_segment12                    in     varchar2  default hr_api.g_varchar2
1493   ,p_segment13                    in     varchar2  default hr_api.g_varchar2
1494   ,p_segment14                    in     varchar2  default hr_api.g_varchar2
1495   ,p_segment15                    in     varchar2  default hr_api.g_varchar2
1496   ,p_segment16                    in     varchar2  default hr_api.g_varchar2
1497   ,p_segment17                    in     varchar2  default hr_api.g_varchar2
1498   ,p_segment18                    in     varchar2  default hr_api.g_varchar2
1499   ,p_segment19                    in     varchar2  default hr_api.g_varchar2
1500   ,p_segment20                    in     varchar2  default hr_api.g_varchar2
1501   ,p_segment21                    in     varchar2  default hr_api.g_varchar2
1502   ,p_segment22                    in     varchar2  default hr_api.g_varchar2
1503   ,p_segment23                    in     varchar2  default hr_api.g_varchar2
1504   ,p_segment24                    in     varchar2  default hr_api.g_varchar2
1505   ,p_segment25                    in     varchar2  default hr_api.g_varchar2
1506   ,p_segment26                    in     varchar2  default hr_api.g_varchar2
1507   ,p_segment27                    in     varchar2  default hr_api.g_varchar2
1508   ,p_segment28                    in     varchar2  default hr_api.g_varchar2
1509   ,p_segment29                    in     varchar2  default hr_api.g_varchar2
1510   ,p_segment30                    in     varchar2  default hr_api.g_varchar2
1511   ,p_value_1                      in     varchar2  default hr_api.g_varchar2
1512   ,p_value_2                      in     varchar2  default hr_api.g_varchar2
1513   ,p_value_3                      in     varchar2  default hr_api.g_varchar2
1514   ,p_value_4                      in     varchar2  default hr_api.g_varchar2
1515   ,p_value_5                      in     varchar2  default hr_api.g_varchar2
1516   ,p_value_6                      in     varchar2  default hr_api.g_varchar2
1517   ,p_value_7                      in     varchar2  default hr_api.g_varchar2
1518   ,p_value_8                      in     varchar2  default hr_api.g_varchar2
1519   ,p_value_9                      in     varchar2  default hr_api.g_varchar2
1520   ,p_value_10                     in     varchar2  default hr_api.g_varchar2
1521   ,p_value_11                     in     varchar2  default hr_api.g_varchar2
1522   ,p_value_12                     in     varchar2  default hr_api.g_varchar2
1523   ,p_value_13                     in     varchar2  default hr_api.g_varchar2
1524   ,p_value_14                     in     varchar2  default hr_api.g_varchar2
1525   ,p_value_15                     in     varchar2  default hr_api.g_varchar2
1526   ,p_attribute_category           in     varchar2  default hr_api.g_varchar2
1527   ,p_attribute1                   in     varchar2  default hr_api.g_varchar2
1528   ,p_attribute2                   in     varchar2  default hr_api.g_varchar2
1529   ,p_attribute3                   in     varchar2  default hr_api.g_varchar2
1530   ,p_attribute4                   in     varchar2  default hr_api.g_varchar2
1531   ,p_attribute5                   in     varchar2  default hr_api.g_varchar2
1532   ,p_attribute6                   in     varchar2  default hr_api.g_varchar2
1533   ,p_attribute7                   in     varchar2  default hr_api.g_varchar2
1534   ,p_attribute8                   in     varchar2  default hr_api.g_varchar2
1535   ,p_attribute9                   in     varchar2  default hr_api.g_varchar2
1536   ,p_attribute10                  in     varchar2  default hr_api.g_varchar2
1537   ,p_attribute11                  in     varchar2  default hr_api.g_varchar2
1538   ,p_attribute12                  in     varchar2  default hr_api.g_varchar2
1539   ,p_attribute13                  in     varchar2  default hr_api.g_varchar2
1540   ,p_attribute14                  in     varchar2  default hr_api.g_varchar2
1541   ,p_attribute15                  in     varchar2  default hr_api.g_varchar2
1542   ,p_attribute16                  in     varchar2  default hr_api.g_varchar2
1543   ,p_attribute17                  in     varchar2  default hr_api.g_varchar2
1544   ,p_attribute18                  in     varchar2  default hr_api.g_varchar2
1545   ,p_attribute19                  in     varchar2  default hr_api.g_varchar2
1546   ,p_attribute20                  in     varchar2  default hr_api.g_varchar2
1547   ,p_entry_information_category   in     varchar2  default hr_api.g_varchar2
1548   ,p_entry_information1           in     varchar2  default hr_api.g_varchar2
1549   ,p_entry_information2           in     varchar2  default hr_api.g_varchar2
1550   ,p_entry_information3           in     varchar2  default hr_api.g_varchar2
1551   ,p_entry_information4           in     varchar2  default hr_api.g_varchar2
1552   ,p_entry_information5           in     varchar2  default hr_api.g_varchar2
1553   ,p_entry_information6           in     varchar2  default hr_api.g_varchar2
1554   ,p_entry_information7           in     varchar2  default hr_api.g_varchar2
1555   ,p_entry_information8           in     varchar2  default hr_api.g_varchar2
1556   ,p_entry_information9           in     varchar2  default hr_api.g_varchar2
1557   ,p_entry_information10          in     varchar2  default hr_api.g_varchar2
1558   ,p_entry_information11          in     varchar2  default hr_api.g_varchar2
1559   ,p_entry_information12          in     varchar2  default hr_api.g_varchar2
1560   ,p_entry_information13          in     varchar2  default hr_api.g_varchar2
1561   ,p_entry_information14          in     varchar2  default hr_api.g_varchar2
1562   ,p_entry_information15          in     varchar2  default hr_api.g_varchar2
1563   ,p_entry_information16          in     varchar2  default hr_api.g_varchar2
1564   ,p_entry_information17          in     varchar2  default hr_api.g_varchar2
1565   ,p_entry_information18          in     varchar2  default hr_api.g_varchar2
1566   ,p_entry_information19          in     varchar2  default hr_api.g_varchar2
1567   ,p_entry_information20          in     varchar2  default hr_api.g_varchar2
1568   ,p_entry_information21          in     varchar2  default hr_api.g_varchar2
1569   ,p_entry_information22          in     varchar2  default hr_api.g_varchar2
1570   ,p_entry_information23          in     varchar2  default hr_api.g_varchar2
1571   ,p_entry_information24          in     varchar2  default hr_api.g_varchar2
1572   ,p_entry_information25          in     varchar2  default hr_api.g_varchar2
1573   ,p_entry_information26          in     varchar2  default hr_api.g_varchar2
1574   ,p_entry_information27          in     varchar2  default hr_api.g_varchar2
1575   ,p_entry_information28          in     varchar2  default hr_api.g_varchar2
1576   ,p_entry_information29          in     varchar2  default hr_api.g_varchar2
1577   ,p_entry_information30          in     varchar2  default hr_api.g_varchar2
1578   ,p_date_earned                  in     date      default hr_api.g_date
1579   ,p_personal_payment_method_id   in     number    default hr_api.g_number
1580   ,p_subpriority                  in     number    default hr_api.g_number
1581   ,p_effective_start_date         in     date      default hr_api.g_date
1582   ,p_effective_end_date           in     date      default hr_api.g_date
1583   ) is
1584 --
1585   l_rec	  pay_btl_shd.g_rec_type;
1586   l_proc  varchar2(72) := g_package||'upd';
1587 --  l_concat_segments_out varchar2(2000);
1588 --  l_cost_allocation_keyflex_id number;
1589 --
1590 Begin
1591   hr_utility.set_location('Entering:'||l_proc, 5);
1592   --
1593   -- Call conversion function to turn arguments into the
1594   -- l_rec structure.
1595   --
1596 --  l_cost_allocation_keyflex_id := p_cost_allocation_keyflex_id;
1597   l_rec :=
1598   pay_btl_shd.convert_args
1599   (p_batch_line_id
1600   ,p_cost_allocation_keyflex_id
1601   ,p_element_type_id
1602   ,p_assignment_id
1603   ,hr_api.g_number
1604   ,p_batch_line_status
1605   ,p_assignment_number
1606   ,p_batch_sequence
1607   ,p_concatenated_segments
1608   ,p_effective_date
1609   ,p_element_name
1610   ,p_entry_type
1611   ,p_reason
1612   ,p_segment1
1613   ,p_segment2
1614   ,p_segment3
1615   ,p_segment4
1616   ,p_segment5
1617   ,p_segment6
1618   ,p_segment7
1619   ,p_segment8
1620   ,p_segment9
1621   ,p_segment10
1622   ,p_segment11
1623   ,p_segment12
1624   ,p_segment13
1625   ,p_segment14
1626   ,p_segment15
1627   ,p_segment16
1628   ,p_segment17
1629   ,p_segment18
1630   ,p_segment19
1631   ,p_segment20
1632   ,p_segment21
1633   ,p_segment22
1634   ,p_segment23
1635   ,p_segment24
1636   ,p_segment25
1637   ,p_segment26
1638   ,p_segment27
1639   ,p_segment28
1640   ,p_segment29
1641   ,p_segment30
1642   ,p_value_1
1643   ,p_value_2
1644   ,p_value_3
1645   ,p_value_4
1646   ,p_value_5
1647   ,p_value_6
1648   ,p_value_7
1649   ,p_value_8
1650   ,p_value_9
1651   ,p_value_10
1652   ,p_value_11
1653   ,p_value_12
1654   ,p_value_13
1655   ,p_value_14
1656   ,p_value_15
1657   ,p_attribute_category
1658   ,p_attribute1
1659   ,p_attribute2
1660   ,p_attribute3
1661   ,p_attribute4
1662   ,p_attribute5
1663   ,p_attribute6
1664   ,p_attribute7
1665   ,p_attribute8
1666   ,p_attribute9
1667   ,p_attribute10
1668   ,p_attribute11
1669   ,p_attribute12
1670   ,p_attribute13
1671   ,p_attribute14
1672   ,p_attribute15
1673   ,p_attribute16
1674   ,p_attribute17
1675   ,p_attribute18
1676   ,p_attribute19
1677   ,p_attribute20
1678   ,p_entry_information_category
1679   ,p_entry_information1
1680   ,p_entry_information2
1681   ,p_entry_information3
1682   ,p_entry_information4
1683   ,p_entry_information5
1684   ,p_entry_information6
1685   ,p_entry_information7
1686   ,p_entry_information8
1687   ,p_entry_information9
1688   ,p_entry_information10
1689   ,p_entry_information11
1690   ,p_entry_information12
1691   ,p_entry_information13
1692   ,p_entry_information14
1693   ,p_entry_information15
1694   ,p_entry_information16
1695   ,p_entry_information17
1696   ,p_entry_information18
1697   ,p_entry_information19
1698   ,p_entry_information20
1699   ,p_entry_information21
1700   ,p_entry_information22
1701   ,p_entry_information23
1702   ,p_entry_information24
1703   ,p_entry_information25
1704   ,p_entry_information26
1705   ,p_entry_information27
1706   ,p_entry_information28
1707   ,p_entry_information29
1708   ,p_entry_information30
1709   ,p_date_earned
1710   ,p_personal_payment_method_id
1711   ,p_subpriority
1712   ,p_effective_start_date
1713   ,p_effective_end_date
1714   ,p_object_version_number
1715   );
1716 
1717 --  l_cost_allocation_keyflex_id := l_rec.cost_allocation_keyflex_id;
1718 
1719 
1720 --  l_rec.cost_allocation_keyflex_id:= l_cost_allocation_keyflex_id;
1721 
1722   --
1723   -- Having converted the arguments into the
1724   -- plsql record structure we call the corresponding record
1725   -- business process.
1726   --
1727   pay_btl_upd.upd
1728      (p_session_date,
1729       l_rec
1730      );
1731   p_object_version_number := l_rec.object_version_number;
1732   --
1733   hr_utility.set_location(' Leaving:'||l_proc, 10);
1734 End upd;
1735 --
1736 end pay_btl_upd;
1737