DBA Data[Home] [Help]

PACKAGE BODY: APPS.PAY_PAYWSLEE_PKG

Source


1 package body PAY_PAYWSLEE_PKG as
2 /* $Header: paywslee.pkb 120.1 2006/05/05 01:31:06 pgongada noship $ */
3 --
4 procedure get_input_value_names (
5 --
6 p_element_type_id	in	       number,
7 p_name1			in out	nocopy varchar2,
8 p_name2			in out	nocopy varchar2,
9 p_name3			in out	nocopy varchar2,
10 p_name4			in out	nocopy varchar2,
11 p_name5			in out	nocopy varchar2,
12 p_name6			in out	nocopy varchar2,
13 p_name7			in out	nocopy varchar2,
14 p_name8			in out	nocopy varchar2,
15 p_name9			in out	nocopy varchar2,
16 p_name10		in out	nocopy varchar2,
17 p_name11		in out	nocopy varchar2,
18 p_name12		in out	nocopy varchar2,
19 p_name13		in out	nocopy varchar2,
20 p_name14		in out	nocopy varchar2,
21 p_name15		in out	nocopy varchar2) is
22 --
23 cursor set_of_input_values is
24 	--
25 	select	input_value_tl.name
26 	--
27 	from	pay_input_values_f_tl INPUT_VALUE_TL,
28                 pay_input_values_f INPUT_VALUE
29 	--
30 	where	input_value.element_type_id	= p_element_type_id
31         and     input_value_tl.input_value_id  = input_value.input_value_id
32         and     userenv('LANG') = input_value_tl.language
33 	and	input_value.effective_start_date =
34 		(select min (element.effective_start_date)
35 		from	pay_element_types_f	ELEMENT
36 		where	element.element_type_id = p_element_type_id)
37 		--
38 	order by	input_value.display_sequence,
39 			input_value_tl.name;
40 			--
41 input_value_number	integer;
42 --
43 begin
44 --
45 -- Nullify the parameters before populating them (because we may not replace
46 -- all 15 names)
47 --
48 p_name1		:= null;
49 p_name2		:= null;
50 p_name3		:= null;
51 p_name4		:= null;
52 p_name5		:= null;
53 p_name6		:= null;
54 p_name7		:= null;
55 p_name8		:= null;
56 p_name9		:= null;
57 p_name10	:= null;
58 p_name11	:= null;
59 p_name12	:= null;
60 p_name13	:= null;
61 p_name14	:= null;
62 p_name15	:= null;
63 --
64 -- Fetch all the input values
65 --
66 for fetched_input_value in set_of_input_values LOOP
67   --
68   input_value_number := set_of_input_values%rowcount; -- loop index flag
69   --
70   -- Now we need to put the input value names into the right parameters
71   -- to pass back to the form
72   --
73   if input_value_number = 1 then
74     --
75     p_name1		:= fetched_input_value.name;
76     --
77   elsif input_value_number = 2 then
78     --
79     p_name2		:= fetched_input_value.name;
80     --
81   elsif input_value_number = 3 then
82     --
83     p_name3		:= fetched_input_value.name;
84     --
85   elsif input_value_number = 4 then
86     --
87     p_name4		:= fetched_input_value.name;
88     --
89   elsif input_value_number = 5 then
90     --
91     p_name5		:= fetched_input_value.name;
92     --
93   elsif input_value_number = 6 then
94     --
95     p_name6		:= fetched_input_value.name;
96     --
97   elsif input_value_number = 7 then
98     --
99     p_name7		:= fetched_input_value.name;
100     --
101   elsif input_value_number = 8 then
102     --
103     p_name8		:= fetched_input_value.name;
104     --
105   elsif input_value_number = 9 then
106     --
107     p_name9		:= fetched_input_value.name;
108     --
109   elsif input_value_number = 10 then
110     --
111     p_name10		:= fetched_input_value.name;
112     --
113   elsif input_value_number = 11 then
114     --
115     p_name11		:= fetched_input_value.name;
116     --
117   elsif input_value_number = 12 then
118     --
119     p_name12		:= fetched_input_value.name;
120     --
121   elsif input_value_number = 13 then
122     --
123     p_name13		:= fetched_input_value.name;
124     --
125   elsif input_value_number = 14 then
126     --
127     p_name14		:= fetched_input_value.name;
128     --
129   elsif input_value_number = 15 then
130     --
131     p_name15		:= fetched_input_value.name;
132     --
133   end if;
134   --
135 end loop;
136 --
137 end get_input_value_names;
138 --------------------------------------------------------------------------------
139 procedure get_input_value_names (
140 --
141 p_rows                  in out  nocopy number,
142 p_element_type_id       in             number,
143 p_ivn_tab               in out  nocopy IvnTabType) is
144 --
145 cursor set_of_input_values is
146         --
147         select  input_value_tl.name
148         --
149         from    pay_input_values_f_tl INPUT_VALUE_TL,
150                 pay_input_values_f INPUT_VALUE
151         --
152         where   input_value.element_type_id     = p_element_type_id
153         and     input_value_tl.input_value_id  = input_value.input_value_id
154         and     userenv('LANG') = input_value_tl.language
155         and     input_value.effective_start_date =
156                 (select min (element.effective_start_date)
157                 from    pay_element_types_f     ELEMENT
158                 where   element.element_type_id = p_element_type_id)
159         order by        input_value.display_sequence,
160                         input_value_tl.name;
161                         --
162 --
163 begin
164 --
165 p_rows := 0;
166 --
167 for fetched_input_value in set_of_input_values LOOP
168   --
169   p_rows  := p_rows  + 1;
170   p_ivn_tab(p_rows) := fetched_input_value.name;
171 --
172 end loop;
173 --
174 end get_input_value_names;
175 --------------------------------------------------------------------
176 procedure get_entry_details (
177 --
178 p_element_entry_id	in	       number,
179 p_element_link_id	in	       number,
180 p_assignment_id		in	       number,
181 p_effective_end_date	in	       date,
182 p_full_name		in out	nocopy varchar2,
183 p_assignment_number	in out	nocopy varchar2,
184 p_screen_entry_value1	in out	nocopy varchar2,
185 p_screen_entry_value2	in out	nocopy varchar2,
186 p_screen_entry_value3	in out	nocopy varchar2,
187 p_screen_entry_value4	in out	nocopy varchar2,
188 p_screen_entry_value5	in out	nocopy varchar2,
189 p_screen_entry_value6	in out	nocopy varchar2,
190 p_screen_entry_value7	in out	nocopy varchar2,
191 p_screen_entry_value8	in out	nocopy varchar2,
192 p_screen_entry_value9	in out	nocopy varchar2,
193 p_screen_entry_value10	in out	nocopy varchar2,
194 p_screen_entry_value11	in out	nocopy varchar2,
195 p_screen_entry_value12	in out	nocopy varchar2,
196 p_screen_entry_value13	in out	nocopy varchar2,
197 p_screen_entry_value14	in out	nocopy varchar2,
198 p_screen_entry_value15	in out	nocopy varchar2,
199 p_uom1			in out	nocopy varchar2,
200 p_uom2			in out	nocopy varchar2,
201 p_uom3			in out	nocopy varchar2,
202 p_uom4			in out	nocopy varchar2,
203 p_uom5			in out	nocopy varchar2,
204 p_uom6			in out	nocopy varchar2,
205 p_uom7			in out	nocopy varchar2,
206 p_uom8			in out	nocopy varchar2,
207 p_uom9			in out	nocopy varchar2,
208 p_uom10			in out	nocopy varchar2,
209 p_uom11			in out	nocopy varchar2,
210 p_uom12			in out	nocopy varchar2,
211 p_uom13			in out	nocopy varchar2,
212 p_uom14			in out	nocopy varchar2,
213 p_uom15			in out	nocopy varchar2) is
214 --
215 cursor asgt_details is
216 	--
217 	select	person.full_name,
218 		asgt.assignment_number
219 	from	per_people_f		PERSON,
220 		per_assignments_f2	ASGT
221 	where	person.person_id 	= asgt.person_id
222 	and	asgt.assignment_id	= p_assignment_id
223 	and	p_effective_end_date between asgt.effective_start_date
224 					and asgt.effective_end_date
225 	and	p_effective_end_date between person.effective_start_date
226 					and person.effective_end_date;
227 	--
228 cursor set_of_entry_values is
229 	--
230 	select	entry.screen_entry_value,
231 		type.uom,
232 		type.hot_default_flag,
233 		type.lookup_type,
234 		type.value_set_id,
235 		nvl (link.default_value, type.default_value) HOT_DEFAULT_VALUE
236 	from	pay_element_entry_values_f	ENTRY,
237 		pay_link_input_values_f		LINK,
238 		pay_input_values_f		TYPE
239 	where	entry.element_entry_id = p_element_entry_id
240 	and	link.element_link_id = p_element_link_id
241 	and	link.input_value_id = entry.input_value_id
242 	and	type.input_value_id = entry.input_value_id
243 	and	p_effective_end_date = entry.effective_end_date
244 	and	p_effective_end_date between link.effective_start_date
245 					and link.effective_end_date
246 	and	p_effective_end_date between type.effective_start_date
247 					and type.effective_end_date
248 	order by type.display_sequence, type.name;
249 	--
250 entry_value_number	integer;
251 --
252 begin
253 --
254 -- Retrieve the person's full name
255 --
256 open asgt_details;
257 fetch asgt_details into p_full_name, p_assignment_number;
258 close asgt_details;
259 --
260 -- Retrieve all the existing element entry values for the element entry
261 --
262 for fetched_entry_value in set_of_entry_values LOOP
263   --
264   entry_value_number := set_of_entry_values%rowcount; -- loop index flag
265   --
266   if entry_value_number = 1 then
267     --
268     p_uom1			:= fetched_entry_value.uom;
269     --
270     if fetched_entry_value.hot_default_flag = 'Y'
271     and fetched_entry_value.screen_entry_value is null then
272       --
273       p_screen_entry_value1	:= fetched_entry_value.hot_default_value;
274     else
275       p_screen_entry_value1 	:= fetched_entry_value.screen_entry_value;
276       --
277     end if;
278     --
279     if fetched_entry_value.lookup_type is not null
280     and p_screen_entry_value1 is not null then
281       --
282       p_screen_entry_value1	:= hr_general.decode_lookup
283 					(fetched_entry_value.lookup_type,
284 					p_screen_entry_value1);
285       --
286     end if;
287     --
288     if fetched_entry_value.value_set_id is not null
289     and p_screen_entry_value1 is not null then
290     --
291 	p_screen_entry_value1 := pay_input_values_pkg.decode_vset_value(
292 				fetched_entry_value.value_set_id,
293 				p_screen_entry_value1);
294     --
295     end if;
296     --
297   elsif entry_value_number = 2 then
298     --
299     p_uom2			:= fetched_entry_value.uom;
300     --
301     if fetched_entry_value.hot_default_flag = 'Y'
302     and fetched_entry_value.screen_entry_value is null then
303       --
304       p_screen_entry_value2	:= fetched_entry_value.hot_default_value;
305     else
306       p_screen_entry_value2 	:= fetched_entry_value.screen_entry_value;
307       --
308     end if;
309     --
310     if fetched_entry_value.lookup_type is not null
311     and p_screen_entry_value2 is not null then
312       --
313       p_screen_entry_value2	:= hr_general.decode_lookup
314 					(fetched_entry_value.lookup_type,
315 					p_screen_entry_value2);
316       --
317     end if;
318     --
319     if fetched_entry_value.value_set_id is not null
320     and p_screen_entry_value2 is not null then
321     --
322 	p_screen_entry_value2 := pay_input_values_pkg.decode_vset_value(
323 				fetched_entry_value.value_set_id,
324 				p_screen_entry_value2);
325     --
326     end if;
327     --
328   elsif entry_value_number = 3 then
329     --
330     p_uom3			:= fetched_entry_value.uom;
331     --
332     if fetched_entry_value.hot_default_flag = 'Y'
333     and fetched_entry_value.screen_entry_value is null then
334       --
335       p_screen_entry_value3	:= fetched_entry_value.hot_default_value;
336     else
337       p_screen_entry_value3 	:= fetched_entry_value.screen_entry_value;
338       --
339     end if;
340     --
341     if fetched_entry_value.lookup_type is not null
342     and p_screen_entry_value3 is not null then
343       --
344       p_screen_entry_value3	:= hr_general.decode_lookup
345 					(fetched_entry_value.lookup_type,
346 					p_screen_entry_value3);
347       --
348     end if;
349     --
350     if fetched_entry_value.value_set_id is not null
351     and p_screen_entry_value3 is not null then
352     --
353 	p_screen_entry_value3 := pay_input_values_pkg.decode_vset_value(
354 				fetched_entry_value.value_set_id,
355 				p_screen_entry_value3);
356     --
357     end if;
358     --
359   elsif entry_value_number = 4 then
360     --
361     p_uom4			:= fetched_entry_value.uom;
362     --
363     if fetched_entry_value.hot_default_flag = 'Y'
364     and fetched_entry_value.screen_entry_value is null then
365       --
366       p_screen_entry_value4	:= fetched_entry_value.hot_default_value;
367     else
368       p_screen_entry_value4 	:= fetched_entry_value.screen_entry_value;
369       --
370     end if;
371     --
372     if fetched_entry_value.lookup_type is not null
373     and p_screen_entry_value4 is not null then
374       --
375       p_screen_entry_value4	:= hr_general.decode_lookup
376 					(fetched_entry_value.lookup_type,
377 					p_screen_entry_value4);
378       --
379     end if;
380     --
381     if fetched_entry_value.value_set_id is not null
382     and p_screen_entry_value4 is not null then
383     --
384 	p_screen_entry_value4 := pay_input_values_pkg.decode_vset_value(
385 				fetched_entry_value.value_set_id,
386 				p_screen_entry_value4);
387     --
388     end if;
389     --
390   elsif entry_value_number = 5 then
391     --
392     p_uom5			:= fetched_entry_value.uom;
393     --
394     if fetched_entry_value.hot_default_flag = 'Y'
395     and fetched_entry_value.screen_entry_value is null then
396       --
397       p_screen_entry_value5	:= fetched_entry_value.hot_default_value;
398     else
399       p_screen_entry_value5 	:= fetched_entry_value.screen_entry_value;
400       --
401     end if;
402     --
403     if fetched_entry_value.lookup_type is not null
404     and p_screen_entry_value5 is not null then
405       --
406       p_screen_entry_value5	:= hr_general.decode_lookup
407 					(fetched_entry_value.lookup_type,
408 					p_screen_entry_value5);
409       --
410     end if;
411     --
412     if fetched_entry_value.value_set_id is not null
413     and p_screen_entry_value5 is not null then
414     --
415 	p_screen_entry_value5 := pay_input_values_pkg.decode_vset_value(
416 				fetched_entry_value.value_set_id,
417 				p_screen_entry_value5);
418     --
419     end if;
420     --
421   elsif entry_value_number = 6 then
422     --
423     p_uom6			:= fetched_entry_value.uom;
424     --
425     if fetched_entry_value.hot_default_flag = 'Y'
426     and fetched_entry_value.screen_entry_value is null then
427       --
428       p_screen_entry_value6	:= fetched_entry_value.hot_default_value;
429     else
430       p_screen_entry_value6 	:= fetched_entry_value.screen_entry_value;
431       --
432     end if;
433     --
434     if fetched_entry_value.lookup_type is not null
435     and p_screen_entry_value6 is not null then
436       --
437       p_screen_entry_value6	:= hr_general.decode_lookup
438 					(fetched_entry_value.lookup_type,
439 					p_screen_entry_value6);
440       --
441     end if;
442     --
443     if fetched_entry_value.value_set_id is not null
444     and p_screen_entry_value6 is not null then
445     --
446 	p_screen_entry_value6 := pay_input_values_pkg.decode_vset_value(
447 				fetched_entry_value.value_set_id,
448 				p_screen_entry_value6);
449     --
450     end if;
451     --
452   elsif entry_value_number = 7 then
453     --
454     p_uom7			:= fetched_entry_value.uom;
455     --
456     if fetched_entry_value.hot_default_flag = 'Y'
457     and fetched_entry_value.screen_entry_value is null then
458       --
459       p_screen_entry_value7	:= fetched_entry_value.hot_default_value;
460     else
461       p_screen_entry_value7 	:= fetched_entry_value.screen_entry_value;
462       --
463     end if;
464     --
465     if fetched_entry_value.lookup_type is not null
466     and p_screen_entry_value7 is not null then
467       --
468       p_screen_entry_value7	:= hr_general.decode_lookup
469 					(fetched_entry_value.lookup_type,
470 					p_screen_entry_value7);
471       --
472     end if;
473     --
474     if fetched_entry_value.value_set_id is not null
475     and p_screen_entry_value7 is not null then
476     --
477 	p_screen_entry_value7 := pay_input_values_pkg.decode_vset_value(
478 				fetched_entry_value.value_set_id,
479 				p_screen_entry_value7);
480     --
481     end if;
482     --
483   elsif entry_value_number = 8 then
484     --
485     p_uom8			:= fetched_entry_value.uom;
486     --
487     if fetched_entry_value.hot_default_flag = 'Y'
488     and fetched_entry_value.screen_entry_value is null then
489       --
490       p_screen_entry_value8	:= fetched_entry_value.hot_default_value;
491     else
492       p_screen_entry_value8 	:= fetched_entry_value.screen_entry_value;
493       --
494     end if;
495     --
496     if fetched_entry_value.lookup_type is not null
497     and p_screen_entry_value8 is not null then
498       --
499       p_screen_entry_value8	:= hr_general.decode_lookup
500 					(fetched_entry_value.lookup_type,
501 					p_screen_entry_value8);
502       --
503     end if;
504     --
505     if fetched_entry_value.value_set_id is not null
506     and p_screen_entry_value8 is not null then
507     --
508 	p_screen_entry_value8 := pay_input_values_pkg.decode_vset_value(
509 				fetched_entry_value.value_set_id,
510 				p_screen_entry_value8);
511     --
512     end if;
513     --
514   elsif entry_value_number = 9 then
515     --
516     p_uom9			:= fetched_entry_value.uom;
517     --
518     if fetched_entry_value.hot_default_flag = 'Y'
519     and fetched_entry_value.screen_entry_value is null then
520       --
521       p_screen_entry_value9	:= fetched_entry_value.hot_default_value;
522     else
523       p_screen_entry_value9 	:= fetched_entry_value.screen_entry_value;
524       --
525     end if;
526     --
527     if fetched_entry_value.lookup_type is not null
528     and p_screen_entry_value9 is not null then
529       --
530       p_screen_entry_value9	:= hr_general.decode_lookup
531 					(fetched_entry_value.lookup_type,
532 					p_screen_entry_value9);
533       --
534     end if;
535     --
536     if fetched_entry_value.value_set_id is not null
537     and p_screen_entry_value9 is not null then
538     --
539 	p_screen_entry_value9 := pay_input_values_pkg.decode_vset_value(
540 				fetched_entry_value.value_set_id,
541 				p_screen_entry_value9);
542     --
543     end if;
544     --
545   elsif entry_value_number = 10 then
546     --
547     p_uom10			:= fetched_entry_value.uom;
548     --
549     if fetched_entry_value.hot_default_flag = 'Y'
550     and fetched_entry_value.screen_entry_value is null then
551       --
552       p_screen_entry_value10	:= fetched_entry_value.hot_default_value;
553     else
554       p_screen_entry_value10 	:= fetched_entry_value.screen_entry_value;
555       --
556     end if;
557     --
558     if fetched_entry_value.lookup_type is not null
559     and p_screen_entry_value10 is not null then
560       --
561       p_screen_entry_value10	:= hr_general.decode_lookup
562 					(fetched_entry_value.lookup_type,
563 					p_screen_entry_value10);
564       --
565     end if;
566     --
567     if fetched_entry_value.value_set_id is not null
568     and p_screen_entry_value10 is not null then
569     --
570 	p_screen_entry_value10 := pay_input_values_pkg.decode_vset_value(
571 				fetched_entry_value.value_set_id,
572 				p_screen_entry_value10);
573     --
574     end if;
575     --
576   elsif entry_value_number = 11 then
577     --
578     p_uom11			:= fetched_entry_value.uom;
579     --
580     if fetched_entry_value.hot_default_flag = 'Y'
581     and fetched_entry_value.screen_entry_value is null then
582       --
583       p_screen_entry_value11	:= fetched_entry_value.hot_default_value;
584     else
585       p_screen_entry_value11 	:= fetched_entry_value.screen_entry_value;
586       --
587     end if;
588     --
589     if fetched_entry_value.lookup_type is not null
590     and p_screen_entry_value11 is not null then
591       --
592       p_screen_entry_value11	:= hr_general.decode_lookup
593 					(fetched_entry_value.lookup_type,
594 					p_screen_entry_value11);
595       --
596     end if;
597     --
598     if fetched_entry_value.value_set_id is not null
599     and p_screen_entry_value11 is not null then
600     --
601 	p_screen_entry_value11 := pay_input_values_pkg.decode_vset_value(
602 				fetched_entry_value.value_set_id,
603 				p_screen_entry_value11);
604     --
605     end if;
606     --
607   elsif entry_value_number = 12 then
608     --
609     p_uom12			:= fetched_entry_value.uom;
610     --
611     if fetched_entry_value.hot_default_flag = 'Y'
612     and fetched_entry_value.screen_entry_value is null then
613       --
614       p_screen_entry_value12	:= fetched_entry_value.hot_default_value;
615     else
616       p_screen_entry_value12 	:= fetched_entry_value.screen_entry_value;
617       --
618     end if;
619     --
620     if fetched_entry_value.lookup_type is not null
621     and p_screen_entry_value12 is not null then
622       --
623       p_screen_entry_value12	:= hr_general.decode_lookup
624 					(fetched_entry_value.lookup_type,
625 					p_screen_entry_value12);
626       --
627     end if;
628     --
629     if fetched_entry_value.value_set_id is not null
630     and p_screen_entry_value12 is not null then
631     --
632 	p_screen_entry_value12 := pay_input_values_pkg.decode_vset_value(
633 				fetched_entry_value.value_set_id,
634 				p_screen_entry_value12);
635     --
636     end if;
637     --
638   elsif entry_value_number = 13 then
639     --
640     p_uom13			:= fetched_entry_value.uom;
641     --
642     if fetched_entry_value.hot_default_flag = 'Y'
643     and fetched_entry_value.screen_entry_value is null then
644       --
645       p_screen_entry_value13	:= fetched_entry_value.hot_default_value;
646     else
647       p_screen_entry_value13 	:= fetched_entry_value.screen_entry_value;
648       --
649     end if;
650     --
651     if fetched_entry_value.lookup_type is not null
652     and p_screen_entry_value13 is not null then
653       --
654       p_screen_entry_value13	:= hr_general.decode_lookup
655 					(fetched_entry_value.lookup_type,
656 					p_screen_entry_value13);
657       --
658     end if;
659     --
660     if fetched_entry_value.value_set_id is not null
661     and p_screen_entry_value13 is not null then
662     --
663 	p_screen_entry_value13 := pay_input_values_pkg.decode_vset_value(
664 				fetched_entry_value.value_set_id,
665 				p_screen_entry_value13);
666     --
667     end if;
668     --
669   elsif entry_value_number = 14 then
670     --
671     p_uom14			:= fetched_entry_value.uom;
672     --
673     if fetched_entry_value.hot_default_flag = 'Y'
674     and fetched_entry_value.screen_entry_value is null then
675       --
676       p_screen_entry_value14	:= fetched_entry_value.hot_default_value;
677     else
678       p_screen_entry_value14 	:= fetched_entry_value.screen_entry_value;
679       --
680     end if;
681     --
682     if fetched_entry_value.lookup_type is not null
683     and p_screen_entry_value14 is not null then
684       --
685       p_screen_entry_value14	:= hr_general.decode_lookup
686 					(fetched_entry_value.lookup_type,
687 					p_screen_entry_value14);
688       --
689     end if;
690     --
691     if fetched_entry_value.value_set_id is not null
692     and p_screen_entry_value14 is not null then
693     --
694 	p_screen_entry_value14 := pay_input_values_pkg.decode_vset_value(
695 				fetched_entry_value.value_set_id,
696 				p_screen_entry_value14);
697     --
698     end if;
699     --
700   elsif entry_value_number = 15 then
701     --
702     p_uom15			:= fetched_entry_value.uom;
703     --
704     if fetched_entry_value.hot_default_flag = 'Y'
705     and fetched_entry_value.screen_entry_value is null then
706       --
707       p_screen_entry_value15	:= fetched_entry_value.hot_default_value;
708     else
709       p_screen_entry_value15 	:= fetched_entry_value.screen_entry_value;
710       --
711     end if;
712     --
713     if fetched_entry_value.lookup_type is not null
714     and p_screen_entry_value15 is not null then
715       --
716       p_screen_entry_value15	:= hr_general.decode_lookup
717 					(fetched_entry_value.lookup_type,
718 					p_screen_entry_value15);
719       --
720     end if;
721     --
722     if fetched_entry_value.value_set_id is not null
723     and p_screen_entry_value15 is not null then
724     --
725 	p_screen_entry_value15 := pay_input_values_pkg.decode_vset_value(
726 				fetched_entry_value.value_set_id,
727 				p_screen_entry_value15);
728     --
729     end if;
730     --
731   end if;
732   --
733 end loop;
734 --
735 end get_entry_details;
736 --------------------------------------------------------------------------------
737 procedure get_entry_details (
738 --
739 p_rows                  in out  nocopy number,
740 p_element_entry_id      in             number,
741 p_element_link_id       in             number,
742 p_assignment_id         in             number,
743 p_effective_end_date    in             date,
744 p_full_name             in out  nocopy varchar2,
745 p_assignment_number     in out  nocopy varchar2,
746 p_entry_value_tab       in out  nocopy SevTabType,
747 p_uom_tab               in out  nocopy UomTabType
748 ) is
749 --
750 cursor asgt_details is
751         --
752         select  person.full_name,
753                 asgt.assignment_number
754         from    per_people_f            PERSON,
755                 per_assignments_f2      ASGT
756         where   person.person_id        = asgt.person_id
757         and     asgt.assignment_id      = p_assignment_id
758         and     p_effective_end_date between asgt.effective_start_date
759                                         and asgt.effective_end_date
760         and     p_effective_end_date between person.effective_start_date
761                                         and person.effective_end_date;
762         --
763 cursor set_of_entry_values is
764         --
765         select  entry.screen_entry_value,
766                 type.uom,
767                 type.hot_default_flag,
768                 type.lookup_type,
769 		type.value_set_id,
770                 nvl (link.default_value, type.default_value) HOT_DEFAULT_VALUE
771         from    pay_element_entry_values_f      ENTRY,
772                 pay_link_input_values_f         LINK,
773                 pay_input_values_f              TYPE
774         where   entry.element_entry_id = p_element_entry_id
775         and     link.element_link_id = p_element_link_id
776         and     link.input_value_id = entry.input_value_id
777         and     type.input_value_id = entry.input_value_id
778         and     p_effective_end_date = entry.effective_end_date
779         and     p_effective_end_date between link.effective_start_date
780                                         and link.effective_end_date
781         and     p_effective_end_date between type.effective_start_date
782                                         and type.effective_end_date
783         order by type.display_sequence, type.name;
784         --
785 entry_value_number      integer;
786 --
787 begin
788 --
789 -- Retrieve the person's full name
790 --
791 open asgt_details;
792 fetch asgt_details into p_full_name, p_assignment_number;
793 close asgt_details;
794 --
795 -- Retrieve all the existing element entry values for the element entry
796 --
797 p_rows := 0;
798 for fetched_entry_value in set_of_entry_values LOOP
799   --
800   p_rows := p_rows + 1;
801   p_uom_tab(p_rows)         := fetched_entry_value.uom;
802   --
803   if fetched_entry_value.hot_default_flag = 'Y'
804   and fetched_entry_value.screen_entry_value is null then
805     --
806     p_entry_value_tab(p_rows) := fetched_entry_value.hot_default_value;
807   else
808     --
809     p_entry_value_tab(p_rows) := fetched_entry_value.screen_entry_value;
810   end if;
811   --
812   if fetched_entry_value.lookup_type is not null
813   and p_entry_value_tab(p_rows) is not null then
814     --
815     p_entry_value_tab(p_rows) := hr_general.decode_lookup
816                                         (fetched_entry_value.lookup_type,
817                                          p_entry_value_tab(p_rows));
818     --
819   end if;
820   --
821   -- Bug # 5199669. Added to support the value sets.
822   if fetched_entry_value.value_set_id is not null
823   and p_entry_value_tab(p_rows) is not null then
824   --
825     p_entry_value_tab(p_rows) := pay_input_values_pkg.decode_vset_value(
826 				fetched_entry_value.value_set_id,
827 				p_entry_value_tab(p_rows));
828   --
829   end if;
830   --
831 end loop;
832 --
833 end get_entry_details;
834 
835 --
836 end PAY_PAYWSLEE_PKG;