DBA Data[Home] [Help]

PACKAGE BODY: APPS.PVX_CHANNEL_TYPE_PVT_W

Source


1 package body pvx_channel_type_pvt_w as
2   /* $Header: pvwchnlb.pls 115.6 2002/12/26 16:05:14 vansub ship $ */
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   function rosetta_g_miss_num_map(n number) return number as
7     a number := fnd_api.g_miss_num;
8     b number := 0-1962.0724;
9   begin
10     if n=a then return b; end if;
11     if n=b then return a; end if;
12     return n;
13   end;
14 
15   -- this is to workaround the JDBC bug regarding IN DATE of value GMiss
16   function rosetta_g_miss_date_in_map(d date) return date as
17   begin
18     if d = rosetta_g_mistake_date then return fnd_api.g_miss_date; end if;
19     return d;
20   end;
21 
22   procedure create_channel_type(p_api_version  NUMBER
23     , p_init_msg_list  VARCHAR2
24     , p_commit  VARCHAR2
25     , p_validation_level  NUMBER
26     , x_channel_type_id out nocopy  NUMBER
27     , x_return_status out nocopy  VARCHAR2
28     , x_msg_count out nocopy  NUMBER
29     , x_msg_data out nocopy  VARCHAR2
30     , p4_a0  NUMBER := 0-1962.0724
31     , p4_a1  VARCHAR2 := fnd_api.g_miss_char
32     , p4_a2  VARCHAR2 := fnd_api.g_miss_char
33     , p4_a3  VARCHAR2 := fnd_api.g_miss_char
34     , p4_a4  DATE := fnd_api.g_miss_date
35     , p4_a5  NUMBER := 0-1962.0724
36     , p4_a6  DATE := fnd_api.g_miss_date
37     , p4_a7  NUMBER := 0-1962.0724
38     , p4_a8  NUMBER := 0-1962.0724
39     , p4_a9  NUMBER := 0-1962.0724
40     , p4_a10  NUMBER := 0-1962.0724
41   )
42 
43   as
44     ddp_channel_type_rec pvx_channel_type_pvt.channel_type_rec_type;
45     ddindx binary_integer; indx binary_integer;
46   begin
47 
48     -- copy data to the local IN or IN-OUT args, if any
49 
50 
51 
52 
53     ddp_channel_type_rec.channel_type_id := rosetta_g_miss_num_map(p4_a0);
54     ddp_channel_type_rec.channel_lookup_type := p4_a1;
55     ddp_channel_type_rec.channel_lookup_code := p4_a2;
56     ddp_channel_type_rec.indirect_channel_flag := p4_a3;
57     ddp_channel_type_rec.last_update_date := rosetta_g_miss_date_in_map(p4_a4);
58     ddp_channel_type_rec.last_updated_by := rosetta_g_miss_num_map(p4_a5);
59     ddp_channel_type_rec.creation_date := rosetta_g_miss_date_in_map(p4_a6);
60     ddp_channel_type_rec.created_by := rosetta_g_miss_num_map(p4_a7);
61     ddp_channel_type_rec.last_update_login := rosetta_g_miss_num_map(p4_a8);
62     ddp_channel_type_rec.object_version_number := rosetta_g_miss_num_map(p4_a9);
63     ddp_channel_type_rec.rank := rosetta_g_miss_num_map(p4_a10);
64 
65 
66 
67 
68 
69     -- here's the delegated call to the old PL/SQL routine
70     pvx_channel_type_pvt.create_channel_type(p_api_version,
71       p_init_msg_list,
72       p_commit,
73       p_validation_level,
74       ddp_channel_type_rec,
75       x_channel_type_id,
76       x_return_status,
77       x_msg_count,
78       x_msg_data);
79 
80     -- copy data back from the local variables to OUT or IN-OUT args, if any
81 
82 
83 
84 
85 
86 
87 
88 
89   end;
90 
91   procedure update_channel_type(p_api_version  NUMBER
92     , p_init_msg_list  VARCHAR2
93     , p_commit  VARCHAR2
94     , p_validation_level  NUMBER
95     , x_return_status out nocopy  VARCHAR2
96     , x_msg_count out nocopy  NUMBER
97     , x_msg_data out nocopy  VARCHAR2
98     , p4_a0  NUMBER := 0-1962.0724
99     , p4_a1  VARCHAR2 := fnd_api.g_miss_char
100     , p4_a2  VARCHAR2 := fnd_api.g_miss_char
101     , p4_a3  VARCHAR2 := fnd_api.g_miss_char
102     , p4_a4  DATE := fnd_api.g_miss_date
103     , p4_a5  NUMBER := 0-1962.0724
104     , p4_a6  DATE := fnd_api.g_miss_date
105     , p4_a7  NUMBER := 0-1962.0724
106     , p4_a8  NUMBER := 0-1962.0724
107     , p4_a9  NUMBER := 0-1962.0724
108     , p4_a10  NUMBER := 0-1962.0724
109   )
110 
111   as
112     ddp_channel_type_rec pvx_channel_type_pvt.channel_type_rec_type;
113     ddindx binary_integer; indx binary_integer;
114   begin
115 
116     -- copy data to the local IN or IN-OUT args, if any
117 
118 
119 
120 
121     ddp_channel_type_rec.channel_type_id := rosetta_g_miss_num_map(p4_a0);
122     ddp_channel_type_rec.channel_lookup_type := p4_a1;
123     ddp_channel_type_rec.channel_lookup_code := p4_a2;
124     ddp_channel_type_rec.indirect_channel_flag := p4_a3;
125     ddp_channel_type_rec.last_update_date := rosetta_g_miss_date_in_map(p4_a4);
126     ddp_channel_type_rec.last_updated_by := rosetta_g_miss_num_map(p4_a5);
127     ddp_channel_type_rec.creation_date := rosetta_g_miss_date_in_map(p4_a6);
128     ddp_channel_type_rec.created_by := rosetta_g_miss_num_map(p4_a7);
129     ddp_channel_type_rec.last_update_login := rosetta_g_miss_num_map(p4_a8);
130     ddp_channel_type_rec.object_version_number := rosetta_g_miss_num_map(p4_a9);
131     ddp_channel_type_rec.rank := rosetta_g_miss_num_map(p4_a10);
132 
133 
134 
135 
136     -- here's the delegated call to the old PL/SQL routine
137     pvx_channel_type_pvt.update_channel_type(p_api_version,
138       p_init_msg_list,
139       p_commit,
140       p_validation_level,
141       ddp_channel_type_rec,
142       x_return_status,
143       x_msg_count,
144       x_msg_data);
145 
146     -- copy data back from the local variables to OUT or IN-OUT args, if any
147 
148 
149 
150 
151 
152 
153 
154   end;
155 
156   procedure complete_channel_type_rec(p1_a0 out nocopy  NUMBER
157     , p1_a1 out nocopy  VARCHAR2
158     , p1_a2 out nocopy  VARCHAR2
159     , p1_a3 out nocopy  VARCHAR2
160     , p1_a4 out nocopy  DATE
161     , p1_a5 out nocopy  NUMBER
162     , p1_a6 out nocopy  DATE
163     , p1_a7 out nocopy  NUMBER
164     , p1_a8 out nocopy  NUMBER
165     , p1_a9 out nocopy  NUMBER
166     , p1_a10 out nocopy  NUMBER
167     , p0_a0  NUMBER := 0-1962.0724
168     , p0_a1  VARCHAR2 := fnd_api.g_miss_char
169     , p0_a2  VARCHAR2 := fnd_api.g_miss_char
170     , p0_a3  VARCHAR2 := fnd_api.g_miss_char
171     , p0_a4  DATE := fnd_api.g_miss_date
172     , p0_a5  NUMBER := 0-1962.0724
173     , p0_a6  DATE := fnd_api.g_miss_date
174     , p0_a7  NUMBER := 0-1962.0724
175     , p0_a8  NUMBER := 0-1962.0724
176     , p0_a9  NUMBER := 0-1962.0724
177     , p0_a10  NUMBER := 0-1962.0724
178   )
179 
180   as
181     ddp_channel_type_rec pvx_channel_type_pvt.channel_type_rec_type;
182     ddx_complete_rec pvx_channel_type_pvt.channel_type_rec_type;
183     ddindx binary_integer; indx binary_integer;
184   begin
185 
186     -- copy data to the local IN or IN-OUT args, if any
187     ddp_channel_type_rec.channel_type_id := rosetta_g_miss_num_map(p0_a0);
188     ddp_channel_type_rec.channel_lookup_type := p0_a1;
189     ddp_channel_type_rec.channel_lookup_code := p0_a2;
190     ddp_channel_type_rec.indirect_channel_flag := p0_a3;
191     ddp_channel_type_rec.last_update_date := rosetta_g_miss_date_in_map(p0_a4);
192     ddp_channel_type_rec.last_updated_by := rosetta_g_miss_num_map(p0_a5);
193     ddp_channel_type_rec.creation_date := rosetta_g_miss_date_in_map(p0_a6);
194     ddp_channel_type_rec.created_by := rosetta_g_miss_num_map(p0_a7);
195     ddp_channel_type_rec.last_update_login := rosetta_g_miss_num_map(p0_a8);
196     ddp_channel_type_rec.object_version_number := rosetta_g_miss_num_map(p0_a9);
197     ddp_channel_type_rec.rank := rosetta_g_miss_num_map(p0_a10);
198 
199 
200     -- here's the delegated call to the old PL/SQL routine
201     pvx_channel_type_pvt.complete_channel_type_rec(ddp_channel_type_rec,
202       ddx_complete_rec);
203 
204     -- copy data back from the local variables to OUT or IN-OUT args, if any
205 
206     p1_a0 := rosetta_g_miss_num_map(ddx_complete_rec.channel_type_id);
207     p1_a1 := ddx_complete_rec.channel_lookup_type;
208     p1_a2 := ddx_complete_rec.channel_lookup_code;
209     p1_a3 := ddx_complete_rec.indirect_channel_flag;
210     p1_a4 := ddx_complete_rec.last_update_date;
211     p1_a5 := rosetta_g_miss_num_map(ddx_complete_rec.last_updated_by);
212     p1_a6 := ddx_complete_rec.creation_date;
213     p1_a7 := rosetta_g_miss_num_map(ddx_complete_rec.created_by);
214     p1_a8 := rosetta_g_miss_num_map(ddx_complete_rec.last_update_login);
215     p1_a9 := rosetta_g_miss_num_map(ddx_complete_rec.object_version_number);
216     p1_a10 := rosetta_g_miss_num_map(ddx_complete_rec.rank);
217   end;
218 
219 end pvx_channel_type_pvt_w;