[Home] [Help]
PACKAGE BODY: APPS.AHL_RSV_RESERVATIONS_PVT_W
Source
1 package body ahl_rsv_reservations_pvt_w as
2 /* $Header: AHLWRSVB.pls 120.0 2005/07/01 03:22 anraj noship $ */
3 procedure rosetta_table_copy_in_p2(t out nocopy ahl_rsv_reservations_pvt.serial_number_tbl_type, a0 JTF_NUMBER_TABLE
4 , a1 JTF_VARCHAR2_TABLE_100
5 ) as
6 ddindx binary_integer; indx binary_integer;
7 begin
8 if a0 is not null and a0.count > 0 then
9 if a0.count > 0 then
10 indx := a0.first;
11 ddindx := 1;
12 while true loop
13 t(ddindx).inventory_item_id := a0(indx);
14 t(ddindx).serial_number := a1(indx);
15 ddindx := ddindx+1;
16 if a0.last =indx
17 then exit;
18 end if;
19 indx := a0.next(indx);
20 end loop;
21 end if;
22 end if;
23 end rosetta_table_copy_in_p2;
24 procedure rosetta_table_copy_out_p2(t ahl_rsv_reservations_pvt.serial_number_tbl_type, a0 out nocopy JTF_NUMBER_TABLE
25 , a1 out nocopy JTF_VARCHAR2_TABLE_100
26 ) as
27 ddindx binary_integer; indx binary_integer;
28 begin
29 if t is null or t.count = 0 then
30 a0 := JTF_NUMBER_TABLE();
31 a1 := JTF_VARCHAR2_TABLE_100();
32 else
33 a0 := JTF_NUMBER_TABLE();
34 a1 := JTF_VARCHAR2_TABLE_100();
35 if t.count > 0 then
36 a0.extend(t.count);
37 a1.extend(t.count);
38 ddindx := t.first;
39 indx := 1;
40 while true loop
41 a0(indx) := t(ddindx).inventory_item_id;
42 a1(indx) := t(ddindx).serial_number;
43 indx := indx+1;
44 if t.last =ddindx
45 then exit;
46 end if;
47 ddindx := t.next(ddindx);
48 end loop;
49 end if;
50 end if;
51 end rosetta_table_copy_out_p2;
52
53 procedure create_reservation(p_api_version NUMBER
54 , p_init_msg_list VARCHAR2
55 , p_commit VARCHAR2
56 , p_validation_level NUMBER
57 , p_module_type VARCHAR2
58 , x_return_status out nocopy VARCHAR2
59 , x_msg_count out nocopy NUMBER
60 , x_msg_data out nocopy VARCHAR2
61 , p_scheduled_material_id NUMBER
62 , p9_a0 JTF_NUMBER_TABLE
63 , p9_a1 JTF_VARCHAR2_TABLE_100
64 )
65
66 as
67 ddp_serial_number_tbl ahl_rsv_reservations_pvt.serial_number_tbl_type;
68 ddindx binary_integer; indx binary_integer;
69 begin
70
71 -- copy data to the local IN or IN-OUT args, if any
72
73
74
75
76
77
78
79
80
81 ahl_rsv_reservations_pvt_w.rosetta_table_copy_in_p2(ddp_serial_number_tbl, p9_a0
82 , p9_a1
83 );
84
85 -- here's the delegated call to the old PL/SQL routine
86 ahl_rsv_reservations_pvt.create_reservation(p_api_version,
87 p_init_msg_list,
88 p_commit,
89 p_validation_level,
90 p_module_type,
91 x_return_status,
92 x_msg_count,
93 x_msg_data,
94 p_scheduled_material_id,
95 ddp_serial_number_tbl);
96
97 -- copy data back from the local variables to OUT or IN-OUT args, if any
98
99
100
101
102
103
104
105
106
107 end;
108
109 end ahl_rsv_reservations_pvt_w;