DBA Data[Home] [Help]

PACKAGE BODY: APPS.PAY_PEL_SHD

Source


1 Package Body pay_pel_shd as
2 /* $Header: pypelrhi.pkb 120.8 2008/02/06 11:17:40 salogana noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33) := '  pay_pel_shd.';  -- Global package name
9 
10 --
11 -- ----------------------------------------------------------------------------
12 -- |------------------------< return_api_dml_status >-------------------------|
13 -- ----------------------------------------------------------------------------
14 Function return_api_dml_status Return Boolean Is
15 --
16 Begin
17   --
18   Return (nvl(g_api_dml, false));
19   --
20 End return_api_dml_status;
21 --
22 -- ----------------------------------------------------------------------------
23 -- |---------------------------< constraint_error >---------------------------|
24 -- ----------------------------------------------------------------------------
25 Procedure constraint_error
26   (p_constraint_name in all_constraints.constraint_name%TYPE
27   ) Is
28 --
29   l_proc        varchar2(72) := g_package||'constraint_error';
30 --
31 Begin
32   --
33   If (p_constraint_name = 'PAY_ELEMENT_LINKS_F_FK10') Then
34     fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
35     fnd_message.set_token('PROCEDURE', l_proc);
36     fnd_message.set_token('STEP','5');
37     fnd_message.raise_error;
38   ElsIf (p_constraint_name = 'PAY_ELEMENT_LINKS_F_FK11') Then
39     fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
40     fnd_message.set_token('PROCEDURE', l_proc);
41     fnd_message.set_token('STEP','10');
42     fnd_message.raise_error;
43   ElsIf (p_constraint_name = 'PAY_ELEMENT_LINKS_F_FK12') Then
44     fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
45     fnd_message.set_token('PROCEDURE', l_proc);
46     fnd_message.set_token('STEP','15');
47     fnd_message.raise_error;
48   ElsIf (p_constraint_name = 'PAY_ELEMENT_LINKS_F_FK13') Then
49     fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
50     fnd_message.set_token('PROCEDURE', l_proc);
51     fnd_message.set_token('STEP','20');
52     fnd_message.raise_error;
53   ElsIf (p_constraint_name = 'PAY_ELEMENT_LINKS_F_FK2') Then
54     fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
55     fnd_message.set_token('PROCEDURE', l_proc);
56     fnd_message.set_token('STEP','25');
57     fnd_message.raise_error;
58   ElsIf (p_constraint_name = 'PAY_ELEMENT_LINKS_F_FK4') Then
59     fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
60     fnd_message.set_token('PROCEDURE', l_proc);
61     fnd_message.set_token('STEP','30');
62     fnd_message.raise_error;
63   ElsIf (p_constraint_name = 'PAY_ELEMENT_LINKS_F_FK5') Then
64     fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
65     fnd_message.set_token('PROCEDURE', l_proc);
66     fnd_message.set_token('STEP','35');
67     fnd_message.raise_error;
68   ElsIf (p_constraint_name = 'PAY_ELEMENT_LINKS_F_FK6') Then
69     fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
70     fnd_message.set_token('PROCEDURE', l_proc);
71     fnd_message.set_token('STEP','40');
72     fnd_message.raise_error;
73   ElsIf (p_constraint_name = 'PAY_ELEMENT_LINKS_F_FK8') Then
74     fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
75     fnd_message.set_token('PROCEDURE', l_proc);
76     fnd_message.set_token('STEP','45');
77     fnd_message.raise_error;
78   ElsIf (p_constraint_name = 'PAY_ELEMENT_LINKS_F_FK9') Then
79     fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
80     fnd_message.set_token('PROCEDURE', l_proc);
81     fnd_message.set_token('STEP','50');
82     fnd_message.raise_error;
83   ElsIf (p_constraint_name = 'PAY_ELEMENT_LINKS_F_PK') Then
84     fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
85     fnd_message.set_token('PROCEDURE', l_proc);
86     fnd_message.set_token('STEP','55');
87     fnd_message.raise_error;
88   ElsIf (p_constraint_name = 'PAY_LINK_COSTABLE_TYPE_CHK') Then
89     fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
90     fnd_message.set_token('PROCEDURE', l_proc);
91     fnd_message.set_token('STEP','60');
92     fnd_message.raise_error;
93   ElsIf (p_constraint_name = 'PAY_LINK_LINK_TO_ALL_PAYRO_CHK') Then
94     fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
95     fnd_message.set_token('PROCEDURE', l_proc);
96     fnd_message.set_token('STEP','65');
97     fnd_message.raise_error;
98   ElsIf (p_constraint_name = 'PAY_LINK_MULTIPLY_VALUE_FL_CHK') Then
99     fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
100     fnd_message.set_token('PROCEDURE', l_proc);
101     fnd_message.set_token('STEP','70');
102     fnd_message.raise_error;
103   ElsIf (p_constraint_name = 'PAY_LINK_STANDARD_LINK_FLA_CHK') Then
104     fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
105     fnd_message.set_token('PROCEDURE', l_proc);
106     fnd_message.set_token('STEP','75');
107     fnd_message.raise_error;
108   ElsIf (p_constraint_name = 'PAY_LINK_TRANSFER_TO_GL_FL_CHK') Then
109     fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
110     fnd_message.set_token('PROCEDURE', l_proc);
111     fnd_message.set_token('STEP','80');
112     fnd_message.raise_error;
113   Else
114     fnd_message.set_name('PAY', 'HR_7877_API_INVALID_CONSTRAINT');
115     fnd_message.set_token('PROCEDURE', l_proc);
116     fnd_message.set_token('CONSTRAINT_NAME', p_constraint_name);
117     fnd_message.raise_error;
118   End If;
119   --
120 End constraint_error;
121 --
122 -- ----------------------------------------------------------------------------
123 -- |-----------------------------< api_updating >-----------------------------|
124 -- ----------------------------------------------------------------------------
125 Function api_updating
126   (p_effective_date                   in date
127   ,p_element_link_id                  in number
128   ,p_object_version_number            in number
129   ) Return Boolean Is
130   --
131   -- Cursor selects the 'current' row from the HR Schema
132   --
133   Cursor C_Sel1 is
134     select
135      element_link_id
136     ,effective_start_date
137     ,effective_end_date
138     ,payroll_id
139     ,job_id
140     ,position_id
141     ,people_group_id
142     ,cost_allocation_keyflex_id
143     ,organization_id
144     ,element_type_id
145     ,location_id
146     ,grade_id
147     ,balancing_keyflex_id
148     ,business_group_id
149     ,element_set_id
150     ,pay_basis_id
151     ,costable_type
152     ,link_to_all_payrolls_flag
153     ,multiply_value_flag
154     ,standard_link_flag
155     ,transfer_to_gl_flag
156     ,comment_id
157     ,null
158     ,employment_category
159     ,qualifying_age
160     ,qualifying_length_of_service
161     ,qualifying_units
162     ,attribute_category
163     ,attribute1
164     ,attribute2
165     ,attribute3
166     ,attribute4
167     ,attribute5
168     ,attribute6
169     ,attribute7
170     ,attribute8
171     ,attribute9
172     ,attribute10
173     ,attribute11
174     ,attribute12
175     ,attribute13
176     ,attribute14
177     ,attribute15
178     ,attribute16
179     ,attribute17
180     ,attribute18
181     ,attribute19
182     ,attribute20
183     ,object_version_number
184     from        pay_element_links_f
185     where       element_link_id = p_element_link_id
186     and         p_effective_date
187     between     effective_start_date and effective_end_date;
188 --
189   l_fct_ret     boolean;
190 --
191 Begin
192   --
193   If (p_effective_date is null or
194       p_element_link_id is null or
195       p_object_version_number is null) Then
196     --
197     -- One of the primary key arguments is null therefore we must
198     -- set the returning function value to false
199     --
200     l_fct_ret := false;
201   Else
202     If (p_element_link_id =
203         pay_pel_shd.g_old_rec.element_link_id and
204         p_object_version_number =
205         pay_pel_shd.g_old_rec.object_version_number
206 ) Then
207       --
208       -- The g_old_rec is current therefore we must
209       -- set the returning function to true
210       --
211       l_fct_ret := true;
212     Else
213       --
214       -- Select the current row
215       --
216       Open C_Sel1;
217       Fetch C_Sel1 Into pay_pel_shd.g_old_rec;
218       If C_Sel1%notfound Then
219         Close C_Sel1;
220         --
221         -- The primary key is invalid therefore we must error
222         --
223         fnd_message.set_name('PAY', 'HR_7220_INVALID_PRIMARY_KEY');
224         fnd_message.raise_error;
225       End If;
226       Close C_Sel1;
227       If (p_object_version_number
228           <> pay_pel_shd.g_old_rec.object_version_number) Then
229         fnd_message.set_name('PAY', 'HR_7155_OBJECT_INVALID');
230         fnd_message.raise_error;
231       End If;
232       l_fct_ret := true;
233     End If;
234   End If;
235   Return (l_fct_ret);
236 --
237 End api_updating;
238 --
239 -- ----------------------------------------------------------------------------
240 -- |---------------------------< find_dt_upd_modes >--------------------------|
241 -- ----------------------------------------------------------------------------
242 Procedure find_dt_upd_modes
243   (p_effective_date         in date
244   ,p_base_key_value         in number
245   ,p_correction             out nocopy boolean
246   ,p_update                 out nocopy boolean
247   ,p_update_override        out nocopy boolean
248   ,p_update_change_insert   out nocopy boolean
249   ) is
250 --
251   l_proc        varchar2(72) := g_package||'find_dt_upd_modes';
252 --
253 Begin
254   hr_utility.set_location('Entering:'||l_proc, 5);
255   --
256   -- Call the corresponding datetrack api
257   --
258   dt_api.find_dt_upd_modes
259     (p_effective_date        => p_effective_date
260     ,p_base_table_name       => 'pay_element_links_f'
261     ,p_base_key_column       => 'element_link_id'
262     ,p_base_key_value        => p_base_key_value
263     ,p_correction            => p_correction
264     ,p_update                => p_update
265     ,p_update_override       => p_update_override
266     ,p_update_change_insert  => p_update_change_insert
267     );
268   --
269   hr_utility.set_location(' Leaving:'||l_proc, 10);
270 End find_dt_upd_modes;
271 --
272 -- ----------------------------------------------------------------------------
273 -- |---------------------------< find_dt_del_modes >--------------------------|
274 -- ----------------------------------------------------------------------------
275 Procedure find_dt_del_modes
276   (p_effective_date        in date
277   ,p_base_key_value        in number
278   ,p_zap                   out nocopy boolean
279   ,p_delete                out nocopy boolean
280   ,p_future_change         out nocopy boolean
281   ,p_delete_next_change    out nocopy boolean
282   ) is
283   --
284   l_proc                varchar2(72)    := g_package||'find_dt_del_modes';
285   --
286   l_parent_key_value1     pay_element_links_f.PAYROLL_ID%TYPE;
287   l_parent_key_value2     pay_element_links_f.ELEMENT_TYPE_ID%TYPE;
288   --
289   Cursor C_Sel1 Is
290     select
291      t.payroll_id
292     ,t.element_type_id
293     from   pay_element_links_f t
294     where  t.element_link_id = p_base_key_value
295     and    p_effective_date
296     between t.effective_start_date and t.effective_end_date;
297   --
298 Begin
299   hr_utility.set_location('Entering:'||l_proc, 5);
300   Open C_sel1;
301   Fetch C_Sel1 Into
302      l_parent_key_value1
303     ,l_parent_key_value2;
304   If C_Sel1%NOTFOUND then
305     Close C_Sel1;
306     fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
307      fnd_message.set_token('PROCEDURE',l_proc);
308      fnd_message.set_token('STEP','10');
309      fnd_message.raise_error;
310   End If;
311   Close C_Sel1;
312   --
313   -- Call the corresponding datetrack api
314   --
315   dt_api.find_dt_del_modes
316    (p_effective_date                => p_effective_date
317    ,p_base_table_name               => 'pay_element_links_f'
318    ,p_base_key_column               => 'element_link_id'
319    ,p_base_key_value                => p_base_key_value
320    ,p_parent_table_name1            => 'pay_all_payrolls_f'
321    ,p_parent_key_column1            => 'payroll_id'
322    ,p_parent_key_value1             => l_parent_key_value1
323    ,p_parent_table_name2            => 'pay_element_types_f'
324    ,p_parent_key_column2            => 'element_type_id'
325    ,p_parent_key_value2             => l_parent_key_value2
326    ,p_zap                           => p_zap
327    ,p_delete                        => p_delete
328    ,p_future_change                 => p_future_change
329    ,p_delete_next_change            => p_delete_next_change
330    );
331   --
332   hr_utility.set_location(' Leaving:'||l_proc, 10);
333 End find_dt_del_modes;
334 --
335 -- ----------------------------------------------------------------------------
336 -- |-----------------------< upd_effective_end_date >-------------------------|
337 -- ----------------------------------------------------------------------------
338 Procedure upd_effective_end_date
339   (p_effective_date                   in date
340   ,p_base_key_value                   in number
341   ,p_new_effective_end_date           in date
342   ,p_validation_start_date            in date
343   ,p_validation_end_date              in date
344   ,p_object_version_number  out nocopy number
345   ) is
346 --
347   l_proc                  varchar2(72) := g_package||'upd_effective_end_date';
348   l_object_version_number     pay_element_links_f.OBJECT_VERSION_NUMBER%TYPE;
349 --
350 Begin
351   hr_utility.set_location('Entering:'||l_proc, 5);
352   --
353   -- Because we are updating a row we must get the next object
354   -- version number.
355   --
356   l_object_version_number :=
357     dt_api.get_object_version_number
358       (p_base_table_name    => 'pay_element_links_f'
359       ,p_base_key_column    => 'element_link_id'
360       ,p_base_key_value     => p_base_key_value
361       );
362   --
363   hr_utility.set_location(l_proc, 10);
364   pay_pel_shd.g_api_dml := true;  -- Set the api dml status
365 --
366   -- Update the specified datetrack row setting the effective
367   -- end date to the specified new effective end date.
368   --
369   update  pay_element_links_f t
370   set     t.effective_end_date    = p_new_effective_end_date
371     ,     t.object_version_number = l_object_version_number
372   where   t.element_link_id        = p_base_key_value
373   and     p_effective_date
374   between t.effective_start_date and t.effective_end_date;
375   --
376   pay_pel_shd.g_api_dml := false;   -- Unset the api dml status
377   p_object_version_number := l_object_version_number;
378   hr_utility.set_location(' Leaving:'||l_proc, 15);
379 --
380 Exception
381   When Others Then
382     pay_pel_shd.g_api_dml := false;   -- Unset the api dml status
383     Raise;
384 --
385 End upd_effective_end_date;
386 --
387 -- ----------------------------------------------------------------------------
388 -- |---------------------------------< lck >----------------------------------|
389 -- ----------------------------------------------------------------------------
390 Procedure lck
391   (p_effective_date                   in date
392   ,p_datetrack_mode                   in varchar2
393   ,p_element_link_id                  in number
394   ,p_object_version_number            in number
395   ,p_enforce_foreign_locking          in boolean default true
396   ,p_validation_start_date            out nocopy date
397   ,p_validation_end_date              out nocopy date
398   ) is
399 --
400   l_proc                  varchar2(72) := g_package||'lck';
401   l_validation_start_date date;
402   l_validation_end_date   date;
403   l_argument              varchar2(30);
404   --
405   -- Cursor C_Sel1 selects the current locked row as of session date
406   -- ensuring that the object version numbers match.
407   --
408   Cursor C_Sel1 is
409     select
410      element_link_id
411     ,effective_start_date
412     ,effective_end_date
413     ,payroll_id
414     ,job_id
415     ,position_id
416     ,people_group_id
417     ,cost_allocation_keyflex_id
418     ,organization_id
419     ,element_type_id
420     ,location_id
421     ,grade_id
422     ,balancing_keyflex_id
423     ,business_group_id
424     ,element_set_id
425     ,pay_basis_id
426     ,costable_type
427     ,link_to_all_payrolls_flag
428     ,multiply_value_flag
429     ,standard_link_flag
430     ,transfer_to_gl_flag
431     ,comment_id
432     ,null
433     ,employment_category
434     ,qualifying_age
435     ,qualifying_length_of_service
436     ,qualifying_units
437     ,attribute_category
438     ,attribute1
439     ,attribute2
440     ,attribute3
441     ,attribute4
442     ,attribute5
443     ,attribute6
444     ,attribute7
445     ,attribute8
446     ,attribute9
447     ,attribute10
448     ,attribute11
449     ,attribute12
450     ,attribute13
451     ,attribute14
452     ,attribute15
453     ,attribute16
454     ,attribute17
455     ,attribute18
456     ,attribute19
457     ,attribute20
458     ,object_version_number
459     from    pay_element_links_f
460     where   element_link_id = p_element_link_id
461     and     p_effective_date
462     between effective_start_date and effective_end_date
463     for update nowait;
464   --
465   -- Cursor C_Sel3 select comment text
466   --
467   Cursor C_Sel3 is
468     select hc.comment_text
469     from   hr_comments hc
470     where  hc.comment_id = pay_pel_shd.g_old_rec.comment_id;
471   --
472 Begin
473   hr_utility.set_location('Entering:'||l_proc, 5);
474   --
475   -- Ensure that all the mandatory arguments are not null
476   --
477   hr_api.mandatory_arg_error(p_api_name       => l_proc
478                             ,p_argument       => 'effective_date'
479                             ,p_argument_value => p_effective_date
480                             );
481   --
482   hr_api.mandatory_arg_error(p_api_name       => l_proc
483                             ,p_argument       => 'datetrack_mode'
484                             ,p_argument_value => p_datetrack_mode
485                             );
486   --
487   hr_api.mandatory_arg_error(p_api_name       => l_proc
488                             ,p_argument       => 'element_link_id'
489                             ,p_argument_value => p_element_link_id
490                             );
491   --
492   hr_api.mandatory_arg_error(p_api_name       => l_proc
493                             ,p_argument       => 'object_version_number'
494                             ,p_argument_value => p_object_version_number
495                             );
496   --
497   -- Check to ensure the datetrack mode is not INSERT.
498   --
499   If (p_datetrack_mode <> hr_api.g_insert) then
500     --
501     -- We must select and lock the current row.
502     --
503     Open  C_Sel1;
504     Fetch C_Sel1 Into pay_pel_shd.g_old_rec;
505     If C_Sel1%notfound then
506       Close C_Sel1;
507       --
508       -- The primary key is invalid therefore we must error
509       --
510       fnd_message.set_name('PAY', 'HR_7220_INVALID_PRIMARY_KEY');
511       fnd_message.raise_error;
512     End If;
513     Close C_Sel1;
514     If (p_object_version_number
515           <> pay_pel_shd.g_old_rec.object_version_number) Then
516         fnd_message.set_name('PAY', 'HR_7155_OBJECT_INVALID');
517         fnd_message.raise_error;
518     End If;
519     --
520     -- Providing we are doing an update and a comment_id exists then
521     -- we select the comment text.
522     --
523     If ((pay_pel_shd.g_old_rec.comment_id is not null) and
524         (p_datetrack_mode = hr_api.g_update             or
525          p_datetrack_mode = hr_api.g_correction         or
526          p_datetrack_mode = hr_api.g_update_override    or
527          p_datetrack_mode = hr_api.g_update_change_insert)) then
528        Open C_Sel3;
529        Fetch C_Sel3 Into pay_pel_shd.g_old_rec.comments;
530        If C_Sel3%notfound then
531           --
532           -- The comments for the specified comment_id does not exist.
533           -- We must error due to data integrity problems.
534           --
535           Close C_Sel3;
536           fnd_message.set_name('PAY', 'HR_7202_COMMENT_TEXT_NOT_EXIST');
537           fnd_message.raise_error;
538        End If;
539        Close C_Sel3;
540     End If;
541     --
542     -- Validate the datetrack mode mode getting the validation start
543     -- and end dates for the specified datetrack operation.
544     --
545     dt_api.validate_dt_mode
546       (p_effective_date          => p_effective_date
547       ,p_datetrack_mode          => p_datetrack_mode
548       ,p_base_table_name         => 'pay_element_links_f'
549       ,p_base_key_column         => 'element_link_id'
550       ,p_base_key_value          => p_element_link_id
551       ,p_parent_table_name1      => 'pay_all_payrolls_f'
552       ,p_parent_key_column1      => 'payroll_id'
553       ,p_parent_key_value1       => pay_pel_shd.g_old_rec.payroll_id
554       ,p_parent_table_name2      => 'pay_element_types_f'
555       ,p_parent_key_column2      => 'element_type_id'
556       ,p_parent_key_value2       => pay_pel_shd.g_old_rec.element_type_id
557       ,p_child_table_name1       => 'pay_link_input_values_f'
558       ,p_child_key_column1       => 'link_input_value_id'
559       ,p_child_alt_base_key_column1       => null
560       ,p_child_table_name2       => 'pay_element_entries_f'
561       ,p_child_key_column2       => 'element_entry_id'
562       ,p_child_alt_base_key_column2       => null
563       ,p_enforce_foreign_locking => p_enforce_foreign_locking
564       ,p_validation_start_date   => l_validation_start_date
565       ,p_validation_end_date     => l_validation_end_date
566       );
567   Else
568     --
569     -- We are doing a datetrack 'INSERT' which is illegal within this
570     -- procedure therefore we must error (note: to lck on insert the
571     -- private procedure ins_lck should be called).
572     --
573     fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
574     fnd_message.set_token('PROCEDURE', l_proc);
575     fnd_message.set_token('STEP','20');
576     fnd_message.raise_error;
577   End If;
578   --
579   -- Set the validation start and end date OUT arguments
580   --
581   p_validation_start_date := l_validation_start_date;
582   p_validation_end_date   := l_validation_end_date;
583   --
584   hr_utility.set_location(' Leaving:'||l_proc, 30);
585 --
586 -- We need to trap the ORA LOCK exception
587 --
588 Exception
589   When HR_Api.Object_Locked then
590     --
591     -- The object is locked therefore we need to supply a meaningful
592     -- error message.
593     --
594     fnd_message.set_name('PAY', 'HR_7165_OBJECT_LOCKED');
595     fnd_message.set_token('TABLE_NAME', 'pay_element_links_f');
596     fnd_message.raise_error;
597 End lck;
598 --
599 -- ----------------------------------------------------------------------------
600 -- |-----------------------------< convert_args >-----------------------------|
601 -- ----------------------------------------------------------------------------
602 Function convert_args
603   (p_element_link_id                in number
604   ,p_effective_start_date           in date
605   ,p_effective_end_date             in date
606   ,p_payroll_id                     in number
607   ,p_job_id                         in number
608   ,p_position_id                    in number
609   ,p_people_group_id                in number
610   ,p_cost_allocation_keyflex_id     in number
611   ,p_organization_id                in number
612   ,p_element_type_id                in number
613   ,p_location_id                    in number
614   ,p_grade_id                       in number
615   ,p_balancing_keyflex_id           in number
616   ,p_business_group_id              in number
617   ,p_element_set_id                 in number
618   ,p_pay_basis_id                   in number
619   ,p_costable_type                  in varchar2
620   ,p_link_to_all_payrolls_flag      in varchar2
621   ,p_multiply_value_flag            in varchar2
622   ,p_standard_link_flag             in varchar2
623   ,p_transfer_to_gl_flag            in varchar2
624   ,p_comment_id                     in number
625   ,p_comments                       in varchar2
626   ,p_employment_category            in varchar2
627   ,p_qualifying_age                 in number
628   ,p_qualifying_length_of_service   in number
629   ,p_qualifying_units               in varchar2
630   ,p_attribute_category             in varchar2
631   ,p_attribute1                     in varchar2
632   ,p_attribute2                     in varchar2
633   ,p_attribute3                     in varchar2
634   ,p_attribute4                     in varchar2
635   ,p_attribute5                     in varchar2
636   ,p_attribute6                     in varchar2
637   ,p_attribute7                     in varchar2
638   ,p_attribute8                     in varchar2
639   ,p_attribute9                     in varchar2
640   ,p_attribute10                    in varchar2
641   ,p_attribute11                    in varchar2
642   ,p_attribute12                    in varchar2
643   ,p_attribute13                    in varchar2
644   ,p_attribute14                    in varchar2
645   ,p_attribute15                    in varchar2
646   ,p_attribute16                    in varchar2
647   ,p_attribute17                    in varchar2
648   ,p_attribute18                    in varchar2
649   ,p_attribute19                    in varchar2
650   ,p_attribute20                    in varchar2
651   ,p_object_version_number          in number
652   )
653   Return g_rec_type is
654 --
655   l_rec   g_rec_type;
656 --
657 Begin
658   --
659   -- Convert arguments into local l_rec structure.
660   --
661   l_rec.element_link_id                  := p_element_link_id;
662   l_rec.effective_start_date             := p_effective_start_date;
663   l_rec.effective_end_date               := p_effective_end_date;
664   l_rec.payroll_id                       := p_payroll_id;
665   l_rec.job_id                           := p_job_id;
666   l_rec.position_id                      := p_position_id;
667   l_rec.people_group_id                  := p_people_group_id;
668   l_rec.cost_allocation_keyflex_id       := p_cost_allocation_keyflex_id;
669   l_rec.organization_id                  := p_organization_id;
670   l_rec.element_type_id                  := p_element_type_id;
671   l_rec.location_id                      := p_location_id;
672   l_rec.grade_id                         := p_grade_id;
673   l_rec.balancing_keyflex_id             := p_balancing_keyflex_id;
674   l_rec.business_group_id                := p_business_group_id;
675   l_rec.element_set_id                   := p_element_set_id;
676   l_rec.pay_basis_id                     := p_pay_basis_id;
677   l_rec.costable_type                    := p_costable_type;
678   l_rec.link_to_all_payrolls_flag        := p_link_to_all_payrolls_flag;
679   l_rec.multiply_value_flag              := p_multiply_value_flag;
680   l_rec.standard_link_flag               := p_standard_link_flag;
681   l_rec.transfer_to_gl_flag              := p_transfer_to_gl_flag;
682   l_rec.comment_id                       := p_comment_id;
683   l_rec.comments                         := p_comments;
684   l_rec.employment_category              := p_employment_category;
685   l_rec.qualifying_age                   := p_qualifying_age;
686   l_rec.qualifying_length_of_service     := p_qualifying_length_of_service;
687   l_rec.qualifying_units                 := p_qualifying_units;
688   l_rec.attribute_category               := p_attribute_category;
689   l_rec.attribute1                       := p_attribute1;
690   l_rec.attribute2                       := p_attribute2;
691   l_rec.attribute3                       := p_attribute3;
692   l_rec.attribute4                       := p_attribute4;
693   l_rec.attribute5                       := p_attribute5;
694   l_rec.attribute6                       := p_attribute6;
695   l_rec.attribute7                       := p_attribute7;
696   l_rec.attribute8                       := p_attribute8;
697   l_rec.attribute9                       := p_attribute9;
698   l_rec.attribute10                      := p_attribute10;
699   l_rec.attribute11                      := p_attribute11;
700   l_rec.attribute12                      := p_attribute12;
701   l_rec.attribute13                      := p_attribute13;
702   l_rec.attribute14                      := p_attribute14;
703   l_rec.attribute15                      := p_attribute15;
704   l_rec.attribute16                      := p_attribute16;
705   l_rec.attribute17                      := p_attribute17;
706   l_rec.attribute18                      := p_attribute18;
707   l_rec.attribute19                      := p_attribute19;
708   l_rec.attribute20                      := p_attribute20;
709   l_rec.object_version_number            := p_object_version_number;
710   --
711   -- Return the plsql record structure.
712   --
713   Return(l_rec);
714 --
715 End convert_args;
716 --
717 end pay_pel_shd;