[Home] [Help]
PACKAGE BODY: APPS.AMS_LIST_RUNNING_TOTAL_PVT_W
Source
1 package body ams_list_running_total_pvt_w as
2 /* $Header: amswlrutb.pls 115.0 2003/11/19 19:06:09 huili noship $ */
3 procedure rosetta_table_copy_in_p0(t out nocopy ams_list_running_total_pvt.sql_string_4k, a0 JTF_VARCHAR2_TABLE_4000) 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 ams_list_running_total_pvt.sql_string_4k, a0 out nocopy JTF_VARCHAR2_TABLE_4000) as
22 ddindx binary_integer; indx binary_integer;
23 begin
24 if t is null or t.count = 0 then
25 a0 := JTF_VARCHAR2_TABLE_4000();
26 else
27 a0 := JTF_VARCHAR2_TABLE_4000();
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_p1(t out nocopy ams_list_running_total_pvt.t_number, a0 JTF_NUMBER_TABLE) as
45 ddindx binary_integer; indx binary_integer;
46 begin
47 if a0 is not null and a0.count > 0 then
48 if a0.count > 0 then
49 indx := a0.first;
50 ddindx := 1;
51 while true loop
52 t(ddindx) := a0(indx);
53 ddindx := ddindx+1;
54 if a0.last =indx
55 then exit;
56 end if;
57 indx := a0.next(indx);
58 end loop;
59 end if;
60 end if;
61 end rosetta_table_copy_in_p1;
62 procedure rosetta_table_copy_out_p1(t ams_list_running_total_pvt.t_number, a0 out nocopy JTF_NUMBER_TABLE) as
63 ddindx binary_integer; indx binary_integer;
64 begin
65 if t is null or t.count = 0 then
66 a0 := JTF_NUMBER_TABLE();
67 else
68 a0 := JTF_NUMBER_TABLE();
69 if t.count > 0 then
70 a0.extend(t.count);
71 ddindx := t.first;
72 indx := 1;
73 while true loop
74 a0(indx) := t(ddindx);
75 indx := indx+1;
76 if t.last =ddindx
77 then exit;
78 end if;
79 ddindx := t.next(ddindx);
80 end loop;
81 end if;
82 end if;
83 end rosetta_table_copy_out_p1;
84
85 procedure process_query(p_sql_string JTF_VARCHAR2_TABLE_4000
86 , p_total_parameters JTF_NUMBER_TABLE
87 , p_string_parameters JTF_VARCHAR2_TABLE_4000
88 , p_template_id NUMBER
89 , p_parameters JTF_VARCHAR2_TABLE_4000
90 , p_parameters_value JTF_NUMBER_TABLE
91 , p_sql_results out nocopy JTF_NUMBER_TABLE
92 )
93
94 as
95 ddp_sql_string ams_list_running_total_pvt.sql_string_4k;
96 ddp_total_parameters ams_list_running_total_pvt.t_number;
97 ddp_string_parameters ams_list_running_total_pvt.sql_string_4k;
98 ddp_parameters ams_list_running_total_pvt.sql_string_4k;
99 ddp_parameters_value ams_list_running_total_pvt.t_number;
100 ddp_sql_results ams_list_running_total_pvt.t_number;
101 ddindx binary_integer; indx binary_integer;
102 begin
103
104 -- copy data to the local IN or IN-OUT args, if any
105 ams_list_running_total_pvt_w.rosetta_table_copy_in_p0(ddp_sql_string, p_sql_string);
106
107 ams_list_running_total_pvt_w.rosetta_table_copy_in_p1(ddp_total_parameters, p_total_parameters);
108
109 ams_list_running_total_pvt_w.rosetta_table_copy_in_p0(ddp_string_parameters, p_string_parameters);
110
111
112 ams_list_running_total_pvt_w.rosetta_table_copy_in_p0(ddp_parameters, p_parameters);
113
114 ams_list_running_total_pvt_w.rosetta_table_copy_in_p1(ddp_parameters_value, p_parameters_value);
115
116
117 -- here's the delegated call to the old PL/SQL routine
118 ams_list_running_total_pvt.process_query(ddp_sql_string,
119 ddp_total_parameters,
120 ddp_string_parameters,
121 p_template_id,
122 ddp_parameters,
123 ddp_parameters_value,
124 ddp_sql_results);
125
126 -- copy data back from the local variables to OUT or IN-OUT args, if any
127
128
129
130
131
132
133 ams_list_running_total_pvt_w.rosetta_table_copy_out_p1(ddp_sql_results, p_sql_results);
134 end;
135
136 end ams_list_running_total_pvt_w;