1 package body jtf_rs_role_relate_pub_w as
2 /* $Header: jtfrsreb.pls 120.0 2005/05/11 08:21:34 appldev 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 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_resource_role_relate(p_api_version NUMBER
23 , p_init_msg_list VARCHAR2
24 , p_commit VARCHAR2
25 , p_role_resource_type VARCHAR2
26 , p_role_resource_id NUMBER
27 , p_role_id NUMBER
28 , p_role_code VARCHAR2
29 , p_start_date_active date
30 , p_end_date_active date
31 , x_return_status out NOCOPY VARCHAR2
32 , x_msg_count out NOCOPY NUMBER
33 , x_msg_data out NOCOPY VARCHAR2
34 , x_role_relate_id out NOCOPY NUMBER
35 )
36 as
37 ddp_start_date_active date;
38 ddp_end_date_active date;
39 ddindx binary_integer; indx binary_integer;
40 begin
41
42 -- copy data to the local IN or IN-OUT args, if any
43
44
45
46
47
48
49
50 ddp_start_date_active := rosetta_g_miss_date_in_map(p_start_date_active);
51
52 ddp_end_date_active := rosetta_g_miss_date_in_map(p_end_date_active);
53
54
55
56
57
58 -- here's the delegated call to the old PL/SQL routine
59 jtf_rs_role_relate_pub.create_resource_role_relate(p_api_version,
60 p_init_msg_list,
61 p_commit,
62 p_role_resource_type,
63 p_role_resource_id,
64 p_role_id,
65 p_role_code,
66 ddp_start_date_active,
67 ddp_end_date_active,
68 x_return_status,
69 x_msg_count,
70 x_msg_data,
71 x_role_relate_id);
72
73 -- copy data back from the local OUT or IN-OUT args, if any
74
75
76
77
78
79
80
81
82
83
84
85
86 end;
87
88 procedure update_resource_role_relate(p_api_version NUMBER
89 , p_init_msg_list VARCHAR2
90 , p_commit VARCHAR2
91 , p_role_relate_id NUMBER
92 , p_start_date_active date
93 , p_end_date_active date
94 , p_object_version_num in out NOCOPY NUMBER
95 , x_return_status out NOCOPY VARCHAR2
96 , x_msg_count out NOCOPY NUMBER
97 , x_msg_data out NOCOPY VARCHAR2
98 )
99 as
100 ddp_start_date_active date;
101 ddp_end_date_active date;
102 ddindx binary_integer; indx binary_integer;
103 begin
104
105 -- copy data to the local IN or IN-OUT args, if any
106
107
108
109
110 ddp_start_date_active := rosetta_g_miss_date_in_map(p_start_date_active);
111
112 ddp_end_date_active := rosetta_g_miss_date_in_map(p_end_date_active);
113
114
115
116
117
118 -- here's the delegated call to the old PL/SQL routine
119 jtf_rs_role_relate_pub.update_resource_role_relate(p_api_version,
120 p_init_msg_list,
121 p_commit,
122 p_role_relate_id,
123 ddp_start_date_active,
124 ddp_end_date_active,
125 p_object_version_num,
126 x_return_status,
127 x_msg_count,
128 x_msg_data);
129
130 -- copy data back from the local OUT or IN-OUT args, if any
131
132
133
134
135
136
137
138
139
140 end;
141
142 end jtf_rs_role_relate_pub_w;