DBA Data[Home] [Help]

PACKAGE BODY: APPS.HR_API_PARAMS

Source


1 PACKAGE BODY hr_api_params AS -- Body
2 /* $Header: hrapiprm.pkb 120.0 2005/05/30 22:41:29 appldev noship $ */
3 --
4 -- Global number, which is a count of the number of table entries
5 -- already gone through.
6 --
7   g_last NUMBER;
8   g_overload_ind NUMBER := -1;
9 --
10 --
11 -- Global Tables - the same structure as those returned by dbms_describe.
12 -- These will be used to store the results from dbms_describe, until all
13 -- entries have been processed.
14 --
15   g_overload       dbms_describe.number_table;
16   g_position       dbms_describe.number_table;
17   g_level          dbms_describe.number_table;
18   g_argument_name  dbms_describe.varchar2_table;
19   g_datatype       dbms_describe.number_table;
20   g_default        dbms_describe.number_table;
21   g_in_out         dbms_describe.number_table;
22   g_length         dbms_describe.number_table;
23   g_precision      dbms_describe.number_table;
24   g_scale          dbms_describe.number_table;
25   g_radix          dbms_describe.number_table;
26   g_spare          dbms_describe.number_table;
27 --
28 --
29 -- ---------------------------------------------------------------------------
30 -- |-------------------------< set_up_param_info >---------------------------|
31 -- ---------------------------------------------------------------------------
32 -- {Start of comments}
33 --
34 -- Description:
35 --   Makes the call to the packaged procedure dbms_describe.describe_procedure,
36 --   which will create tables holding the details of the given procedure from
37 --   the given package.  This procedure takes this information, and stores it
38 --   globally, thus making it retrievable by the retrieve_param_details
39 --   procedure.
40 --
41 --   Should the package not exist, or indeed the procedure not exist within the
42 --   package, then p_exists will be set appropriately.
43 --
44 -- Pre-Requisites:
45 --   Called from the form, prior to attempting to retieve parameter details.
46 --
47 -- In Parameters:
48 --   p_pkg_name   -> The name of the package, in which the procedure exists.
49 --   p_proc_name  -> The name of the procedure whose parameter details we are
50 --                             trying to retrieve.
51 --
52 -- Out Parameters:
53 --   None.
54 -- Post Success:
55 --   The appropriate parameter details will be held in global variables.
56 --
57 -- Post Failure:
58 --   None.
59 --
60 -- Developer Implementation Notes:
61 --   None
62 --
63 -- Access Status:
64 --   Internal Development Use Only.
65 --
66 -- {End Of Comments}
67 -- ---------------------------------------------------------------------------
68   PROCEDURE setup_param_info
69     (p_pkg_name  in     varchar2
70     ,p_proc_name in     varchar2
71     ) IS
72 
73 -- Error exceptions.
74 
75   -- Package does not exist in the database
76   --
77   Package_Not_Exists  exception;
78   Pragma Exception_Init(Package_Not_Exists, -6564);
79   --
80   -- Procedure does not exist in the package
81   --
82   Proc_Not_In_Package  exception;
83   Pragma Exception_Init(Proc_Not_In_Package, -20001);
84 
85   BEGIN
86     -- Deal with case when either (or both) of the input values are null
87     --
88     -- Error message: Package name AND procedure name both required.
89     --
90     IF (p_pkg_name IS NULL) OR (p_proc_name IS NULL) THEN
91       fnd_message.set_name('PER', 'PER_52320_API_DTLS_NOT_SUP');
92       fnd_message.raise_error;
93     END IF;
94 
95     g_last := 1; -- Initialise global parameter counter.
96 
97     BEGIN
98 
99     -- Call the dbms_describe in order to populate the global tables.
100     -- 14-DEC-00: below was changed to use the cover to the dbms_describe
101     -- procedure, provided by hr_general.
102     hr_general.describe_procedure
103       (object_name    => p_pkg_name || '.' || p_proc_name
104       ,reserved1      => null
105       ,reserved2      => null
106       ,overload       => g_overload
107       ,position       => g_position
108       ,level          => g_level
109       ,argument_name  => g_argument_name
110       ,datatype       => g_datatype
111       ,default_value  => g_default
112       ,in_out         => g_in_out
113       ,length         => g_length
114       ,precision      => g_precision
115       ,scale          => g_scale
116       ,radix          => g_radix
117       ,spare          => g_spare
118       );
119     EXCEPTION
120       -- Deal with any errors that may occur.
121       --
122       -- When an incorrect Package Name has been given.
123       WHEN Package_Not_Exists THEN
124         -- Error message: Package PACKAGE does not exist.
125         --
126         fnd_message.set_name('PER', 'PER_52321_API_PKG_NOT_FOUND');
127         fnd_message.raise_error;
128       --
129       -- When an incorrect Procedure Name has been given.
130       WHEN Proc_Not_In_Package THEN
131         -- Error message: Procedure PROCEDURE does not exist within
132         --                the package PACKAGE.
133         --
134         fnd_message.set_name('PER', 'PER_52322_PROC_NOT_FOUND');
135         fnd_message.raise_error;
136     END;
137 
138   END setup_param_info;
139 --
140 -- ---------------------------------------------------------------------------
141 -- |--------------------------< handle_overload >----------------------------|
142 -- ---------------------------------------------------------------------------
143 --
144 -- This function, called once, examines the table of parameters already
145 -- set up, and if the procedure is overloaded, will determine which parameter
146 -- details to return.  This selection would be the procedure that has
147 --    - most mandatory IN's
148 -- or - most OUT parameters
149 --
150 -- ---------------------------------------------------------------------------
151 PROCEDURE handle_overload(p_high_overload OUT NOCOPY number) IS
152 --
153   l_curr_overload number := -1;
154   l_high_overload number := -1;
155   l_high_mands number;
156   l_mand_ins   number;
157   l_high_outs  number;
158   l_outs       number;
159   l_index      number := 1;
160 --
161 BEGIN
162   LOOP
163     IF l_curr_overload <> g_overload(l_index) THEN
164        --
165        -- If we previously had an overload, check to see if this is
166        -- more suitable
167        IF l_curr_overload <> -1 THEN
168           IF l_high_overload = -1 THEN
169              l_high_overload := g_overload(l_index);
170           ELSE
171              IF l_high_mands < l_mand_ins THEN
172                 l_high_overload := g_overload(l_index);
173              ELSIF ((l_high_mands = l_mand_ins) and
174                     (l_high_outs < l_outs)) THEN
175                 l_high_overload := g_overload(l_index);
176              END IF;
177           END IF;
178        ELSE
179           l_mand_ins := 0;
180           l_outs := 0;
181           l_curr_overload := g_overload(l_index);
182        END IF;
183     END IF;
184     --
185     -- Increase the counts
186     IF g_in_out(l_index) = 0 THEN
187        -- parameter is in, so check for default
188        IF (g_default(l_index) = 1) and (g_level(l_index) = 0) THEN
189           l_mand_ins := l_mand_ins + 1;
190        END IF;
191     ELSE
192        -- parameter is an in/out or out
193        IF g_level(l_index) = 0 THEN
194           l_outs := l_outs + 1;
195        END IF;
196     END IF;
197     -- Deal with next parameter
198     l_index := l_index + 1;
199     --
200   END LOOP;
201 EXCEPTION
202   WHEN NO_DATA_FOUND THEN
203     l_index:=l_index-1;
204     IF l_curr_overload <> -1 THEN
205        IF l_high_overload = -1 THEN
206           l_high_overload := g_overload(l_index);
207        ELSE
208           IF l_high_mands < l_mand_ins THEN
209              l_high_overload := g_overload(l_index);
210           ELSIF ((l_high_mands = l_mand_ins) and
211                  (l_high_outs < l_outs)) THEN
212              l_high_overload := g_overload(l_index);
213           END IF;
214        END IF;
215     ELSE
216        l_high_overload := 0;
217     END IF;
218     p_high_overload := l_high_overload;
219 end handle_overload;
220 --
221 -- ---------------------------------------------------------------------------
222 -- |----------------------< retrieve_param_details >-------------------------|
223 -- ---------------------------------------------------------------------------
224 -- {Start of comments}
225 --
226 -- Description:
227 --   This procedure will return the parameter details of the previously
228 --   specified procedure, from the previously specified package, having read
229 --   them from the global tables.
230 --   The last record will have its flag set appropriately.
231 --
232 -- Pre-Requisites:
233 --   Called from the form, only after the setup_param_info has
234 --   deposited info within the global tables.
235 --
236 -- In Parameters:
237 --   None
238 --
239 -- Out Parameters:
240 --   p_name*   -> The name of the corresponding parameter for the specified
241 --                procedure.
242 --   p_in_out* -> A number, depending on whether the parameter is IN, OUT or
243 --                IN OUT.
244 --   p_default* -> A number, depending on the datatype of the parameter.
245 --   p_default* -> A number, depending on whether the parameter has a default
246 --                 or not.
247 --   p_overload -> A number, indication whether or not the procedure is
248 --                 overloaded.
249 --
250 --   p_last_param -> A flag, which is true when the last parameter has been
251 --                   dealt with.
252 --
253 -- Post Success:
254 --   This procedure will have returned to the form, all possible parameter
255 --   details for the packaged procedure, as specified in setup_param_info.
256 --
257 -- Post Failure:
258 --   None.
259 --
260 -- Developer Implementation Notes:
261 --   None
262 --
263 -- Access Status:
264 --   Internal Development Use Only.
265 --
266 -- {End Of Comments}
267 -- ---------------------------------------------------------------------------
268 PROCEDURE retrieve_param_details
269   (p_name1     out nocopy varchar2
270   ,p_name2     out nocopy varchar2
271   ,p_name3     out nocopy varchar2
272   ,p_name4     out nocopy varchar2
273   ,p_name5     out nocopy varchar2
274   ,p_name6     out nocopy varchar2
275   ,p_name7     out nocopy varchar2
276   ,p_name8     out nocopy varchar2
277   ,p_name9     out nocopy varchar2
278   ,p_name10    out nocopy varchar2
279   ,p_in_out1   out nocopy number
280   ,p_in_out2   out nocopy number
281   ,p_in_out3   out nocopy number
282   ,p_in_out4   out nocopy number
283   ,p_in_out5   out nocopy number
284   ,p_in_out6   out nocopy number
285   ,p_in_out7   out nocopy number
286   ,p_in_out8   out nocopy number
287   ,p_in_out9   out nocopy number
288   ,p_in_out10  out nocopy number
289   ,p_datatype1 out nocopy number
290   ,p_datatype2 out nocopy number
291   ,p_datatype3 out nocopy number
292   ,p_datatype4 out nocopy number
293   ,p_datatype5 out nocopy number
294   ,p_datatype6 out nocopy number
295   ,p_datatype7 out nocopy number
296   ,p_datatype8 out nocopy number
297   ,p_datatype9 out nocopy number
298   ,p_datatype10 out nocopy number
299   ,p_default1  out nocopy number
300   ,p_default2  out nocopy number
301   ,p_default3  out nocopy number
302   ,p_default4  out nocopy number
303   ,p_default5  out nocopy number
304   ,p_default6  out nocopy number
305   ,p_default7  out nocopy number
306   ,p_default8  out nocopy number
307   ,p_default9  out nocopy number
308   ,p_default10 out nocopy number
309   ,p_overload1 out nocopy number
310   ,p_overload2 out nocopy number
311   ,p_overload3 out nocopy number
312   ,p_overload4 out nocopy number
313   ,p_overload5 out nocopy number
314   ,p_overload6 out nocopy number
315   ,p_overload7 out nocopy number
316   ,p_overload8 out nocopy number
317   ,p_overload9 out nocopy number
318   ,p_overload10 out nocopy number
319   ,p_last_param  out nocopy boolean
320   ) IS
321   --
322   --  Declare Error Exceptions
323   --
324   -- Package does not exist in the database
325   Package_Not_Exists  exception;
326   Pragma Exception_Init(Package_Not_Exists, -6564);
327   --
328   -- Procedure does not exist in the package
329   Proc_Not_In_Package  exception;
330   Pragma Exception_Init(Proc_Not_In_Package, -20001);
331   --
332   -- Note a count of how far through the tables we currently are.
333   l_count NUMBER;
334   --
335 BEGIN
336   --
337   -- 1 time only, determine which overload to return
338   --
339   IF g_overload_ind = -1 THEN
340      handle_overload(g_overload_ind);
341      l_count := 1;
342      WHILE g_overload(l_count) <> g_overload_ind LOOP
343         l_count := l_count + 1;
344      END LOOP;
345      g_last := l_count;
346   END IF;
347   -- Set the local counter to the number of records dealt with
348   --
349   l_count := g_last;
350   --
351   -- Set flag, denoting the last parameter from the tables has been dealt with.
352   p_last_param := FALSE;
353 
354   BEGIN
355   -- If we happen to come across the end of the tables, at any time when we
356   -- are trying to copy some parameter details, the exception 'NO_DATA_FOUND'
357   -- shall be raised, and appropriately dealt with.
358   --
359   -- Copy first parameter details.
360   IF g_overload(l_count) = g_overload_ind THEN
361     p_name1:=g_argument_name(l_count);
362     p_in_out1:=g_in_out(l_count);
363     p_datatype1 := g_datatype(l_count);
364     p_default1 := g_default(l_count);
365     p_overload1 := g_overload(l_count);
366   ELSE
367     p_last_param := TRUE;
368     g_overload_ind := -1;
369   END IF;
370   --
371   -- Copy second parameters details.
372     l_count := l_count+1;
373   IF g_overload(l_count) = g_overload_ind THEN
374     p_name2:=g_argument_name(l_count);
375     p_in_out2:=g_in_out(l_count);
376     p_datatype2 := g_datatype(l_count);
377     p_default2:=g_default(l_count);
378     p_overload2 := g_overload(l_count);
379   ELSE
380     p_last_param := TRUE;
381     g_overload_ind := -1;
382   END IF;
383   --
384   -- Copy third parameters details.
385     l_count := l_count +1;
386   IF g_overload(l_count) = g_overload_ind THEN
387     p_name3:=g_argument_name(l_count);
388     p_in_out3:=g_in_out(l_count);
389     p_datatype3 := g_datatype(l_count);
390     p_default3:=g_default(l_count);
391     p_overload3 := g_overload(l_count);
392   ELSE
393     p_last_param := TRUE;
394     g_overload_ind := -1;
395   END IF;
396   --
397   -- Copy fourth parameter's details.
398     l_count := l_count +1;
399   IF g_overload(l_count) = g_overload_ind THEN
400     p_name4:=g_argument_name(l_count);
401     p_in_out4:=g_in_out(l_count);
402     p_datatype4 := g_datatype(l_count);
403     p_default4:=g_default(l_count);
404     p_overload4 := g_overload(l_count);
405   ELSE
406     p_last_param := TRUE;
407     g_overload_ind := -1;
408   END IF;
409   --
410   -- Copy fifth parameter's details.
411     l_count := l_count +1;
412   IF g_overload(l_count) = g_overload_ind THEN
413     p_name5:=g_argument_name(l_count);
414     p_in_out5:=g_in_out(l_count);
415     p_datatype5 := g_datatype(l_count);
416     p_default5:=g_default(l_count);
417     p_overload5 := g_overload(l_count);
418   ELSE
419     p_last_param := TRUE;
420     g_overload_ind := -1;
421   END IF;
422   --
423   -- Copy sixth parameter's details.
427     p_in_out6:=g_in_out(l_count);
424     l_count := l_count +1;
425   IF g_overload(l_count) = g_overload_ind THEN
426     p_name6:=g_argument_name(l_count);
428     p_datatype6 := g_datatype(l_count);
429     p_default6:=g_default(l_count);
430     p_overload6 := g_overload(l_count);
431   ELSE
432     p_last_param := TRUE;
433     g_overload_ind := -1;
434   END IF;
435   --
436   -- Copy seventh parameter's details.
437     l_count := l_count +1;
438   IF g_overload(l_count) = g_overload_ind THEN
439     p_name7:=g_argument_name(l_count);
440     p_in_out7:=g_in_out(l_count);
441     p_datatype7 := g_datatype(l_count);
442     p_default7:=g_default(l_count);
443     p_overload7 := g_overload(l_count);
444   ELSE
445     p_last_param := TRUE;
446     g_overload_ind := -1;
447   END IF;
448   --
449   -- Copy eighth parameter's details.
450     l_count := l_count +1;
451   IF g_overload(l_count) = g_overload_ind THEN
452     p_name8:=g_argument_name(l_count);
453     p_in_out8:=g_in_out(l_count);
454     p_datatype8 := g_datatype(l_count);
455     p_default8:=g_default(l_count);
456     p_overload8 := g_overload(l_count);
457   ELSE
458     p_last_param := TRUE;
459     g_overload_ind := -1;
460   END IF;
461   --
462   -- Copy ninth parameter's details.
463     l_count := l_count +1;
464   IF g_overload(l_count) = g_overload_ind THEN
465     p_name9:=g_argument_name(l_count);
466     p_in_out9:=g_in_out(l_count);
467     p_datatype9 := g_datatype(l_count);
468     p_default9:=g_default(l_count);
469     p_overload9 := g_overload(l_count);
470   ELSE
471     p_last_param := TRUE;
472     g_overload_ind := -1;
473   END IF;
474   --
475   -- Copy tenth parameter's details.
476     l_count := l_count +1;
477   IF g_overload(l_count) = g_overload_ind THEN
478     p_name10:=g_argument_name(l_count);
479     p_in_out10:=g_in_out(l_count);
480     p_datatype10 := g_datatype(l_count);
481     p_default10:=g_default(l_count);
482     g_last := g_last + 10;
483     p_overload10 := g_overload(l_count);
484   ELSE
485     p_last_param := TRUE;
486     g_overload_ind := -1;
487   END IF;
488   --
489 
490   --
491   EXCEPTION
492     WHEN NO_DATA_FOUND THEN
493       p_last_param:=TRUE;  -- Last parameter HAS been dealt with.
494       g_overload_ind := -1;
495       g_last := l_count -1;
496   END;
497 END retrieve_param_details;
498 --
499 -- Overload version : returns a number type, not boolean, as last parameter.
500 --
501 PROCEDURE retrieve_param_details
502   (p_name1     out nocopy varchar2
503   ,p_name2     out nocopy varchar2
504   ,p_name3     out nocopy varchar2
505   ,p_name4     out nocopy varchar2
506   ,p_name5     out nocopy varchar2
507   ,p_name6     out nocopy varchar2
508   ,p_name7     out nocopy varchar2
509   ,p_name8     out nocopy varchar2
510   ,p_name9     out nocopy varchar2
511   ,p_name10    out nocopy varchar2
512   ,p_in_out1   out nocopy number
513   ,p_in_out2   out nocopy number
514   ,p_in_out3   out nocopy number
515   ,p_in_out4   out nocopy number
516   ,p_in_out5   out nocopy number
517   ,p_in_out6   out nocopy number
518   ,p_in_out7   out nocopy number
519   ,p_in_out8   out nocopy number
520   ,p_in_out9   out nocopy number
521   ,p_in_out10  out nocopy number
522   ,p_datatype1 out nocopy number
523   ,p_datatype2 out nocopy number
524   ,p_datatype3 out nocopy number
525   ,p_datatype4 out nocopy number
526   ,p_datatype5 out nocopy number
527   ,p_datatype6 out nocopy number
528   ,p_datatype7 out nocopy number
529   ,p_datatype8 out nocopy number
530   ,p_datatype9 out nocopy number
531   ,p_datatype10 out nocopy number
532   ,p_default1  out nocopy number
533   ,p_default2  out nocopy number
534   ,p_default3  out nocopy number
535   ,p_default4  out nocopy number
536   ,p_default5  out nocopy number
537   ,p_default6  out nocopy number
538   ,p_default7  out nocopy number
539   ,p_default8  out nocopy number
540   ,p_default9  out nocopy number
541   ,p_default10 out nocopy number
542   ,p_overload1 out nocopy number
543   ,p_overload2 out nocopy number
544   ,p_overload3 out nocopy number
545   ,p_overload4 out nocopy number
546   ,p_overload5 out nocopy number
547   ,p_overload6 out nocopy number
548   ,p_overload7 out nocopy number
549   ,p_overload8 out nocopy number
550   ,p_overload9 out nocopy number
551   ,p_overload10 out nocopy number
552   ,p_last_param  out nocopy number
553   ) IS
554   --
555   --  Declare Error Exceptions
556   --
557   -- Package does not exist in the database
558   Package_Not_Exists  exception;
559   Pragma Exception_Init(Package_Not_Exists, -6564);
560   --
561   -- Procedure does not exist in the package
562   Proc_Not_In_Package  exception;
563   Pragma Exception_Init(Proc_Not_In_Package, -20001);
564   --
565   -- Note count of how far through the tables we currently are.
566   l_count NUMBER;
567   --
568 BEGIN
569   --
570   -- 1 time only, determine which overload to return
571   --
572   IF g_overload_ind = -1 THEN
573      handle_overload(g_overload_ind);
577      END LOOP;
574      l_count := 1;
575      WHILE g_overload(l_count) <> g_overload_ind LOOP
576         l_count := l_count + 1;
578      g_last := l_count;
579   END IF;
580   -- Set the local counter to the number of records dealt with
581   --
582   l_count := g_last;
583   --
584   -- Flag, denoting the last parameter from the tables has been dealt with.
585   p_last_param := 0;
586   --
587   BEGIN
588     -- If we happen to come across the end of the tables, at any time when we
589     -- are trying to copy some parameter details, the exception 'NO_DATA_FOUND'
590     --  shall be raised, and appropriately dealt with.
591     --
592     -- Copy first parameter details.
593   IF g_overload(l_count) = g_overload_ind THEN
594     p_name1:=g_argument_name(l_count);
595     p_in_out1:=g_in_out(l_count);
596     p_datatype1 := g_datatype(l_count);
597     p_default1 := g_default(l_count);
598     p_overload1 := g_overload(l_count);
599   ELSE
600     p_last_param := 1;
601     g_overload_ind := -1;
602   END IF;
603     --
604     -- Copy second parameters details.
605     l_count := l_count+1;
606   IF g_overload(l_count) = g_overload_ind THEN
607     p_name2:=g_argument_name(l_count);
608     p_in_out2:=g_in_out(l_count);
609     p_datatype2 := g_datatype(l_count);
610     p_default2:=g_default(l_count);
611     p_overload2 := g_overload(l_count);
612   ELSE
613     p_last_param := 1;
614     g_overload_ind := -1;
615   END IF;
616     --
617     -- Copy third parameters details.
618     l_count := l_count +1;
619   IF g_overload(l_count) = g_overload_ind THEN
620     p_name3:=g_argument_name(l_count);
621     p_in_out3:=g_in_out(l_count);
622     p_datatype3 := g_datatype(l_count);
623     p_default3:=g_default(l_count);
624     p_overload3 := g_overload(l_count);
625   ELSE
626     p_last_param := 1;
627     g_overload_ind := -1;
628   END IF;
629     --
630     -- Copy fourth parameter's details.
631     l_count := l_count +1;
632   IF g_overload(l_count) = g_overload_ind THEN
633     p_name4:=g_argument_name(l_count);
634     p_in_out4:=g_in_out(l_count);
635     p_datatype4 := g_datatype(l_count);
636     p_default4:=g_default(l_count);
637     p_overload4 := g_overload(l_count);
638   ELSE
639     p_last_param := 1;
640     g_overload_ind := -1;
641   END IF;
642     --
643     -- Copy fifth parameter's details.
644     l_count := l_count +1;
645   IF g_overload(l_count) = g_overload_ind THEN
646     p_name5:=g_argument_name(l_count);
647     p_in_out5:=g_in_out(l_count);
648     p_datatype5 := g_datatype(l_count);
649     p_default5:=g_default(l_count);
650     p_overload5 := g_overload(l_count);
651   ELSE
652     p_last_param := 1;
653     g_overload_ind := -1;
654   END IF;
655     --
656     -- Copy sixth parameter's details.
657     l_count := l_count +1;
658   IF g_overload(l_count) = g_overload_ind THEN
659     p_name6:=g_argument_name(l_count);
660     p_in_out6:=g_in_out(l_count);
661     p_datatype6 := g_datatype(l_count);
662     p_default6:=g_default(l_count);
663     p_overload6 := g_overload(l_count);
664   ELSE
665     p_last_param := 1;
666     g_overload_ind := -1;
667   END IF;
668     --
669     -- Copy seventh parameter's details.
670     l_count := l_count +1;
671   IF g_overload(l_count) = g_overload_ind THEN
672     p_name7:=g_argument_name(l_count);
673     p_in_out7:=g_in_out(l_count);
674     p_datatype7 := g_datatype(l_count);
675     p_default7:=g_default(l_count);
676     p_overload7 := g_overload(l_count);
677   ELSE
678     p_last_param := 1;
679     g_overload_ind := -1;
680   END IF;
681     --
682     -- Copy eighth parameter's details.
683     l_count := l_count +1;
684   IF g_overload(l_count) = g_overload_ind THEN
685     p_name8:=g_argument_name(l_count);
686     p_in_out8:=g_in_out(l_count);
687     p_datatype8 := g_datatype(l_count);
688     p_default8:=g_default(l_count);
689     p_overload8 := g_overload(l_count);
690   ELSE
691     p_last_param := 1;
692     g_overload_ind := -1;
693   END IF;
694     --
695     -- Copy ninth parameter's details.
696     l_count := l_count +1;
697   IF g_overload(l_count) = g_overload_ind THEN
698     p_name9:=g_argument_name(l_count);
699     p_in_out9:=g_in_out(l_count);
700     p_datatype9 := g_datatype(l_count);
701     p_default9:=g_default(l_count);
702     p_overload9 := g_overload(l_count);
703   ELSE
704     p_last_param := 1;
705     g_overload_ind := -1;
706   END IF;
707     --
708     -- Copy tenth parameter's details.
709     l_count := l_count +1;
710   IF g_overload(l_count) = g_overload_ind THEN
711     p_name10:=g_argument_name(l_count);
712     p_in_out10:=g_in_out(l_count);
713     p_datatype10 := g_datatype(l_count);
714     p_default10:=g_default(l_count);
715     g_last := g_last + 10;
716     p_overload10 := g_overload(l_count);
717   ELSE
718     p_last_param := 1;
719     g_overload_ind := -1;
720   END IF;
721     --
722   EXCEPTION
723     WHEN NO_DATA_FOUND THEN
724       p_last_param:= 1;  -- Last parameter HAS been dealt with.
728 END retrieve_param_details;
725       g_overload_ind := -1;
726       g_last := l_count -1;
727   END;
729 END hr_api_params;