1 PACKAGE BODY ICX_SR_CUSTOM_PVT AS
2 /* $Header: ICXVSRB.pls 115.0 99/07/17 03:30:31 porting ship $ */
3
4 g_pkg_name constant varchar2(30) := 'ICX_SR_CUSTOM_PVT';
5
6
7 PROCEDURE sr_default(p_api_version in number,
8 p_init_msg_list in varchar2 default fnd_api.g_false,
9 p_simulate in varchar2 default fnd_api.g_false,
10 p_commit in varchar2 default fnd_api.g_false,
11 p_validation_level in number default fnd_api.g_valid_level_full,
12 p_return_status out varchar2,
13 p_msg_count out number,
14 p_msg_data out varchar2,
15 p_customer_id out number,
16 p_customer_name out varchar2,
17 p_cust_contact_id out number,
18 p_cust_contact_name out varchar2,
19 p_cust_contact_area_code out varchar2,
20 p_cust_contact_phone out varchar2,
21 p_cust_contact_extension out varchar2,
22 p_cust_contact_fax_area_code out varchar2,
23 p_cust_contact_fax out varchar2,
24 p_cust_contact_email out varchar2,
25 p_install_addr1 out varchar2,
26 p_install_addr2 out varchar2,
27 p_install_addr3 out varchar2,
28 p_inventory_item_id out number,
29 p_inventory_item out varchar2,
30 p_serial_number out varchar2,
31 p_order_number out number,
32 p_customer_product_id out number,
33 p_problem_desc out varchar2,
34 p_summary out varchar2,
35 p_urgency_id out number,
36 p_incident_comment out varchar2) is
37
38 l_api_name constant varchar2(30) := 'SR_DEFAULT';
39 l_api_version constant number := 1.0;
40
41 begin
42
43 -- Standard start of API savepoint
44 SAVEPOINT SR_DEFAULT_PVT;
45
46 -- Standard call to check for call compatibility
47 if not fnd_api.Compatible_API_Call(l_api_version,
48 p_api_version,
49 l_api_name,
50 g_pkg_name) then
51
52 raise fnd_api.g_exc_unexpected_error;
53 end if;
54
55
56 -- Initialize message list if p_init_msg_list is TRUE
57 if fnd_api.to_boolean(p_init_msg_list) then
58 fnd_msg_pub.initialize;
59 end if;
60
61 -- Initialize API return status to success
62 p_return_status := fnd_api.g_ret_sts_success;
63
64 -- *******************************************************************
65 -- API body
66 -- Put custom code here
67 -- *******************************************************************
68
69
70 -- *******************************************************************
71 -- end API body
72 -- *******************************************************************
73
74
75 -- Standard check of p_simulate and p_commit parameters
76 if fnd_api.to_boolean(p_simulate) then
77 ROLLBACK to SR_DEFAULT_PVT;
78
79 elsif fnd_api.to_boolean(p_commit) then
80 COMMIT WORK;
81
82 end if;
83
84 -- Standard call to get message count and if count=1, get message info
85 fnd_msg_pub.count_and_get(p_count => p_msg_count,
86 p_data => p_msg_data);
87
88 exception
89 when fnd_api.g_exc_error then
90 ROLLBACK to SR_DEFAULT_PVT;
91 p_return_status := fnd_api.g_ret_sts_error;
92
93 fnd_msg_pub.count_and_get(p_count => p_msg_count,
94 p_data => p_msg_data);
95
96
97 when fnd_api.g_exc_unexpected_error then
98 ROLLBACK to SR_DEFAULT_PVT;
99 p_return_status := fnd_api.g_ret_sts_unexp_error;
100
101 fnd_msg_pub.count_and_get(p_count => p_msg_count,
102 p_data => p_msg_data);
103
104 when others then
105 ROLLBACK to SR_DEFAULT_PVT;
106 p_return_status := fnd_api.g_ret_sts_unexp_error;
107
108 if fnd_msg_pub.Check_Msg_Level(fnd_msg_pub.g_msg_lvl_unexp_error) then
109 fnd_msg_pub.Add_Exc_Msg(g_pkg_name,
110 l_api_name);
111 end if;
112
113 fnd_msg_pub.count_and_get(p_count => p_msg_count,
114 p_data => p_msg_data);
115
116
117 end sr_default;
118
119
120
121
122 PROCEDURE sr_validate(p_api_version in number,
123 p_init_msg_list in varchar2 default fnd_api.g_false,
124 p_simulate in varchar2 default fnd_api.g_false,
125 p_commit in varchar2 default fnd_api.g_false,
126 p_validation_level in number default fnd_api.g_valid_level_full,
127 p_submit_type in varchar2 default null,
128 p_incident_id in number default null,
129 p_request_number in varchar2 default null,
130 p_customer_id in number default null,
131 p_customer_name in varchar2 default null,
132 p_cust_contact_id in number default null,
133 p_cust_contact_name in varchar2 default null,
134 p_cust_contact_area_code in varchar2 default null,
135 p_cust_contact_phone in varchar2 default null,
136 p_cust_contact_extension in varchar2 default null,
137 p_cust_contact_fax_area_code in varchar2 default null,
138 p_cust_contact_fax in varchar2 default null,
139 p_cust_contact_email in varchar2 default null,
140 p_install_addr1 in varchar2 default null,
141 p_install_addr2 in varchar2 default null,
142 p_install_addr3 in varchar2 default null,
143 p_inventory_item_id in number default null,
144 p_inventory_item in varchar2 default null,
145 p_serial_number in varchar2 default null,
146 p_order_number in number default null,
147 p_customer_product_id in number default null,
148 p_problem_desc in varchar2 default null,
149 p_summary in varchar2 default null,
150 p_urgency_id in number default null,
151 p_incident_comment in varchar2 default null,
152 p_return_status out varchar2,
153 p_msg_count out number,
154 p_msg_data out varchar2) is
155
156 l_api_name constant varchar2(30) := 'SR_VALIDATE';
157 l_api_version constant number := 1.0;
158
159 begin
160
161
162
163 -- Standard start of API savepoint
164 SAVEPOINT SR_VALIDATE_PVT;
165
166 -- Standard call to check for call compatibility
167 if not fnd_api.Compatible_API_Call(l_api_version,
168 p_api_version,
169 l_api_name,
170 g_pkg_name) then
171
172 raise fnd_api.g_exc_unexpected_error;
173 end if;
174
175
176 -- Initialize message list if p_init_msg_list is TRUE
177 if fnd_api.to_boolean(p_init_msg_list) then
178 fnd_msg_pub.initialize;
179 end if;
180
181 -- Initialize API return status to success
182 p_return_status := fnd_api.g_ret_sts_success;
183
184 -- *******************************************************************
185 -- API body
186 -- Put custom code here
187 -- *******************************************************************
188
189
190 -- *******************************************************************
191 -- end API body
192 -- *******************************************************************
193
194
195 -- Standard check of p_simulate and p_commit parameters
196 if fnd_api.to_boolean(p_simulate) then
197 ROLLBACK to SR_VALIDATE_PVT;
198
199 elsif fnd_api.to_boolean(p_commit) then
200 COMMIT WORK;
201
202 end if;
203
204 -- Standard call to get message count and if count=1, get message info
205 fnd_msg_pub.count_and_get(p_count => p_msg_count,
206 p_data => p_msg_data);
207
208 exception
209 when fnd_api.g_exc_error then
210 ROLLBACK to SR_VALIDATE_PVT;
211 p_return_status := fnd_api.g_ret_sts_error;
212
213 fnd_msg_pub.count_and_get(p_count => p_msg_count,
214 p_data => p_msg_data);
215
216
217 when fnd_api.g_exc_unexpected_error then
218 ROLLBACK to SR_VALIDATE_PVT;
219 p_return_status := fnd_api.g_ret_sts_unexp_error;
220
221 fnd_msg_pub.count_and_get(p_count => p_msg_count,
222 p_data => p_msg_data);
223
224 when others then
225 ROLLBACK to SR_VALIDATE_PVT;
226 p_return_status := fnd_api.g_ret_sts_unexp_error;
227
228 if fnd_msg_pub.Check_Msg_Level(fnd_msg_pub.g_msg_lvl_unexp_error) then
229 fnd_msg_pub.Add_Exc_Msg(g_pkg_name,
230 l_api_name);
231 end if;
232
233 fnd_msg_pub.Count_And_Get(p_count => p_msg_count,
234 p_data => p_msg_data);
235
236
237 end sr_validate;
238
239
240
241
242
243 END ICX_SR_CUSTOM_PVT;