DBA Data[Home] [Help]

PACKAGE BODY: APPS.IBY_FACTOR_PKG_WRAP

Source


1 PACKAGE BODY iby_factor_pkg_wrap AS
2 /*$Header: ibywfacb.pls 115.9 2002/11/18 23:15:01 jleybovi ship $*/
3 
4 /*
5 ** Wrapper package generated by Rosette for iby_fact_pkg.
6 */
7 
8   /*
9   ** Name : save_paymentAmount
10   ** Purpose : Wrapper function generated by Rosette to call the actual ]
11   **           function in iby_fact_pkg. This wrapper constructs actual
12   **           structure from the flatten structure and flattens the
13   **           response from the original procedure.
14   */
15   procedure save_paymentamount(i_payeeid varchar2,
16     i_name  varchar2,
17     i_description  varchar2,
18     i_count  integer,
19     i_amountranges_lowamtlmt JTF_NUMBER_TABLE,
20     i_amountranges_upramtlmt JTF_NUMBER_TABLE,
21     i_amountranges_seq JTF_NUMBER_TABLE,
22     i_amountranges_score JTF_VARCHAR2_TABLE_100)
23 
24   is
25     ddi_amountranges iby_factor_pkg.amountrange_table;
26     ddindx binary_integer; indx binary_integer;
27   begin
28 
29     -- copy data to the local IN or IN-OUT args, if any
30 
31     --dbms_output.put_line('Entered the procedure PAyment amount');
32 
33 
34     if i_amountranges_lowamtlmt is not null and
35         i_amountranges_lowamtlmt.count > 0 then
36         if i_amountranges_lowamtlmt.count > 0 then
37             indx := i_amountranges_lowamtlmt.first;
38             ddindx := 1;
39             while true loop
40                 ddi_amountranges(ddindx).lowamtlmt := i_amountranges_lowamtlmt(indx);
41                 ddi_amountranges(ddindx).upramtlmt := i_amountranges_upramtlmt(indx);
42                 ddi_amountranges(ddindx).seq := i_amountranges_seq(indx);
43                 ddi_amountranges(ddindx).score := i_amountranges_score(indx);
44                 ddindx := ddindx+1;
45                 if i_amountranges_lowamtlmt.last =indx then
46                     exit;
47                 end if;
48                 indx := i_amountranges_lowamtlmt.next(indx);
49              end loop;
50          end if;
51      end if;
52 
53     --dbms_output.put_line('index is '|| indx);
54     -- here's the delegated call to the old PL/SQL routine
55     iby_factor_pkg.save_paymentamount(i_payeeid, i_name,
56       i_description,
57       i_count,
58       ddi_amountranges);
59 
60     -- copy data back from the local OUT or IN-OUT args, if any
61 
62 
63   end save_paymentamount;
64 
65   /*
66   ** Name : load_paymentAmount
67   ** Purpose : Wrapper function generated by Rosette to call the actual ]
68   **           function in iby_fact_pkg. This wrapper constructs actual
69   **           structure from the flatten structure and flattens the
70   **           response from the original procedure.
71   */
72   procedure load_paymentamount(i_payeeid varchar2,
73     o_name out nocopy varchar2,
74     o_description out nocopy varchar2,
75     o_amountranges_lowamtlmt out nocopy JTF_NUMBER_TABLE,
76     o_amountranges_upramtlmt out nocopy JTF_NUMBER_TABLE,
77     o_amountranges_seq out nocopy JTF_NUMBER_TABLE,
78     o_amountranges_score out nocopy JTF_VARCHAR2_TABLE_100)
79 
80   is
81     ddo_amountranges iby_factor_pkg.amountrange_table;
82     ddindx binary_integer; indx binary_integer;
83   begin
84 
85     -- copy data to the local IN or IN-OUT args, if any
86 
87     -- here's the delegated call to the old PL/SQL routine
88     iby_factor_pkg.load_paymentamount(i_payeeid, o_name,
89       o_description, ddo_amountranges);
90 
91     -- copy data back from the local OUT or IN-OUT args, if any
92 
93     if ddo_amountranges is null or ddo_amountranges.count = 0 then
94       o_amountranges_lowamtlmt := JTF_NUMBER_TABLE();
95       o_amountranges_upramtlmt := JTF_NUMBER_TABLE();
96       o_amountranges_seq := JTF_NUMBER_TABLE();
97       o_amountranges_score := JTF_VARCHAR2_TABLE_100();
98     else
99         o_amountranges_lowamtlmt := JTF_NUMBER_TABLE();
100         o_amountranges_upramtlmt := JTF_NUMBER_TABLE();
101         o_amountranges_seq := JTF_NUMBER_TABLE();
102         o_amountranges_score := JTF_VARCHAR2_TABLE_100();
103         if ddo_amountranges.count > 0 then
104           o_amountranges_lowamtlmt.extend(ddo_amountranges.count);
105           o_amountranges_upramtlmt.extend(ddo_amountranges.count);
106           o_amountranges_seq.extend(ddo_amountranges.count);
107           o_amountranges_score.extend(ddo_amountranges.count);
108           ddindx := ddo_amountranges.first;
109           indx := 1;
110           while true loop
111             o_amountranges_lowamtlmt(indx) := ddo_amountranges(ddindx).lowamtlmt;
112             o_amountranges_upramtlmt(indx) := ddo_amountranges(ddindx).upramtlmt;
113             o_amountranges_seq(indx) := ddo_amountranges(ddindx).seq;
114             o_amountranges_score(indx) := ddo_amountranges(ddindx).score;
115             indx := indx+1;
116             if ddo_amountranges.last =ddindx
117               then exit;
118             end if;
119             ddindx := ddo_amountranges.next(ddindx);
120             --dbms_output.put_line('index is ' || indx );
121             --dbms_output.put_line('ddindex is ' || ddindx );
122           end loop;
123         end if;
124      end if;
125   end load_paymentamount;
126 
127   /*
128   ** Name : save_timeofpurchase
129   ** Purpose : Wrapper function generated by Rosette to call the actual ]
130   **           function in iby_fact_pkg. This wrapper constructs actual
131   **           structure from the flatten structure and flattens the
132   **           response from the original procedure.
133   */
134   procedure save_timeofpurchase(i_payeeid varchar2,
135     i_name  varchar2,
136     i_description  varchar2,
137     i_count  integer,
138     i_timeranges_lowtimelmt JTF_NUMBER_TABLE,
139     i_timeranges_uprtimelmt JTF_NUMBER_TABLE,
140     i_timeranges_seq JTF_NUMBER_TABLE,
141     i_timeranges_score JTF_VARCHAR2_TABLE_100)
142 
143   is
144     ddi_timeranges iby_factor_pkg.timerange_table;
145     ddindx binary_integer; indx binary_integer;
146   begin
147 
148     -- copy data to the local IN or IN-OUT args, if any
149 
150     if i_timeranges_lowtimelmt is not null and
151        i_timeranges_lowtimelmt.count > 0 then
152         if i_timeranges_lowtimelmt.count > 0 then
153           indx := i_timeranges_lowtimelmt.first;
154           ddindx := 1;
155           while true loop
156             ddi_timeranges(ddindx).lowtimelmt := i_timeranges_lowtimelmt(indx);
157             ddi_timeranges(ddindx).uprtimelmt := i_timeranges_uprtimelmt(indx);
158             ddi_timeranges(ddindx).seq := i_timeranges_seq(indx);
159             ddi_timeranges(ddindx).score := i_timeranges_score(indx);
160             ddindx := ddindx+1;
161             if i_timeranges_lowtimelmt.last =indx
162               then exit;
163             end if;
164             indx := i_timeranges_lowtimelmt.next(indx);
165           end loop;
166         end if;
167      end if;
168 
169     -- here's the delegated call to the old PL/SQL routine
170     iby_factor_pkg.save_timeofpurchase(i_payeeid, i_name,
171       i_description,
172       i_count,
173       ddi_timeranges);
174 
175     -- copy data back from the local OUT or IN-OUT args, if any
176 
177   end save_timeofpurchase;
178 
179   /*
180   ** Name : load_timeofpurchase
181   ** Purpose : Wrapper function generated by Rosette to call the actual ]
182   **           function in iby_fact_pkg. This wrapper constructs actual
183   **           structure from the flatten structure and flattens the
184   **           response from the original procedure.
185   */
186   procedure load_timeofpurchase(i_payeeid varchar2,
187     o_name out nocopy varchar2,
188     o_description out nocopy varchar2,
189     o_timeranges_lowtimelmt out nocopy JTF_NUMBER_TABLE,
190     o_timeranges_uprtimelmt out nocopy JTF_NUMBER_TABLE,
191     o_timeranges_seq out nocopy JTF_NUMBER_TABLE,
192     o_timeranges_score out nocopy JTF_VARCHAR2_TABLE_100)
193 
194   is
195     ddo_timeranges iby_factor_pkg.timerange_table;
196     ddindx binary_integer; indx binary_integer;
197   begin
198 
199     -- copy data to the local IN or IN-OUT args, if any
200 
201     -- here's the delegated call to the old PL/SQL routine
202     iby_factor_pkg.load_timeofpurchase(i_payeeid, o_name,
203       o_description,
204       ddo_timeranges);
205 
206     -- copy data back from the local OUT or IN-OUT args, if any
207 
208 
209     if ddo_timeranges is null or ddo_timeranges.count = 0 then
210       o_timeranges_lowtimelmt := JTF_NUMBER_TABLE();
211       o_timeranges_uprtimelmt := JTF_NUMBER_TABLE();
212       o_timeranges_seq := JTF_NUMBER_TABLE();
213       o_timeranges_score := JTF_VARCHAR2_TABLE_100();
214     else
215         o_timeranges_lowtimelmt := JTF_NUMBER_TABLE();
216         o_timeranges_uprtimelmt := JTF_NUMBER_TABLE();
217         o_timeranges_seq := JTF_NUMBER_TABLE();
218         o_timeranges_score := JTF_VARCHAR2_TABLE_100();
219         if ddo_timeranges.count > 0 then
220           o_timeranges_lowtimelmt.extend(ddo_timeranges.count);
221           o_timeranges_uprtimelmt.extend(ddo_timeranges.count);
222           o_timeranges_seq.extend(ddo_timeranges.count);
223           o_timeranges_score.extend(ddo_timeranges.count);
224           ddindx := ddo_timeranges.first;
225           indx := 1;
226           while true loop
227             o_timeranges_lowtimelmt(indx) := ddo_timeranges(ddindx).lowtimelmt;
228             o_timeranges_uprtimelmt(indx) := ddo_timeranges(ddindx).uprtimelmt;
229             o_timeranges_seq(indx) := ddo_timeranges(ddindx).seq;
230             o_timeranges_score(indx) := ddo_timeranges(ddindx).score;
231             indx := indx+1;
232             if ddo_timeranges.last =ddindx
233               then exit;
234             end if;
235             ddindx := ddo_timeranges.next(ddindx);
236           end loop;
237         end if;
238      end if;
239   end load_timeofpurchase;
240 
241   /*
242   ** Name : save_paymenthistory
243   ** Purpose : Wrapper function generated by Rosette to call the actual ]
244   **           function in iby_fact_pkg. This wrapper constructs actual
245   **           structure from the flatten structure and flattens the
246   **           response from the original procedure.
247   */
248   procedure save_paymenthistory(i_payeeid varchar2,
249     i_name  varchar2,
250     i_description  varchar2,
251     i_duration  number,
252     i_durationtype  varchar2,
253     i_count  integer,
254     i_freqranges_lowfreqlmt JTF_NUMBER_TABLE,
255     i_freqranges_uprfreqlmt JTF_NUMBER_TABLE,
256     i_freqranges_seq JTF_NUMBER_TABLE,
257     i_freqranges_score JTF_VARCHAR2_TABLE_100)
258 
259   is
260     ddi_freqranges iby_factor_pkg.freqrange_table;
261     ddindx binary_integer; indx binary_integer;
262   begin
263 
264     -- copy data to the local IN or IN-OUT args, if any
265 
266     if i_freqranges_lowfreqlmt is not null and
267        i_freqranges_lowfreqlmt.count > 0 then
268         if i_freqranges_lowfreqlmt.count > 0 then
269           indx := i_freqranges_lowfreqlmt.first;
270           ddindx := 1;
271           while true loop
272             ddi_freqranges(ddindx).lowfreqlmt := i_freqranges_lowfreqlmt(indx);
273             ddi_freqranges(ddindx).uprfreqlmt := i_freqranges_uprfreqlmt(indx);
274             ddi_freqranges(ddindx).seq := i_freqranges_seq(indx);
275             ddi_freqranges(ddindx).score := i_freqranges_score(indx);
276             ddindx := ddindx+1;
277             if i_freqranges_lowfreqlmt.last =indx
278               then exit;
279             end if;
280             indx := i_freqranges_lowfreqlmt.next(indx);
281           end loop;
282         end if;
283      end if;
284 
285     -- here's the delegated call to the old PL/SQL routine
286     iby_factor_pkg.save_paymenthistory(i_payeeid, i_name,
287       i_description,
288       i_duration,
289       i_durationtype,
290       i_count,
291       ddi_freqranges);
292 
293     -- copy data back from the local OUT or IN-OUT args, if any
294 
295   end save_paymenthistory;
296 
297   /*
298   ** Name : load_paymenthistory
299   ** Purpose : Wrapper function generated by Rosette to call the actual ]
300   **           function in iby_fact_pkg. This wrapper constructs actual
301   **           structure from the flatten structure and flattens the
302   **           response from the original procedure.
303   */
304   procedure load_paymenthistory(i_payeeid varchar2,
305     o_name out nocopy varchar2,
306     o_description out nocopy varchar2,
307     o_duration out nocopy number,
308     o_durationtype out nocopy varchar2,
309     o_freqranges_lowfreqlmt out nocopy JTF_NUMBER_TABLE,
310     o_freqranges_uprfreqlmt out nocopy JTF_NUMBER_TABLE,
311     o_freqranges_seq out nocopy JTF_NUMBER_TABLE,
312     o_freqranges_score out nocopy JTF_VARCHAR2_TABLE_100)
313 
314   is
315     ddo_freqranges iby_factor_pkg.freqrange_table;
316     ddindx binary_integer; indx binary_integer;
317   begin
318 
319     -- copy data to the local IN or IN-OUT args, if any
320 
321 
322     -- here's the delegated call to the old PL/SQL routine
323     iby_factor_pkg.load_paymenthistory(i_payeeid, o_name,
324       o_description,
325       o_duration,
326       o_durationtype,
327       ddo_freqranges);
328 
329     -- copy data back from the local OUT or IN-OUT args, if any
330 
331     if ddo_freqranges is null or ddo_freqranges.count = 0 then
332       o_freqranges_lowfreqlmt := JTF_NUMBER_TABLE();
333       o_freqranges_uprfreqlmt := JTF_NUMBER_TABLE();
334       o_freqranges_seq := JTF_NUMBER_TABLE();
335       o_freqranges_score := JTF_VARCHAR2_TABLE_100();
336     else
337         o_freqranges_lowfreqlmt := JTF_NUMBER_TABLE();
338         o_freqranges_uprfreqlmt := JTF_NUMBER_TABLE();
339         o_freqranges_seq := JTF_NUMBER_TABLE();
340         o_freqranges_score := JTF_VARCHAR2_TABLE_100();
341         if ddo_freqranges.count > 0 then
342           o_freqranges_lowfreqlmt.extend(ddo_freqranges.count);
343           o_freqranges_uprfreqlmt.extend(ddo_freqranges.count);
344           o_freqranges_seq.extend(ddo_freqranges.count);
345           o_freqranges_score.extend(ddo_freqranges.count);
346           ddindx := ddo_freqranges.first;
347           indx := 1;
348           while true loop
349             o_freqranges_lowfreqlmt(indx) := ddo_freqranges(ddindx).lowfreqlmt;
350             o_freqranges_uprfreqlmt(indx) := ddo_freqranges(ddindx).uprfreqlmt;
351             o_freqranges_seq(indx) := ddo_freqranges(ddindx).seq;
352             o_freqranges_score(indx) := ddo_freqranges(ddindx).score;
353             indx := indx+1;
354             if ddo_freqranges.last =ddindx
355               then exit;
356             end if;
357             ddindx := ddo_freqranges.next(ddindx);
358           end loop;
359         end if;
360      end if;
361   end load_paymenthistory;
362 
363   /*
364   ** Name : save_avsCodes
365   ** Purpose : Wrapper function generated by Rosette to call the actual ]
366   **           function in iby_fact_pkg. This wrapper constructs actual
367   **           structure from the flatten structure and flattens the
368   **           response from the original procedure.
369   */
370   procedure save_avscodes(i_payeeid varchar2,
371     i_name  varchar2,
372     i_description  varchar2,
373     i_count  integer,
374     i_codes_code JTF_VARCHAR2_TABLE_100,
375     i_codes_score JTF_VARCHAR2_TABLE_100)
376 
377   is
378     ddi_codes iby_factor_pkg.codes_table;
379     ddindx binary_integer; indx binary_integer;
380   begin
381 
382     -- copy data to the local IN or IN-OUT args, if any
383 
384     if i_codes_code is not null and i_codes_code.count > 0 then
388           while true loop
385         if i_codes_code.count > 0 then
386           indx := i_codes_code.first;
387           ddindx := 1;
389             ddi_codes(ddindx).code := i_codes_code(indx);
390             ddi_codes(ddindx).score := i_codes_score(indx);
391             ddindx := ddindx+1;
392             if i_codes_code.last =indx
393               then exit;
394             end if;
395             indx := i_codes_code.next(indx);
396           end loop;
397         end if;
398      end if;
399 
400     -- here's the delegated call to the old PL/SQL routine
401     iby_factor_pkg.save_avscodes(i_payeeid, i_name,
402       i_description,
403       i_count,
404       ddi_codes);
405 
406     -- copy data back from the local OUT or IN-OUT args, if any
407 
408   end save_avscodes;
409 
410   /*
411   ** Name : load_avsCodes
412   ** Purpose : Wrapper function generated by Rosette to call the actual ]
413   **           function in iby_fact_pkg. This wrapper constructs actual
414   **           structure from the flatten structure and flattens the
415   **           response from the original procedure.
416   */
417   procedure load_avscodes(i_payeeid varchar2,
418     o_name out nocopy varchar2,
419     o_description out nocopy varchar2,
420     o_codes_code out nocopy JTF_VARCHAR2_TABLE_100,
421     o_codes_score out nocopy JTF_VARCHAR2_TABLE_100)
422 
423   is
424     ddo_codes iby_factor_pkg.codes_table;
425     ddindx binary_integer; indx binary_integer;
426   begin
427 
428     -- copy data to the local IN or IN-OUT args, if any
429 
430     -- here's the delegated call to the old PL/SQL routine
431     iby_factor_pkg.load_avscodes(i_payeeid, o_name,
432       o_description,
433       ddo_codes);
434 
435     -- copy data back from the local OUT or IN-OUT args, if any
436 
437 
438     if ddo_codes is null or ddo_codes.count = 0 then
439       o_codes_code := JTF_VARCHAR2_TABLE_100();
440       o_codes_score := JTF_VARCHAR2_TABLE_100();
441     else
442        o_codes_code := JTF_VARCHAR2_TABLE_100();
443        o_codes_score := JTF_VARCHAR2_TABLE_100();
444        if ddo_codes.count > 0 then
445           o_codes_code.extend(ddo_codes.count);
446           o_codes_score.extend(ddo_codes.count);
447           ddindx := ddo_codes.first;
448           indx := 1;
449           while true loop
450             o_codes_code(indx) := ddo_codes(ddindx).code;
451             o_codes_score(indx) := ddo_codes(ddindx).score;
452             indx := indx+1;
453             if ddo_codes.last =ddindx
454               then exit;
455             end if;
456             ddindx := ddo_codes.next(ddindx);
457           end loop;
458         end if;
459      end if;
460   end load_avscodes;
461 
462   /*
463   ** Name : save_riskCodes
464   ** Purpose : Wrapper function generated by Rosette to call the actual ]
465   **           function in iby_fact_pkg. This wrapper constructs actual
466   **           structure from the flatten structure and flattens the
467   **           response from the original procedure.
468   */
469   procedure save_riskcodes(i_payeeid varchar2,
470     i_name  varchar2,
471     i_description  varchar2,
472     i_count  integer,
473     i_codes_code JTF_VARCHAR2_TABLE_100,
474     i_codes_score JTF_VARCHAR2_TABLE_100)
475 
476   is
477     ddi_codes iby_factor_pkg.codes_table;
478     ddindx binary_integer; indx binary_integer;
479   begin
480 
481     -- copy data to the local IN or IN-OUT args, if any
482 
483     if i_codes_code is not null and i_codes_code.count > 0 then
484         if i_codes_code.count > 0 then
485           indx := i_codes_code.first;
486           ddindx := 1;
487           while true loop
488             ddi_codes(ddindx).code := i_codes_code(indx);
489             ddi_codes(ddindx).score := i_codes_score(indx);
490             ddindx := ddindx+1;
491             if i_codes_code.last =indx
492               then exit;
493             end if;
494             indx := i_codes_code.next(indx);
495           end loop;
496         end if;
497      end if;
498 
499     -- here's the delegated call to the old PL/SQL routine
500     iby_factor_pkg.save_riskcodes(i_payeeid, i_name,
501       i_description,
502       i_count,
503       ddi_codes);
504 
505     -- copy data back from the local OUT or IN-OUT args, if any
506 
507   end save_riskcodes;
508 
509   /*
510   ** Name : load_riskCodes
511   ** Purpose : Wrapper function generated by Rosette to call the actual ]
512   **           function in iby_fact_pkg. This wrapper constructs actual
513   **           structure from the flatten structure and flattens the
514   **           response from the original procedure.
515   */
516   procedure load_riskcodes(i_payeeid varchar2,
517     o_name out nocopy varchar2,
518     o_description out nocopy varchar2,
519     o_codes_code out nocopy JTF_VARCHAR2_TABLE_100,
520     o_codes_score out nocopy JTF_VARCHAR2_TABLE_100)
521 
522   is
523     ddo_codes iby_factor_pkg.codes_table;
524     ddindx binary_integer; indx binary_integer;
525   begin
526 
527     -- copy data to the local IN or IN-OUT args, if any
528 
532       ddo_codes);
529     -- here's the delegated call to the old PL/SQL routine
530     iby_factor_pkg.load_riskcodes(i_payeeid, o_name,
531       o_description,
533 
534     -- copy data back from the local OUT or IN-OUT args, if any
535 
536 
537     if ddo_codes is null or ddo_codes.count = 0 then
538       o_codes_code := JTF_VARCHAR2_TABLE_100();
539       o_codes_score := JTF_VARCHAR2_TABLE_100();
540     else
541         o_codes_code := JTF_VARCHAR2_TABLE_100();
542         o_codes_score := JTF_VARCHAR2_TABLE_100();
543         if ddo_codes.count > 0 then
544           o_codes_code.extend(ddo_codes.count);
545           o_codes_score.extend(ddo_codes.count);
546           ddindx := ddo_codes.first;
547           indx := 1;
548           while true loop
549             o_codes_code(indx) := ddo_codes(ddindx).code;
550             o_codes_score(indx) := ddo_codes(ddindx).score;
551             indx := indx+1;
552             if ddo_codes.last =ddindx
553               then exit;
554             end if;
555             ddindx := ddo_codes.next(ddindx);
556           end loop;
557         end if;
558      end if;
559   end load_riskcodes;
560 
561   /*
562   ** Name : save_creditratingcodes
563   ** Purpose : Wrapper function generated by Rosette to call the actual ]
564   **           function in iby_fact_pkg. This wrapper constructs actual
565   **           structure from the flatten structure and flattens the
566   **           response from the original procedure.
567   */
568   procedure save_creditratingcodes(i_payeeid varchar2,
569     i_name  varchar2,
570     i_description  varchar2,
571     i_count  integer,
572     i_codes_code JTF_VARCHAR2_TABLE_100,
573     i_codes_score JTF_VARCHAR2_TABLE_100)
574 
575   is
576     ddi_codes iby_factor_pkg.codes_table;
577     ddindx binary_integer; indx binary_integer;
578   begin
579 
580     -- copy data to the local IN or IN-OUT args, if any
581 
582     if i_codes_code is not null and i_codes_code.count > 0 then
583         if i_codes_code.count > 0 then
584           indx := i_codes_code.first;
585           ddindx := 1;
586           while true loop
587             ddi_codes(ddindx).code := i_codes_code(indx);
588             ddi_codes(ddindx).score := i_codes_score(indx);
589             ddindx := ddindx+1;
590             if i_codes_code.last =indx
591               then exit;
592             end if;
593             indx := i_codes_code.next(indx);
594           end loop;
595         end if;
596      end if;
597 
598     -- here's the delegated call to the old PL/SQL routine
599     iby_factor_pkg.save_creditratingcodes(i_payeeid, i_name,
600       i_description,
601       i_count,
602       ddi_codes);
603 
604     -- copy data back from the local OUT or IN-OUT args, if any
605 
606   end save_creditratingcodes;
607 
608   /*
609   ** Name : load_creditratingcodes
610   ** Purpose : Wrapper function generated by Rosette to call the actual ]
611   **           function in iby_fact_pkg. This wrapper constructs actual
612   **           structure from the flatten structure and flattens the
613   **           response from the original procedure.
614   */
615   procedure load_creditratingcodes(i_payeeid varchar2,
616     o_name out nocopy varchar2,
617     o_description out nocopy varchar2,
618     o_codes_code out nocopy JTF_VARCHAR2_TABLE_100,
619     o_codes_score out nocopy JTF_VARCHAR2_TABLE_100)
620 
621   is
622     ddo_codes iby_factor_pkg.codes_table;
623     ddindx binary_integer; indx binary_integer;
624   begin
625 
626     -- copy data to the local IN or IN-OUT args, if any
627 
628     -- here's the delegated call to the old PL/SQL routine
629     iby_factor_pkg.load_creditratingcodes(i_payeeid, o_name,
630       o_description,
631       ddo_codes);
632 
633     -- copy data back from the local OUT or IN-OUT args, if any
634 
635 
636     if ddo_codes is null or ddo_codes.count = 0 then
637       o_codes_code := JTF_VARCHAR2_TABLE_100();
638       o_codes_score := JTF_VARCHAR2_TABLE_100();
639     else
640       o_codes_code := JTF_VARCHAR2_TABLE_100();
641       o_codes_score := JTF_VARCHAR2_TABLE_100();
642       if ddo_codes.count > 0 then
643           o_codes_code.extend(ddo_codes.count);
644           o_codes_score.extend(ddo_codes.count);
645           ddindx := ddo_codes.first;
646           indx := 1;
647           while true loop
648             o_codes_code(indx) := ddo_codes(ddindx).code;
649             o_codes_score(indx) := ddo_codes(ddindx).score;
650             indx := indx+1;
651             if ddo_codes.last =ddindx
652               then exit;
653             end if;
654             ddindx := ddo_codes.next(ddindx);
655           end loop;
656        end if;
657      end if;
658   end  load_creditratingcodes;
659 
660 end iby_factor_pkg_wrap;
661