DBA Data[Home] [Help]

PACKAGE BODY: APPS.ICX_RESP_EXCL_ATTR_PUB

Source


1 PACKAGE BODY ICX_Resp_Excl_Attr_PUB AS
2 -- $Header: ICXPTREB.pls 115.1 99/07/17 03:21:10 porting ship $
3 
4 PROCEDURE Create_Resp_Excl_Attr
5 (  p_api_version_number		IN	NUMBER,
6    p_init_msg_list		IN	VARCHAR2 := FND_API.G_FALSE,
7    p_simulate			IN	VARCHAR2 := FND_API.G_FALSE,
8    p_commit			IN	VARCHAR2 := FND_API.G_FALSE,
9    p_validation_level		IN	NUMBER   := FND_API.G_VALID_LEVEL_FULL,
10    p_return_status		OUT	VARCHAR2,
11    p_msg_count			OUT	NUMBER,
12    p_msg_data			OUT	VARCHAR2,
13 --   p_msg_entity			OUT	VARCHAR2,
14 --   p_msg_entity_index		OUT	NUMBER,
15    p_responsibility_id		IN	NUMBER,
16    p_application_id		IN	NUMBER,
17    p_attribute_code		IN	VARCHAR2,
18    p_attribute_appl_id		IN	NUMBER,
19    p_created_by			IN	NUMBER,
20    p_creation_date		IN	DATE,
21    p_last_updated_by		IN	NUMBER,
22    p_last_update_date		IN	DATE,
23    p_last_update_login		IN	NUMBER
24 )
25 IS
26    l_api_name		CONSTANT VARCHAR2(30) := 'Create_Resp_Excl_Attr';
27    l_api_version_number	CONSTANT NUMBER	      := 1.0;
28    l_return_status		 VARCHAR2(10);
29 
30    l_dummy_id			 NUMBER;
31    l_duplicate			 NUMBER := 0;
32 
33 BEGIN
34 
35    -- Standard Start of API savepoint
36 
37    SAVEPOINT Create_Resp_Excl_Attr_PUB;
38 
39    -- Standard call to check for call compatibility.
40 
41    if NOT FND_API.Compatible_API_Call
42    (
43 	l_api_version_number,
44 	p_api_version_number,
45 	l_api_name,
46 	G_PKG_NAME
47    )
48    then
49       raise FND_API.G_EXC_UNEXPECTED_ERROR;
50    end if;
51 
52    -- Initialize message list if p_init_msg_list is set to TRUE.
53 
54    if FND_API.to_Boolean( p_init_msg_list)
55    then
56       FND_MSG_PUB.initialize;
57    end if;
58 
59    -- Initialize API return status to success
60 
61    p_return_status := FND_API.G_RET_STS_SUCCESS;
62 
63    -- ***************************
64    -- VALIDATION
65 
66    -- ***************************
67 
68 
69    -- Call private api to create web_user_responsibility
70 
71    ICX_Resp_Excl_Attr_PVT.Create_Resp_Excl_Attr
72    (
73       p_api_version_number	=>	p_api_version_number	,
74       p_init_msg_list		=>	p_init_msg_list		,
75       p_simulate		=>	p_simulate		,
76       p_commit			=>	p_commit		,
77       p_validation_level	=>	p_validation_level	,
78       p_return_status		=>	l_return_status		,
79       p_msg_count		=>	p_msg_count		,
80       p_msg_data		=>	p_msg_data		,
81 --      p_msg_entity		=>	p_msg_entity		,
82 --      p_msg_entity_index	=>	p_msg_entity_index	,
83       p_responsibility_id	=>	p_responsibility_id	,
84       p_application_id		=>	p_application_id	,
85       p_attribute_code		=>	p_attribute_code	,
86       p_attribute_appl_id	=>	p_attribute_appl_id	,
87       p_created_by		=>	p_created_by		,
88       p_creation_date		=>	p_creation_date		,
89       p_last_updated_by		=>	p_last_updated_by	,
90       p_last_update_date	=>	p_last_update_date	,
91       p_last_update_login	=>	p_last_update_login
92    );
93 
94    -- Both G_EXC_ERROR and G_EXC_UNEXPECTED_ERROR are handled in
95    -- the API exception handler.
96 
97    if l_return_status = FND_API.G_RET_STS_UNEXP_ERROR
98    then
99 
100    -- Unexpected error, abort processing.
101 
102       raise FND_API.G_EXC_UNEXPECTED_ERROR;
103 
104    elsif l_return_status = FND_API.G_RET_STS_ERROR THEN
105 
106    -- Error, abort processing
107 
108       raise FND_API.G_EXC_ERROR;
109 
110    end if;
111 
112    -- Standard check of p_simulate and p_commit parameters
113 
114    if FND_API.To_Boolean( p_simulate)
115    then
116       ROLLBACK to Create_Resp_Excl_Attr_PUB;
117 
118    elsif FND_API.To_Boolean( p_commit)
119    then
120       commit work;
121    end if;
122 
123    -- Standard call to get message count and if count is 1, get message info.
124 
125    FND_MSG_PUB.Count_And_Get
126    (
127       p_count		=> p_msg_count,
128       p_data		=> p_msg_data
129    );
130 
131 EXCEPTION
132 
133    WHEN FND_API.G_EXC_ERROR THEN
134 
135       Rollback to Create_Resp_Excl_Attr_PUB;
136       p_return_status := FND_API.G_RET_STS_ERROR;
137 
138       FND_MSG_PUB.Count_And_Get
139       (
140          p_count		=> p_msg_count,
141          p_data			=> p_msg_data
142       );
143 
144    WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
145 
146       Rollback to Create_Resp_Excl_Attr_PUB;
147       p_return_status := FND_API.G_RET_STS_ERROR;
148 
149       FND_MSG_PUB.Count_And_Get
150       (
151          p_count		=> p_msg_count,
152          p_data			=> p_msg_data
153       );
154 
155    WHEN OTHERS THEN
156 
157       Rollback to Create_Resp_Excl_Attr_PUB;
158       p_return_status := FND_API.G_RET_STS_ERROR;
159 
160       if FND_MSG_PUB.Check_Msg_Level( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
161       then
162          FND_MSG_PUB.Add_Exc_Msg
163          (
164             G_FILE_NAME,
165             G_PKG_NAME,
166             l_api_name
167          );
168       end if;
169 
170       FND_MSG_PUB.Count_And_Get
171       (
172          p_count		=> p_msg_count,
173          p_data			=> p_msg_data
174       );
175 
176 end Create_Resp_Excl_Attr;
177 
178 
179 
180 
181 PROCEDURE Delete_Resp_Excl_Attr
182 (  p_api_version_number		IN	NUMBER,
183    p_init_msg_list		IN	VARCHAR2 := FND_API.G_FALSE,
184    p_simulate			IN	VARCHAR2 := FND_API.G_FALSE,
185    p_commit			IN	VARCHAR2 := FND_API.G_FALSE,
186    p_validation_level		IN	NUMBER   := FND_API.G_VALID_LEVEL_FULL,
187    p_return_status		OUT	VARCHAR2,
188    p_msg_count			OUT	NUMBER,
189    p_msg_data			OUT	VARCHAR2,
190 --   p_msg_entity			OUT	VARCHAR2,
191 --   p_msg_entity_index		OUT	NUMBER,
192    p_responsibility_id		IN	NUMBER,
193    p_application_id		IN	NUMBER,
194    p_attribute_code		IN	VARCHAR2,
195    p_attribute_appl_id		IN	NUMBER
196 )
197 IS
198    l_api_name		CONSTANT VARCHAR2(30) := 'Delete_Resp_Excl_Attr';
199    l_api_version_number	CONSTANT NUMBER	      := 1.0;
200    l_return_status		 VARCHAR2(10);
201 
202 BEGIN
203 
204    -- Standard Start of API savepoint
205 
206    SAVEPOINT Delete_Resp_Excl_Attr_PUB;
207 
208    -- Standard call to check for call compatibility.
209 
210    if NOT FND_API.Compatible_API_Call
211    (
212 	l_api_version_number,
213 	p_api_version_number,
214 	l_api_name,
215 	G_PKG_NAME
216    )
217    then
218       raise FND_API.G_EXC_UNEXPECTED_ERROR;
219    end if;
220 
221    -- Initialize message list if p_init_msg_list is set to TRUE.
222 
223    if FND_API.to_Boolean( p_init_msg_list)
224    then
225       FND_MSG_PUB.initialize;
226    end if;
227 
228    -- Initialize API return status to success
229 
230    p_return_status := FND_API.G_RET_STS_SUCCESS;
231 
232    ICX_Resp_Excl_Attr_PVT.Delete_Resp_Excl_Attr
233    (
234       p_api_version_number	=>	p_api_version_number	,
235       p_init_msg_list		=>	p_init_msg_list		,
236       p_simulate		=>	p_simulate		,
237       p_commit			=>	p_commit		,
238       p_validation_level	=>	p_validation_level	,
239       p_return_status		=>	l_return_status		,
240       p_msg_count		=>	p_msg_count		,
241       p_msg_data		=>	p_msg_data		,
242 --      p_msg_entity		=>	p_msg_entity		,
243 --      p_msg_entity_index	=>	p_msg_entity_index	,
244       p_responsibility_id	=>	p_responsibility_id     ,
245       p_application_id		=>	p_application_id	,
246       p_attribute_code		=>	p_attribute_code	,
247       p_attribute_appl_id	=>	p_attribute_appl_id
248    );
249 
250    -- Both G_EXC_ERROR and G_EXC_UNEXPECTED_ERROR are handled in
251    -- the API exception handler.
252 
253    if l_return_status = FND_API.G_RET_STS_UNEXP_ERROR
254    then
255 
256    -- Unexpected error, abort processing.
257 
258       raise FND_API.G_EXC_UNEXPECTED_ERROR;
259 
260    elsif l_return_status = FND_API.G_RET_STS_ERROR THEN
261 
262    -- Error, abort processing
263 
264       raise FND_API.G_EXC_ERROR;
265 
266    end if;
267 
268    -- Standard check of p_simulate and p_commit parameters
269 
270    if FND_API.To_Boolean( p_simulate)
271    then
272       ROLLBACK to Delete_Resp_Excl_Attr_PUB;
273 
274    elsif FND_API.To_Boolean( p_commit)
275    then
276       commit work;
277    end if;
278 
279    -- Standard call to get message count and if count is 1, get message info.
280 
281    FND_MSG_PUB.Count_And_Get
282    (
283       p_count		=> p_msg_count,
284       p_data		=> p_msg_data
285    );
286 
287 EXCEPTION
288 
289    WHEN FND_API.G_EXC_ERROR THEN
290 
291       Rollback to Delete_Resp_Excl_Attr_PUB;
292       p_return_status := FND_API.G_RET_STS_ERROR;
293 
294       FND_MSG_PUB.Count_And_Get
295       (
296          p_count		=> p_msg_count,
297          p_data			=> p_msg_data
298       );
299 
300    WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
301 
302       Rollback to Delete_Resp_Excl_Attr_PUB;
303       p_return_status := FND_API.G_RET_STS_ERROR;
304 
305       FND_MSG_PUB.Count_And_Get
306       (
307          p_count		=> p_msg_count,
308          p_data			=> p_msg_data
309       );
310 
311    WHEN OTHERS THEN
312 
313       Rollback to Delete_Resp_Excl_Attr_PUB;
314       p_return_status := FND_API.G_RET_STS_ERROR;
315 
316       if FND_MSG_PUB.Check_Msg_Level( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
317       then
318          FND_MSG_PUB.Add_Exc_Msg
319          (
320             G_FILE_NAME,
321             G_PKG_NAME,
322             l_api_name
323          );
324       end if;
325 
326       FND_MSG_PUB.Count_And_Get
327       (
328          p_count		=> p_msg_count,
329          p_data			=> p_msg_data
330       );
331 
332 end Delete_Resp_Excl_Attr;
333 
334 
335 END ICX_Resp_Excl_Attr_PUB;