DBA Data[Home] [Help]
Skip to content

PACKAGE BODY: APPS.LNS_FIN_UTILS_W

Source


1 package body lns_fin_utils_w as
2   /* $Header: LNS_FIN_UTILSJ_B.pls 120.3.12020000.2 2012/07/19 20:57:18 scherkas ship $ */
3   procedure rosetta_table_copy_in_p0(t out nocopy lns_fin_utils.date_tbl, a0 JTF_DATE_TABLE) as
4     ddindx binary_integer; indx binary_integer;
5   begin
6   if a0 is not null and a0.count > 0 then
7       if a0.count > 0 then
8         indx := a0.first;
9         ddindx := 1;
10         while true loop
11           t(ddindx) := a0(indx);
12           ddindx := ddindx+1;
13           if a0.last =indx
14             then exit;
15           end if;
16           indx := a0.next(indx);
17         end loop;
18       end if;
19    end if;
20   end rosetta_table_copy_in_p0;
21   procedure rosetta_table_copy_out_p0(t lns_fin_utils.date_tbl, a0 out nocopy JTF_DATE_TABLE) as
22     ddindx binary_integer; indx binary_integer;
23   begin
24   if t is null or t.count = 0 then
25     a0 := JTF_DATE_TABLE();
26   else
27       a0 := JTF_DATE_TABLE();
28       if t.count > 0 then
29         a0.extend(t.count);
30         ddindx := t.first;
31         indx := 1;
32         while true loop
33           a0(indx) := t(ddindx);
34           indx := indx+1;
35           if t.last =ddindx
36             then exit;
37           end if;
38           ddindx := t.next(ddindx);
39         end loop;
40       end if;
41    end if;
42   end rosetta_table_copy_out_p0;
43 
44   procedure rosetta_table_copy_in_p2(t out nocopy lns_fin_utils.payment_schedule_tbl, a0 JTF_DATE_TABLE
45     , a1 JTF_DATE_TABLE
46     , a2 JTF_DATE_TABLE
47     , a3 JTF_VARCHAR2_TABLE_100
48     ) as
49     ddindx binary_integer; indx binary_integer;
50   begin
51   if a0 is not null and a0.count > 0 then
52       if a0.count > 0 then
53         indx := a0.first;
54         ddindx := 1;
55         while true loop
56           t(ddindx).period_begin_date := a0(indx);
57           t(ddindx).period_end_date := a1(indx);
58           t(ddindx).period_due_date := a2(indx);
59           t(ddindx).contents := a3(indx);
60           ddindx := ddindx+1;
61           if a0.last =indx
62             then exit;
63           end if;
64           indx := a0.next(indx);
65         end loop;
66       end if;
67    end if;
68   end rosetta_table_copy_in_p2;
69   procedure rosetta_table_copy_out_p2(t lns_fin_utils.payment_schedule_tbl, a0 out nocopy JTF_DATE_TABLE
70     , a1 out nocopy JTF_DATE_TABLE
71     , a2 out nocopy JTF_DATE_TABLE
72     , a3 out nocopy JTF_VARCHAR2_TABLE_100
73     ) as
74     ddindx binary_integer; indx binary_integer;
75   begin
76   if t is null or t.count = 0 then
77     a0 := JTF_DATE_TABLE();
78     a1 := JTF_DATE_TABLE();
79     a2 := JTF_DATE_TABLE();
80     a3 := JTF_VARCHAR2_TABLE_100();
81   else
82       a0 := JTF_DATE_TABLE();
83       a1 := JTF_DATE_TABLE();
84       a2 := JTF_DATE_TABLE();
85       a3 := JTF_VARCHAR2_TABLE_100();
86       if t.count > 0 then
87         a0.extend(t.count);
88         a1.extend(t.count);
89         a2.extend(t.count);
90         a3.extend(t.count);
91         ddindx := t.first;
92         indx := 1;
93         while true loop
94           a0(indx) := t(ddindx).period_begin_date;
95           a1(indx) := t(ddindx).period_end_date;
96           a2(indx) := t(ddindx).period_due_date;
97           a3(indx) := t(ddindx).contents;
98           indx := indx+1;
99           if t.last =ddindx
100             then exit;
101           end if;
102           ddindx := t.next(ddindx);
103         end loop;
104       end if;
105    end if;
106   end rosetta_table_copy_out_p2;
107 
108   procedure isleapyear(p_year  NUMBER
109     , ddrosetta_retval_bool OUT NOCOPY NUMBER
110   )
111 
112   as
113     ddindx binary_integer; indx binary_integer;
114     ddrosetta_retval boolean;
115   begin
116 
117     -- copy data to the local IN or IN-OUT args, if any
118 
119     -- here's the delegated call to the old PL/SQL routine
120     ddrosetta_retval := lns_fin_utils.isleapyear(p_year);
121 
122     -- copy data back from the local variables to OUT or IN-OUT args, if any
123     if ddrosetta_retval is null
124       then ddrosetta_retval_bool := null;
125     elsif ddrosetta_retval
126       then ddrosetta_retval_bool := 1;
127     else ddrosetta_retval_bool := 0;
128     end if;
129   end;
130 
131 end lns_fin_utils_w;