DBA Data[Home] [Help]

PACKAGE BODY: APPS.JTF_RS_GROUP_RELATE_PUB_W

Source


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