DBA Data[Home] [Help]

PACKAGE BODY: APPS.QA_AUDIT_PKG_W

Source


1 package body qa_audit_pkg_w as
2   /* $Header: qaaudwrb.pls 120.0 2005/06/09 09:41 srhariha noship $ */
3   procedure rosetta_table_copy_in_p2(t out nocopy qa_audit_pkg.summaryparamarray, a0 JTF_VARCHAR2_TABLE_200
4     ) is
5     ddindx binary_integer; indx binary_integer;
6   begin
7   if a0 is not null and a0.count > 0 then
8       if a0.count > 0 then
9         indx := a0.first;
10         ddindx := 1;
11         while true loop
12           t(ddindx).standard := a0(indx);
13           ddindx := ddindx+1;
14           if a0.last =indx
15             then exit;
16           end if;
17           indx := a0.next(indx);
18         end loop;
19       end if;
20    end if;
21   end rosetta_table_copy_in_p2;
22   procedure rosetta_table_copy_out_p2(t qa_audit_pkg.summaryparamarray, a0 out nocopy JTF_VARCHAR2_TABLE_200
23     ) is
24     ddindx binary_integer; indx binary_integer;
25   begin
26   if t is null or t.count = 0 then
27     a0 := JTF_VARCHAR2_TABLE_200();
28   else
29       a0 := JTF_VARCHAR2_TABLE_200();
30       if t.count > 0 then
31         a0.extend(t.count);
32         ddindx := t.first;
33         indx := 1;
34         while true loop
35           a0(indx) := t(ddindx).standard;
36           indx := indx+1;
37           if t.last =ddindx
38             then exit;
39           end if;
40           ddindx := t.next(ddindx);
41         end loop;
42       end if;
43    end if;
44   end rosetta_table_copy_out_p2;
45 
46   procedure rosetta_table_copy_in_p3(t out nocopy qa_audit_pkg.catsummaryparamarray, a0 JTF_VARCHAR2_TABLE_200
47     , a1 JTF_VARCHAR2_TABLE_200
48     , a2 JTF_VARCHAR2_TABLE_200
49     , a3 JTF_VARCHAR2_TABLE_200
50     ) is
51     ddindx binary_integer; indx binary_integer;
52   begin
53   if a0 is not null and a0.count > 0 then
54       if a0.count > 0 then
55         indx := a0.first;
56         ddindx := 1;
57         while true loop
58           t(ddindx).standard := a0(indx);
59           t(ddindx).section := a1(indx);
60           t(ddindx).area := a2(indx);
61           t(ddindx).category := a3(indx);
62           ddindx := ddindx+1;
63           if a0.last =indx
64             then exit;
65           end if;
66           indx := a0.next(indx);
67         end loop;
68       end if;
69    end if;
70   end rosetta_table_copy_in_p3;
71   procedure rosetta_table_copy_out_p3(t qa_audit_pkg.catsummaryparamarray, a0 out nocopy JTF_VARCHAR2_TABLE_200
72     , a1 out nocopy JTF_VARCHAR2_TABLE_200
73     , a2 out nocopy JTF_VARCHAR2_TABLE_200
74     , a3 out nocopy JTF_VARCHAR2_TABLE_200
75     ) is
76     ddindx binary_integer; indx binary_integer;
77   begin
78   if t is null or t.count = 0 then
79     a0 := JTF_VARCHAR2_TABLE_200();
80     a1 := JTF_VARCHAR2_TABLE_200();
81     a2 := JTF_VARCHAR2_TABLE_200();
82     a3 := JTF_VARCHAR2_TABLE_200();
83   else
84       a0 := JTF_VARCHAR2_TABLE_200();
85       a1 := JTF_VARCHAR2_TABLE_200();
86       a2 := JTF_VARCHAR2_TABLE_200();
87       a3 := JTF_VARCHAR2_TABLE_200();
88       if t.count > 0 then
89         a0.extend(t.count);
90         a1.extend(t.count);
91         a2.extend(t.count);
92         a3.extend(t.count);
93         ddindx := t.first;
94         indx := 1;
95         while true loop
96           a0(indx) := t(ddindx).standard;
97           a1(indx) := t(ddindx).section;
98           a2(indx) := t(ddindx).area;
99           a3(indx) := t(ddindx).category;
100           indx := indx+1;
101           if t.last =ddindx
102             then exit;
103           end if;
104           ddindx := t.next(ddindx);
105         end loop;
106       end if;
107    end if;
108   end rosetta_table_copy_out_p3;
109 
110   procedure copy_questions(p_audit_bank_plan_id  NUMBER
111     , p_audit_bank_org_id  NUMBER
112     , p2_a0 JTF_VARCHAR2_TABLE_200
113     , p3_a0 JTF_VARCHAR2_TABLE_200
114     , p3_a1 JTF_VARCHAR2_TABLE_200
115     , p3_a2 JTF_VARCHAR2_TABLE_200
116     , p3_a3 JTF_VARCHAR2_TABLE_200
117     , p_audit_question_plan_id  NUMBER
118     , p_audit_question_org_id  NUMBER
119     , p_audit_num  VARCHAR2
120     , x_count out nocopy  NUMBER
121     , x_msg_count out nocopy  NUMBER
122     , x_msg_data out nocopy  VARCHAR2
123     , x_return_status out nocopy  VARCHAR2
124   )
125 
126   is
127     ddp_summary_params qa_audit_pkg.summaryparamarray;
128     ddp_cat_summary_params qa_audit_pkg.catsummaryparamarray;
129     ddindx binary_integer; indx binary_integer;
130   begin
131 
132     -- copy data to the local IN or IN-OUT args, if any
133 
134 
135     qa_audit_pkg_w.rosetta_table_copy_in_p2(ddp_summary_params, p2_a0
136       );
137 
138     qa_audit_pkg_w.rosetta_table_copy_in_p3(ddp_cat_summary_params, p3_a0
139       , p3_a1
140       , p3_a2
141       , p3_a3
142       );
143 
144 
145 
146 
147 
148 
149 
150 
151     -- here's the delegated call to the old PL/SQL routine
152     qa_audit_pkg.copy_questions(p_audit_bank_plan_id,
153       p_audit_bank_org_id,
154       ddp_summary_params,
155       ddp_cat_summary_params,
156       p_audit_question_plan_id,
157       p_audit_question_org_id,
158       p_audit_num,
159       x_count,
160       x_msg_count,
161       x_msg_data,
162       x_return_status);
163 
164     -- copy data back from the local variables to OUT or IN-OUT args, if any
165 
166 
167 
168 
169 
170 
171 
172 
173 
174 
175   end;
176 
177 end qa_audit_pkg_w;