DBA Data[Home] [Help]

PACKAGE BODY: APPS.IBE_COPY_LOGICALCONTENT_GRP_W

Source


1 package body ibe_copy_logicalcontent_grp_w as
2   /* $Header: IBEGRCTB.pls 120.0.12010000.1 2009/12/16 05:24:47 pgoutia 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 
6   -- this is to workaround the JDBC bug regarding IN DATE of value GMiss
7   function rosetta_g_miss_date_in_map(d date) return date as
8   begin
9     if d = rosetta_g_mistake_date then return fnd_api.g_miss_date; end if;
10     return d;
11   end;
12 
13   function rosetta_g_miss_num_map(n number) return number as
14     a number := fnd_api.g_miss_num;
15     b number := 0-1962.0724;
16   begin
17     if n=a then return b; end if;
18     if n=b then return a; end if;
19     return n;
20   end;
21 
22   procedure rosetta_table_copy_in_p2(t out nocopy ibe_copy_logicalcontent_grp.ids_list, a0 JTF_NUMBER_TABLE) as
23     ddindx binary_integer; indx binary_integer;
24   begin
25   if a0 is null then
26     t := null;
27   elsif a0.count = 0 then
28     t := ibe_copy_logicalcontent_grp.ids_list();
29   else
30       if a0.count > 0 then
31       t := ibe_copy_logicalcontent_grp.ids_list();
32       t.extend(a0.count);
33         indx := a0.first;
34         ddindx := 1;
35         while true loop
36           t(ddindx) := rosetta_g_miss_num_map(a0(indx));
37           ddindx := ddindx+1;
38           if a0.last =indx
39             then exit;
40           end if;
41           indx := a0.next(indx);
42         end loop;
43       end if;
44    end if;
45   end rosetta_table_copy_in_p2;
46   procedure rosetta_table_copy_out_p2(t ibe_copy_logicalcontent_grp.ids_list, a0 out nocopy JTF_NUMBER_TABLE) as
47     ddindx binary_integer; indx binary_integer;
48   begin
49   if t is null then
50     a0 := null;
51   elsif t.count = 0 then
52     a0 := JTF_NUMBER_TABLE();
53   else
54       a0 := JTF_NUMBER_TABLE();
55       if t.count > 0 then
56         a0.extend(t.count);
57         ddindx := t.first;
58         indx := 1;
59         while true loop
60           a0(indx) := rosetta_g_miss_num_map(t(ddindx));
61           indx := indx+1;
62           if t.last =ddindx
63             then exit;
64           end if;
65           ddindx := t.next(ddindx);
66         end loop;
67       end if;
68    end if;
69   end rosetta_table_copy_out_p2;
70 
71   procedure copy_lgl_ctnt(p_api_version  NUMBER
72     , p_init_msg_list  VARCHAR2
73     , p_commit  VARCHAR2
74     , p_object_type_code  VARCHAR2
75     , p_from_product_id  NUMBER
76     , p_from_context_ids JTF_NUMBER_TABLE
77     , p_to_product_ids JTF_NUMBER_TABLE
78     , x_copy_status out nocopy JTF_NUMBER_TABLE
79     , x_return_status out nocopy  VARCHAR2
80     , x_msg_count out nocopy  NUMBER
81     , x_msg_data out nocopy  VARCHAR2
82   )
83 
84   as
85     ddp_from_context_ids ibe_copy_logicalcontent_grp.ids_list;
86     ddp_to_product_ids ibe_copy_logicalcontent_grp.ids_list;
87     ddx_copy_status ibe_copy_logicalcontent_grp.ids_list;
88     ddindx binary_integer; indx binary_integer;
89   begin
90 
91     -- copy data to the local IN or IN-OUT args, if any
92 
93 
94 
95 
96 
97     ibe_copy_logicalcontent_grp_w.rosetta_table_copy_in_p2(ddp_from_context_ids, p_from_context_ids);
98 
99     ibe_copy_logicalcontent_grp_w.rosetta_table_copy_in_p2(ddp_to_product_ids, p_to_product_ids);
100 
101 
102 
103 
104 
105     -- here's the delegated call to the old PL/SQL routine
106     ibe_copy_logicalcontent_grp.copy_lgl_ctnt(p_api_version,
107       p_init_msg_list,
108       p_commit,
109       p_object_type_code,
110       p_from_product_id,
111       ddp_from_context_ids,
112       ddp_to_product_ids,
113       ddx_copy_status,
114       x_return_status,
115       x_msg_count,
116       x_msg_data);
117 
118     -- copy data back from the local variables to OUT or IN-OUT args, if any
119 
120 
121 
122 
123 
124 
125 
126     ibe_copy_logicalcontent_grp_w.rosetta_table_copy_out_p2(ddx_copy_status, x_copy_status);
127 
128 
129 
130   end;
131 
132   procedure copy_lgl_ctnt(p_api_version  NUMBER
133     , p_init_msg_list  VARCHAR2
134     , p_commit  VARCHAR2
135     , p_object_type_code  VARCHAR2
136     , p_from_product_id  NUMBER
137     , p_from_context_ids JTF_NUMBER_TABLE
138     , p_from_deliverable_ids JTF_NUMBER_TABLE
139     , p_to_product_ids JTF_NUMBER_TABLE
140     , x_copy_status out nocopy JTF_NUMBER_TABLE
141     , x_return_status out nocopy  VARCHAR2
142     , x_msg_count out nocopy  NUMBER
143     , x_msg_data out nocopy  VARCHAR2
144   )
145 
146   as
147     ddp_from_context_ids ibe_copy_logicalcontent_grp.ids_list;
148     ddp_from_deliverable_ids ibe_copy_logicalcontent_grp.ids_list;
149     ddp_to_product_ids ibe_copy_logicalcontent_grp.ids_list;
150     ddx_copy_status ibe_copy_logicalcontent_grp.ids_list;
151     ddindx binary_integer; indx binary_integer;
152   begin
153 
154     -- copy data to the local IN or IN-OUT args, if any
155 
156 
157 
158 
159 
160     ibe_copy_logicalcontent_grp_w.rosetta_table_copy_in_p2(ddp_from_context_ids, p_from_context_ids);
161 
162     ibe_copy_logicalcontent_grp_w.rosetta_table_copy_in_p2(ddp_from_deliverable_ids, p_from_deliverable_ids);
163 
164     ibe_copy_logicalcontent_grp_w.rosetta_table_copy_in_p2(ddp_to_product_ids, p_to_product_ids);
165 
166 
167 
168 
169 
170     -- here's the delegated call to the old PL/SQL routine
171     ibe_copy_logicalcontent_grp.copy_lgl_ctnt(p_api_version,
172       p_init_msg_list,
173       p_commit,
174       p_object_type_code,
175       p_from_product_id,
176       ddp_from_context_ids,
177       ddp_from_deliverable_ids,
178       ddp_to_product_ids,
179       ddx_copy_status,
180       x_return_status,
181       x_msg_count,
182       x_msg_data);
183 
184     -- copy data back from the local variables to OUT or IN-OUT args, if any
185 
186 
187 
188 
189 
190 
191 
192 
193     ibe_copy_logicalcontent_grp_w.rosetta_table_copy_out_p2(ddx_copy_status, x_copy_status);
194 
195 
196 
197   end;
198 
199 end ibe_copy_logicalcontent_grp_w;