DBA Data[Home] [Help]

PACKAGE BODY: APPS.OKL_QA_CHECK_PUB_W

Source


1 package body okl_qa_check_pub_w as
2   /* $Header: OKLEQAKB.pls 120.0 2007/05/17 16:42:58 hariven noship $ */
3   rosetta_g_mistake_date date := to_date('01/01/+4713', 'MM/DD/SYYYY');
4   rosetta_g_miss_date date := to_date('01/01/-4712', 'MM/DD/SYYYY');
5   rosetta_g_mistake_date_high date := to_date('01/01/+4710', 'MM/DD/SYYYY');
6   rosetta_g_mistake_date_low date := to_date('01/01/-4710', 'MM/DD/SYYYY');
7 
8   -- this is to workaround the JDBC bug regarding IN DATE of value GMiss
9   function rosetta_g_miss_date_in_map(d date) return date as
10   begin
11     if d > rosetta_g_mistake_date_high then return fnd_api.g_miss_date; end if;
12     if d < rosetta_g_mistake_date_low then return fnd_api.g_miss_date; end if;
13     return d;
14   end;
15 
16   function rosetta_g_miss_num_map(n number) return number as
17     a number := fnd_api.g_miss_num;
18     b number := 0-1962.0724;
19   begin
20     if n=a then return b; end if;
21     if n=b then return a; end if;
22     return n;
23   end;
24 
25   procedure rosetta_table_copy_in_p1(t out nocopy okl_qa_check_pub.msg_tbl_type, a0 JTF_VARCHAR2_TABLE_100
26     , a1 JTF_VARCHAR2_TABLE_200
27     , a2 JTF_VARCHAR2_TABLE_2000
28     , a3 JTF_VARCHAR2_TABLE_100
29     , a4 JTF_VARCHAR2_TABLE_100
30     , a5 JTF_VARCHAR2_TABLE_100
31     , a6 JTF_VARCHAR2_TABLE_2000
32     ) as
33     ddindx binary_integer; indx binary_integer;
34   begin
35   if a0 is not null and a0.count > 0 then
36       if a0.count > 0 then
37         indx := a0.first;
38         ddindx := 1;
39         while true loop
40           t(ddindx).severity := a0(indx);
41           t(ddindx).name := a1(indx);
42           t(ddindx).description := a2(indx);
43           t(ddindx).package_name := a3(indx);
44           t(ddindx).procedure_name := a4(indx);
45           t(ddindx).error_status := a5(indx);
46           t(ddindx).data := a6(indx);
47           ddindx := ddindx+1;
48           if a0.last =indx
49             then exit;
50           end if;
51           indx := a0.next(indx);
52         end loop;
53       end if;
54    end if;
55   end rosetta_table_copy_in_p1;
56   procedure rosetta_table_copy_out_p1(t okl_qa_check_pub.msg_tbl_type, a0 out nocopy JTF_VARCHAR2_TABLE_100
57     , a1 out nocopy JTF_VARCHAR2_TABLE_200
58     , a2 out nocopy JTF_VARCHAR2_TABLE_2000
59     , a3 out nocopy JTF_VARCHAR2_TABLE_100
60     , a4 out nocopy JTF_VARCHAR2_TABLE_100
61     , a5 out nocopy JTF_VARCHAR2_TABLE_100
62     , a6 out nocopy JTF_VARCHAR2_TABLE_2000
63     ) as
64     ddindx binary_integer; indx binary_integer;
65   begin
66   if t is null or t.count = 0 then
67     a0 := JTF_VARCHAR2_TABLE_100();
68     a1 := JTF_VARCHAR2_TABLE_200();
69     a2 := JTF_VARCHAR2_TABLE_2000();
70     a3 := JTF_VARCHAR2_TABLE_100();
71     a4 := JTF_VARCHAR2_TABLE_100();
72     a5 := JTF_VARCHAR2_TABLE_100();
73     a6 := JTF_VARCHAR2_TABLE_2000();
74   else
75       a0 := JTF_VARCHAR2_TABLE_100();
76       a1 := JTF_VARCHAR2_TABLE_200();
77       a2 := JTF_VARCHAR2_TABLE_2000();
78       a3 := JTF_VARCHAR2_TABLE_100();
79       a4 := JTF_VARCHAR2_TABLE_100();
80       a5 := JTF_VARCHAR2_TABLE_100();
81       a6 := JTF_VARCHAR2_TABLE_2000();
82       if t.count > 0 then
83         a0.extend(t.count);
84         a1.extend(t.count);
85         a2.extend(t.count);
86         a3.extend(t.count);
87         a4.extend(t.count);
88         a5.extend(t.count);
89         a6.extend(t.count);
90         ddindx := t.first;
91         indx := 1;
92         while true loop
93           a0(indx) := t(ddindx).severity;
94           a1(indx) := t(ddindx).name;
95           a2(indx) := t(ddindx).description;
96           a3(indx) := t(ddindx).package_name;
97           a4(indx) := t(ddindx).procedure_name;
98           a5(indx) := t(ddindx).error_status;
99           a6(indx) := t(ddindx).data;
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_p1;
109 
110   procedure execute_qa_check_list(p_api_version  NUMBER
111     , p_init_msg_list  VARCHAR2
112     , x_return_status out nocopy  VARCHAR2
113     , x_msg_count out nocopy  NUMBER
114     , x_msg_data out nocopy  VARCHAR2
115     , p_qcl_id  NUMBER
116     , p_chr_id  NUMBER
117     , p7_a0 out nocopy JTF_VARCHAR2_TABLE_100
118     , p7_a1 out nocopy JTF_VARCHAR2_TABLE_200
119     , p7_a2 out nocopy JTF_VARCHAR2_TABLE_2000
120     , p7_a3 out nocopy JTF_VARCHAR2_TABLE_100
121     , p7_a4 out nocopy JTF_VARCHAR2_TABLE_100
122     , p7_a5 out nocopy JTF_VARCHAR2_TABLE_100
123     , p7_a6 out nocopy JTF_VARCHAR2_TABLE_2000
124     , p_call_mode  VARCHAR2
125   )
126 
127   as
128     ddx_msg_tbl okl_qa_check_pub.msg_tbl_type;
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 
136 
137 
138 
139 
140 
141 
142     -- here's the delegated call to the old PL/SQL routine
143     okl_qa_check_pub.execute_qa_check_list(p_api_version,
144       p_init_msg_list,
145       x_return_status,
146       x_msg_count,
147       x_msg_data,
148       p_qcl_id,
149       p_chr_id,
150       ddx_msg_tbl,
151       p_call_mode);
152 
153     -- copy data back from the local variables to OUT or IN-OUT args, if any
154 
155 
156 
157 
158 
159 
160 
161     okl_qa_check_pub_w.rosetta_table_copy_out_p1(ddx_msg_tbl, p7_a0
162       , p7_a1
163       , p7_a2
164       , p7_a3
165       , p7_a4
166       , p7_a5
167       , p7_a6
168       );
169 
170   end;
171 
172 end okl_qa_check_pub_w;