[Home] [Help]
PACKAGE BODY: APPS.AHL_REPORT_UTILS_PVT_W
Source
1 package body ahl_report_utils_pvt_w as
2 /* $Header: AHLWRPTB.pls 120.1.12020000.2 2012/12/14 06:08:47 shnatu ship $ */
3 procedure rosetta_table_copy_in_p6(t out nocopy ahl_report_utils_pvt.rem_counter_tbl_type, a0 JTF_NUMBER_TABLE
4 , a1 JTF_VARCHAR2_TABLE_100
5 , a2 JTF_VARCHAR2_TABLE_100
6 ) as
7 ddindx binary_integer; indx binary_integer;
8 begin
9 if a0 is not null and a0.count > 0 then
10 if a0.count > 0 then
11 indx := a0.first;
12 ddindx := 1;
13 while true loop
14 t(ddindx).parameter_id := a0(indx);
15 t(ddindx).counter_parameter_name := a1(indx);
16 t(ddindx).counter_parameter_value := a2(indx);
17 ddindx := ddindx+1;
18 if a0.last =indx
19 then exit;
20 end if;
21 indx := a0.next(indx);
22 end loop;
23 end if;
24 end if;
25 end rosetta_table_copy_in_p6;
26 procedure rosetta_table_copy_out_p6(t ahl_report_utils_pvt.rem_counter_tbl_type, a0 out nocopy JTF_NUMBER_TABLE
27 , a1 out nocopy JTF_VARCHAR2_TABLE_100
28 , a2 out nocopy JTF_VARCHAR2_TABLE_100
29 ) as
30 ddindx binary_integer; indx binary_integer;
31 begin
32 if t is null or t.count = 0 then
33 a0 := JTF_NUMBER_TABLE();
34 a1 := JTF_VARCHAR2_TABLE_100();
35 a2 := JTF_VARCHAR2_TABLE_100();
36 else
37 a0 := JTF_NUMBER_TABLE();
38 a1 := JTF_VARCHAR2_TABLE_100();
39 a2 := JTF_VARCHAR2_TABLE_100();
40 if t.count > 0 then
41 a0.extend(t.count);
42 a1.extend(t.count);
43 a2.extend(t.count);
44 ddindx := t.first;
45 indx := 1;
46 while true loop
47 a0(indx) := t(ddindx).parameter_id;
48 a1(indx) := t(ddindx).counter_parameter_name;
49 a2(indx) := t(ddindx).counter_parameter_value;
50 indx := indx+1;
51 if t.last =ddindx
52 then exit;
53 end if;
54 ddindx := t.next(ddindx);
55 end loop;
56 end if;
57 end if;
58 end rosetta_table_copy_out_p6;
59
60 procedure insert_rem_counters(p_api_version NUMBER
61 , p_init_msg_list VARCHAR2
62 , p_commit VARCHAR2
63 , p_validation_level NUMBER
64 , p4_a0 in out nocopy JTF_NUMBER_TABLE
65 , p4_a1 in out nocopy JTF_VARCHAR2_TABLE_100
66 , p4_a2 in out nocopy JTF_VARCHAR2_TABLE_100
67 , x_return_status out nocopy VARCHAR2
68 , x_msg_count out nocopy NUMBER
69 , x_msg_data out nocopy VARCHAR2
70 )
71
72 as
73 ddp_rem_counter_tbl ahl_report_utils_pvt.rem_counter_tbl_type;
74 ddindx binary_integer; indx binary_integer;
75 begin
76
77 -- copy data to the local IN or IN-OUT args, if any
78
79
80
81
82 ahl_report_utils_pvt_w.rosetta_table_copy_in_p6(ddp_rem_counter_tbl, p4_a0
83 , p4_a1
84 , p4_a2
85 );
86
87
88
89
90 -- here's the delegated call to the old PL/SQL routine
91 ahl_report_utils_pvt.insert_rem_counters(p_api_version,
92 p_init_msg_list,
93 p_commit,
94 p_validation_level,
95 ddp_rem_counter_tbl,
96 x_return_status,
97 x_msg_count,
98 x_msg_data);
99
100 -- copy data back from the local variables to OUT or IN-OUT args, if any
101
102
103
104
105 ahl_report_utils_pvt_w.rosetta_table_copy_out_p6(ddp_rem_counter_tbl, p4_a0
106 , p4_a1
107 , p4_a2
108 );
109
110
111
112 end;
113
114 end ahl_report_utils_pvt_w;