1 package body pv_user_mgmt_pvt_w as
2 /* $Header: pvxwummb.pls 120.7 2006/01/17 13:10 ktsao 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 -- 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_p5(t out nocopy pv_user_mgmt_pvt.partner_types_tbl_type, a0 JTF_VARCHAR2_TABLE_100
23 ) as
24 ddindx binary_integer; indx binary_integer;
25 begin
26 if a0 is not null and a0.count > 0 then
27 if a0.count > 0 then
28 indx := a0.first;
29 ddindx := 1;
30 while true loop
31 t(ddindx).partner_type := a0(indx);
32 ddindx := ddindx+1;
33 if a0.last =indx
34 then exit;
35 end if;
36 indx := a0.next(indx);
37 end loop;
38 end if;
39 end if;
40 end rosetta_table_copy_in_p5;
41 procedure rosetta_table_copy_out_p5(t pv_user_mgmt_pvt.partner_types_tbl_type, a0 out nocopy JTF_VARCHAR2_TABLE_100
42 ) as
43 ddindx binary_integer; indx binary_integer;
44 begin
45 if t is null or t.count = 0 then
46 a0 := JTF_VARCHAR2_TABLE_100();
47 else
48 a0 := JTF_VARCHAR2_TABLE_100();
49 if t.count > 0 then
50 a0.extend(t.count);
51 ddindx := t.first;
52 indx := 1;
53 while true loop
54 a0(indx) := t(ddindx).partner_type;
55 indx := indx+1;
56 if t.last =ddindx
57 then exit;
58 end if;
59 ddindx := t.next(ddindx);
60 end loop;
61 end if;
62 end if;
63 end rosetta_table_copy_out_p5;
64
65 procedure register_partner_and_user(p_api_version_number NUMBER
66 , p_init_msg_list VARCHAR2
67 , p_commit VARCHAR2
68 , p_partner_type VARCHAR2
69 , x_return_status out nocopy VARCHAR2
70 , x_msg_count out nocopy NUMBER
71 , x_msg_data out nocopy VARCHAR2
72 , p3_a0 NUMBER := 0-1962.0724
73 , p3_a1 VARCHAR2 := fnd_api.g_miss_char
74 , p3_a2 VARCHAR2 := fnd_api.g_miss_char
75 , p5_a0 NUMBER := 0-1962.0724
76 , p5_a1 NUMBER := 0-1962.0724
77 , p5_a2 VARCHAR2 := fnd_api.g_miss_char
78 , p5_a3 NUMBER := 0-1962.0724
79 )
80
81 as
82 ddp_partner_rec pv_user_mgmt_pvt.partner_rec_type;
83 ddp_partner_user_rec pv_user_mgmt_pvt.partner_user_rec_type;
84 ddindx binary_integer; indx binary_integer;
85 begin
86
87 -- copy data to the local IN or IN-OUT args, if any
88
89
90
91 ddp_partner_rec.partner_party_id := rosetta_g_miss_num_map(p3_a0);
92 ddp_partner_rec.member_type := p3_a1;
93 ddp_partner_rec.global_prtnr_org_number := p3_a2;
94
95
96 ddp_partner_user_rec.user_id := rosetta_g_miss_num_map(p5_a0);
97 ddp_partner_user_rec.person_rel_party_id := rosetta_g_miss_num_map(p5_a1);
98 ddp_partner_user_rec.user_name := p5_a2;
99 ddp_partner_user_rec.user_type_id := rosetta_g_miss_num_map(p5_a3);
100
101
102
103
104 -- here's the delegated call to the old PL/SQL routine
105 pv_user_mgmt_pvt.register_partner_and_user(p_api_version_number,
106 p_init_msg_list,
107 p_commit,
108 ddp_partner_rec,
109 p_partner_type,
110 ddp_partner_user_rec,
111 x_return_status,
112 x_msg_count,
113 x_msg_data);
114
115 -- copy data back from the local variables to OUT or IN-OUT args, if any
116
117
118
119
120
121
122
123
124 end;
125
126 procedure register_partner_user(p_api_version_number NUMBER
127 , p_init_msg_list VARCHAR2
128 , p_commit VARCHAR2
129 , x_return_status out nocopy VARCHAR2
130 , x_msg_count out nocopy NUMBER
131 , x_msg_data out nocopy VARCHAR2
132 , p3_a0 NUMBER := 0-1962.0724
133 , p3_a1 NUMBER := 0-1962.0724
134 , p3_a2 VARCHAR2 := fnd_api.g_miss_char
135 , p3_a3 NUMBER := 0-1962.0724
136 )
137
138 as
139 ddp_partner_user_rec pv_user_mgmt_pvt.partner_user_rec_type;
140 ddindx binary_integer; indx binary_integer;
141 begin
142
143 -- copy data to the local IN or IN-OUT args, if any
144
145
146
147 ddp_partner_user_rec.user_id := rosetta_g_miss_num_map(p3_a0);
148 ddp_partner_user_rec.person_rel_party_id := rosetta_g_miss_num_map(p3_a1);
149 ddp_partner_user_rec.user_name := p3_a2;
150 ddp_partner_user_rec.user_type_id := rosetta_g_miss_num_map(p3_a3);
151
152
153
154
155 -- here's the delegated call to the old PL/SQL routine
156 pv_user_mgmt_pvt.register_partner_user(p_api_version_number,
157 p_init_msg_list,
158 p_commit,
159 ddp_partner_user_rec,
160 x_return_status,
161 x_msg_count,
162 x_msg_data);
163
164 -- copy data back from the local variables to OUT or IN-OUT args, if any
165
166
167
168
169
170
171 end;
172
173 end pv_user_mgmt_pvt_w;