[Home] [Help]
PACKAGE BODY: APPS.EAM_PM_LAST_SERVICE_PUB_W
Source
1 package body eam_pm_last_service_pub_w as
2 /* $Header: EAMWPLSB.pls 120.2 2008/01/26 01:50:52 devijay ship $ */
3 procedure rosetta_table_copy_in_p1(t out nocopy eam_pm_last_service_pub.pm_last_service_tbl, a0 JTF_NUMBER_TABLE
4 , a1 JTF_NUMBER_TABLE
5 , a2 JTF_NUMBER_TABLE
6 , a3 JTF_NUMBER_TABLE
7 ) as
8 ddindx binary_integer; indx binary_integer;
9 begin
10 if a0 is not null and a0.count > 0 then
11 if a0.count > 0 then
12 indx := a0.first;
13 ddindx := 1;
14 while true loop
15 t(ddindx).meter_id := a0(indx);
16 t(ddindx).last_service_reading := a1(indx);
17 t(ddindx).prev_service_reading := a2(indx);
18 t(ddindx).wip_entity_id := a3(indx);
19 ddindx := ddindx+1;
20 if a0.last =indx
21 then exit;
22 end if;
23 indx := a0.next(indx);
24 end loop;
25 end if;
26 end if;
27 end rosetta_table_copy_in_p1;
28 procedure rosetta_table_copy_out_p1(t eam_pm_last_service_pub.pm_last_service_tbl, a0 out nocopy JTF_NUMBER_TABLE
29 , a1 out nocopy JTF_NUMBER_TABLE
30 , a2 out nocopy JTF_NUMBER_TABLE
31 , a3 out nocopy JTF_NUMBER_TABLE
32 ) as
33 ddindx binary_integer; indx binary_integer;
34 begin
35 if t is null or t.count = 0 then
36 a0 := JTF_NUMBER_TABLE();
37 a1 := JTF_NUMBER_TABLE();
38 a2 := JTF_NUMBER_TABLE();
39 a3 := JTF_NUMBER_TABLE();
40 else
41 a0 := JTF_NUMBER_TABLE();
42 a1 := JTF_NUMBER_TABLE();
43 a2 := JTF_NUMBER_TABLE();
44 a3 := JTF_NUMBER_TABLE();
45 if t.count > 0 then
46 a0.extend(t.count);
47 a1.extend(t.count);
48 a2.extend(t.count);
49 a3.extend(t.count);
50 ddindx := t.first;
51 indx := 1;
52 while true loop
53 a0(indx) := t(ddindx).meter_id;
54 a1(indx) := t(ddindx).last_service_reading;
55 a2(indx) := t(ddindx).prev_service_reading;
56 a3(indx) := t(ddindx).wip_entity_id;
57 indx := indx+1;
58 if t.last =ddindx
59 then exit;
60 end if;
61 ddindx := t.next(ddindx);
62 end loop;
63 end if;
64 end if;
65 end rosetta_table_copy_out_p1;
66
67 procedure process_pm_last_service(p_api_version NUMBER
68 , p_init_msg_list VARCHAR2
69 , p_commit VARCHAR2
70 , p_validation_level NUMBER
71 , x_return_status out nocopy VARCHAR2
72 , x_msg_count out nocopy NUMBER
73 , x_msg_data out nocopy VARCHAR2
74 , p7_a0 JTF_NUMBER_TABLE
75 , p7_a1 JTF_NUMBER_TABLE
76 , p7_a2 JTF_NUMBER_TABLE
77 , p7_a3 JTF_NUMBER_TABLE
78 , p_actv_assoc_id NUMBER
79 )
80
81 as
82 ddp_pm_last_service_tbl eam_pm_last_service_pub.pm_last_service_tbl;
83 ddindx binary_integer; indx binary_integer;
84 begin
85
86 -- copy data to the local IN or IN-OUT args, if any
87
88
89
90
91
92
93
94 eam_pm_last_service_pub_w.rosetta_table_copy_in_p1(ddp_pm_last_service_tbl, p7_a0
95 , p7_a1
96 , p7_a2
97 , p7_a3
98 );
99
100
101 -- here's the delegated call to the old PL/SQL routine
102 eam_pm_last_service_pub.process_pm_last_service(p_api_version,
103 p_init_msg_list,
104 p_commit,
105 p_validation_level,
106 x_return_status,
107 x_msg_count,
108 x_msg_data,
109 ddp_pm_last_service_tbl,
110 p_actv_assoc_id);
111
112 -- copy data back from the local variables to OUT or IN-OUT args, if any
113
114
115
116
117
118
119
120
121 end;
122
123 end eam_pm_last_service_pub_w;