[Home] [Help]
PACKAGE BODY: APPS.PA_PAGE_LAYOUT_PUB
Source
1 package body PA_PAGE_LAYOUT_PUB as
2 /* $Header: PAPRPLPB.pls 120.1 2005/08/19 16:44:41 mwasowic noship $ */
3
4 --History
5 -- 16-Feb-2004 svenketa - Modified, Added a parameter p_function_name for create and update.
6 -- 06-Sep-2004 smekala - Modified the Cursor c_menu_home_default to increase the performance
7 -- Bug 3693907
8
9 PROCEDURE Create_Page_Layout
10 (
11 p_api_version IN NUMBER := 1.0,
12 p_init_msg_list IN VARCHAR2 := fnd_api.g_true,
13 p_commit IN VARCHAR2 := FND_API.g_false,
14 p_validate_only IN VARCHAR2 := FND_API.g_true,
15 p_max_msg_count IN NUMBER := FND_API.g_miss_num,
16
17 p_page_name IN VARCHAR2 := FND_API.g_miss_char,
18
19 p_page_type IN VARCHAR2 := FND_API.g_miss_char,
20
21 p_description IN VARCHAR2 := FND_API.g_miss_char,
22
23 p_start_date IN DATE ,
24
25 p_end_date IN DATE := null,
26 p_shortcut_menu_id IN NUMBER := FND_API.g_miss_num,
27 p_shortcut_menu_name IN VARCHAR2 := NULL,
28 p_function_name IN VARCHAR2,
29 x_page_id OUT NOCOPY NUMBER, --File.Sql.39 bug 4440895
30 x_return_status OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
31 x_msg_count OUT NOCOPY NUMBER, --File.Sql.39 bug 4440895
32 x_msg_data OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
33 ) IS
34
35 l_msg_index_out NUMBER;
36 l_page_type VARCHAR2(30);
37
38
39 -- Bug #3302984
40 prj_menu_name VARCHAR2(100) := 'PA_SHORTCUTS_MENU';
41 team_menu_name VARCHAR2(100) := 'PA_SHORTCUTS_MENU_TM';
42 l_prj_menu_id NUMBER;
43 l_team_menu_id NUMBER;
44 l_shortcut_menu_name VARCHAR2(100);
45 l_shortcut_menu_id NUMBER;
46
47 /* Code Modification done to increase the performance as per Bug3693907 */
48
49 cursor c_menu_home_default(c_menu_name varchar2) is
50 select menu_id from fnd_menus where menu_name = c_menu_name; -- #Bug 3693907
51
52 /* Code Changes for Bug 3693907 end here */
53
54 BEGIN
55
56 -- Initialize the Error Stack
57 PA_DEBUG.init_err_stack('PA_PAGE_LAYOUT_PUB.Create_Page_Layout');
58
59 -- Initialize the return status to success
60 x_return_status := FND_API.G_RET_STS_SUCCESS;
61
62 --Clear the global PL/SQL message table
63 IF FND_API.TO_BOOLEAN( p_init_msg_list ) THEN
64 FND_MSG_PUB.initialize;
65 END IF;
66
67 IF p_page_type = FND_API.g_miss_char THEN
68 l_page_type := 'PPR';
69 ELSE
70 l_page_type := p_page_type;
71 END IF;
72
73
74 --Bug#3302984
75 if ((p_page_type is not null)and(p_shortcut_menu_id is null))then
76 if (p_page_type = 'PH')then
77 open c_menu_home_default(prj_menu_name);
78 fetch c_menu_home_default into l_prj_menu_id;
79 l_shortcut_menu_name := prj_menu_name;
80 l_shortcut_menu_id := l_prj_menu_id;
81 close c_menu_home_default;
82
83 elsif(p_page_type = 'TM') then
84 open c_menu_home_default(team_menu_name);
85 fetch c_menu_home_default into l_team_menu_id;
86 l_shortcut_menu_name := team_menu_name;
87 l_shortcut_menu_id := l_team_menu_id;
88 close c_menu_home_default;
89
90 end if;
91
92 else
93 l_shortcut_menu_name := p_shortcut_menu_name;
94 l_shortcut_menu_id := p_shortcut_menu_id;
95 end if;
96 pa_page_layout_pvt.Create_Page_Layout
97 (
98 p_api_version => p_api_version,
99 p_init_msg_list => p_init_msg_list,
100 p_commit => p_commit,
101 p_validate_only => p_validate_only,
102 p_max_msg_count => p_max_msg_count,
103 p_page_name => p_page_name,
104 p_page_type => l_page_type,
105 p_description => p_description,
106 p_start_date => p_start_date,
107 p_end_date => p_end_date,
108 p_shortcut_menu_id => l_shortcut_menu_id,
109 p_shortcut_menu_name => l_shortcut_menu_name,
110 p_function_name => p_function_name,
111 x_page_id => x_page_id,
112 x_return_status => x_return_status,
113 x_msg_count => x_msg_count,
114 x_msg_data => x_msg_data
115 );
116
117 --
118 -- IF the number of messaages is 1 then fetch the message code from the stack
119 -- and return its text
120 --
121
122 x_msg_count := FND_MSG_PUB.Count_Msg;
123 IF x_msg_count = 1 THEN
124 pa_interface_utils_pub.get_messages ( p_encoded => FND_API.G_TRUE
125 ,p_msg_index => 1
126 ,p_data => x_msg_data
127 ,p_msg_index_out => l_msg_index_out
128 );
129 END IF;
130
131 -- Reset the error stack when returning to the calling program
132 PA_DEBUG.Reset_Err_Stack;
133
134 --commit;
135
136 -- Put any message text from message stack into the Message ARRAY
137
138 EXCEPTION
139 WHEN OTHERS THEN
140 rollback;
141
142 -- Set the excetption Message and the stack
143 FND_MSG_PUB.add_exc_msg ( p_pkg_name => 'PA_PAGE_LAYOUT_PUB.Create_Page_Layout'
144 ,p_procedure_name => PA_DEBUG.G_Err_Stack );
145 --
146 x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
147 RAISE; -- This is optional depending on the needs
148
149 END create_page_layout;
150
151
152
153 PROCEDURE Update_Page_Layout
154 (
155 p_api_version IN NUMBER := 1.0,
156 p_init_msg_list IN VARCHAR2 := fnd_api.g_true,
157 p_commit IN VARCHAR2 := FND_API.g_false,
158 p_validate_only IN VARCHAR2 := FND_API.g_true,
159 p_max_msg_count IN NUMBER := FND_API.g_miss_num,
160
161 p_page_id IN NUMBER := null,
162
163 p_page_name IN VARCHAR2 := FND_API.g_miss_char,
164
165 -- p_page_type IN VARCHAR2 := FND_API.g_miss_char,
166
167 p_description IN VARCHAR2 := FND_API.g_miss_char,
168
169 p_start_date IN DATE := null,
170
171 p_end_date IN DATE := null,
172 p_shortcut_menu_id IN NUMBER := FND_API.g_miss_num,
173 p_shortcut_menu_name IN VARCHAR2 := NULL,
174 p_record_version_number IN NUMBER := null,
175 p_function_name IN VARCHAR2,
176 x_return_status OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
177 x_msg_count OUT NOCOPY NUMBER, --File.Sql.39 bug 4440895
178 x_msg_data OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
179 ) IS
180
181 l_msg_index_out NUMBER;
182 BEGIN
183
184 -- Initialize the Error Stack
185 PA_DEBUG.init_err_stack('PA_PAGE_LAYOUT_PUB.Update_Page_Layout');
186
187 -- Initialize the return status to success
188 x_return_status := FND_API.G_RET_STS_SUCCESS;
189
190 --Clear the global PL/SQL message table
191 IF FND_API.TO_BOOLEAN( p_init_msg_list ) THEN
192 FND_MSG_PUB.initialize;
193 END IF;
194
195
196 pa_page_layout_pvt.Update_Page_Layout
197 (
198 p_api_version => p_api_version,
199 p_init_msg_list => p_init_msg_list,
200 p_commit => p_commit,
201 p_validate_only => p_validate_only,
202 p_max_msg_count => p_max_msg_count,
203 p_page_id => p_page_id,
204 p_page_name => p_page_name,
205 -- p_page_type => p_page_type,
206 p_description => p_description,
207 p_start_date => p_start_date,
208 p_end_date => p_end_date,
209 p_shortcut_menu_id => p_shortcut_menu_id,
210 p_shortcut_menu_name => p_shortcut_menu_name,
211 p_record_version_number => p_record_version_number,
212 p_function_name => p_function_name,
213 x_return_status => x_return_status,
214 x_msg_count => x_msg_count,
215 x_msg_data => x_msg_data
216 );
217
218
219
220 --
221 -- IF the number of messaages is 1 then fetch the message code from the
222 -- stack and return its text
223 --
224 x_msg_count := FND_MSG_PUB.Count_Msg;
225 IF x_msg_count = 1 THEN
226 pa_interface_utils_pub.get_messages ( p_encoded => FND_API.G_TRUE
227 ,p_msg_index => 1
228 ,p_data => x_msg_data
229 ,p_msg_index_out => l_msg_index_out
230 );
231 END IF;
232
233
234 -- Reset the error stack when returning to the calling program
235 PA_DEBUG.Reset_Err_Stack;
236
237
238 -- Put any message text from message stack into the Message ARRAY
239 EXCEPTION
240 WHEN OTHERS THEN
241
242 -- Set the exception Message and the stack
243 FND_MSG_PUB.add_exc_msg ( p_pkg_name => 'PA_PAGE_LAYOUT_PUB.Update_Page_Layout'
244 ,p_procedure_name => PA_DEBUG.G_Err_Stack );
245 --
246 x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
247 RAISE; -- This is optional depending on the needs
248 --
249
250 END update_page_layout;
251
252
253
254 PROCEDURE Delete_Page_Layout
255 (
256 p_api_version IN NUMBER := 1.0,
257 p_init_msg_list IN VARCHAR2 := fnd_api.g_true,
258 p_commit IN VARCHAR2 := FND_API.g_false,
259 p_validate_only IN VARCHAR2 := FND_API.g_true,
260 p_max_msg_count IN NUMBER := FND_API.g_miss_num,
261
262 p_page_id IN NUMBER := null,
263 p_record_version_number IN NUMBER := null,
264
265 x_return_status OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
266 x_msg_count OUT NOCOPY NUMBER, --File.Sql.39 bug 4440895
267 x_msg_data OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
268 ) IS
269
270 l_msg_index_out NUMBER;
271
272 BEGIN
273
274 -- Initialize the Error Stack
275 PA_DEBUG.init_err_stack('PA_PAGE_LAYOUT_PUB.Delete_Page_Layout');
276
277 x_return_status := FND_API.G_RET_STS_SUCCESS;
278
279 --Clear the global PL/SQL message table
280 IF FND_API.TO_BOOLEAN( p_init_msg_list ) THEN
281 FND_MSG_PUB.initialize;
282 END IF;
283
284
285 -- Call the private API
286 PA_PAGE_LAYOUT_PVT.Delete_Page_Layout
287 (
288 p_api_version => p_api_version
289 ,p_init_msg_list => p_init_msg_list
290 ,p_commit => p_commit
291 ,p_validate_only => p_validate_only
292 ,p_max_msg_count => p_max_msg_count
293 ,p_page_id => p_page_id
294 ,p_record_version_number => p_record_version_number
295 ,x_return_status => x_return_status
296 ,x_msg_count => x_msg_count
297 ,x_msg_data => x_msg_data
298 );
299
300 --
301 -- IF the number of messaages is 1 then fetch the message code from the
302 -- stack and return its text
303 --
304 x_msg_count := FND_MSG_PUB.Count_Msg;
305 IF x_msg_count = 1 THEN
306 pa_interface_utils_pub.get_messages ( p_encoded => FND_API.G_TRUE
307 ,p_msg_index => 1
308 ,p_data => x_msg_data
309 ,p_msg_index_out => l_msg_index_out
310 );
311 END IF;
312
313
314 -- Reset the error stack when returning to the calling program
315 PA_DEBUG.Reset_Err_Stack;
316
317
318 EXCEPTION
319 WHEN OTHERS THEN
320
321 rollback;
322
323 -- Set the excetption Message and the stack
324 FND_MSG_PUB.add_exc_msg( p_pkg_name => 'PA_PAGE_LAYOUT_PUB.Delete_Page_Layout'
325 ,p_procedure_name => PA_DEBUG.G_Err_Stack );
326 --
327 x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
328 RAISE; -- This is optional depending on the needs
329
330 END delete_page_layout;
331
332 procedure ADD_PAGE_REGION (
333 p_api_version IN NUMBER := 1.0,
334 p_init_msg_list IN VARCHAR2 := fnd_api.g_true,
335 p_commit IN VARCHAR2 := FND_API.g_false,
336 p_validate_only IN VARCHAR2 := FND_API.g_true,
337 p_max_msg_count IN NUMBER := FND_API.g_miss_num,
338
339 P_PAGE_ID in NUMBER := null,
340 P_REGION_SOURCE_TYPE in VARCHAR2 default 'STD',
341 P_REGION_SOURCE_CODE in VARCHAR2,
342 P_VIEW_REGION_CODE in VARCHAR2 := null,
343 P_EDIT_REGION_CODE in VARCHAR2 := null,
344 P_REGION_STYLE in VARCHAR2 := null,
345 P_DISPLAY_ORDER in NUMBER := null,
346 x_return_status OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
347 x_msg_count OUT NOCOPY NUMBER, --File.Sql.39 bug 4440895
348 x_msg_data OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
349 ) IS
350
351 l_msg_index_out NUMBER;
352
353 l_view_region_code VARCHAR2(250) := p_view_region_code;
354 l_edit_region_code VARCHAR2(250) := p_edit_region_code;
355 l_region_style VARCHAR2(30) := p_region_style;
356
357 CURSOR get_region_info IS
358 SELECT pptr.view_region_code,
359 pptr.edit_region_code,
360 pptr.region_style
361 FROM pa_page_type_regions pptr,
362 pa_page_layouts ppl
363 WHERE pptr.page_type_code = ppl.page_type_code
364 AND ppl.page_id = p_page_id
365 and pptr.region_source_type = p_region_source_type
366 and pptr.region_source_code = p_region_source_code;
367
368
369 BEGIN
370
371 -- Initialize the Error Stack
372 PA_DEBUG.init_err_stack('PA_PAGE_LAYOUT_PUB.Add_Page_Region');
373
374 -- Initialize the return status to success
375 x_return_status := FND_API.G_RET_STS_SUCCESS;
376
377 --Clear the global PL/SQL message table
378 IF FND_API.TO_BOOLEAN( p_init_msg_list ) THEN
379 FND_MSG_PUB.initialize;
380 END IF;
381
382 --debug_msg_s1('***p_view_region_code ' || p_view_region_code);
383 --debug_msg_s1('***p_view_region_code ' || p_region_source_type);
384 --debug_msg_s1('***p_view_region_code ' || p_region_source_code);
385
386
387 IF (p_view_region_code IS NULL ) THEN
388 OPEN get_region_info;
392 -- debug_msg_s1('p***_edit_region_code ' || l_region_style);
389 FETCH get_region_info INTO l_view_region_code, l_edit_region_code, l_region_style;
390 -- debug_msg_s1('***p_edit_region_code ' || l_view_region_code);
391 -- debug_msg_s1('***p_edit_region_code ' || l_edit_region_code);
393 CLOSE get_region_info;
394
395 END IF;
396
397
398 pa_page_layout_pvt.Add_PAGE_REGION
399 (
400 p_api_version => p_api_version,
401 p_init_msg_list => p_init_msg_list,
402 p_commit => p_commit,
403 p_validate_only => p_validate_only,
404 p_max_msg_count => p_max_msg_count,
405 p_page_id => p_page_id,
406 p_region_source_type => p_region_source_type,
407 p_region_source_code => p_region_source_code,
408 p_view_region_code => l_view_region_code,
409 p_edit_region_code => l_edit_region_code,
410 p_region_style => l_region_style,
411 p_display_order => p_display_order,
412 x_return_status => x_return_status,
413 x_msg_count => x_msg_count,
414 x_msg_data => x_msg_data
415 );
416
417 --
418 -- IF the number of messaages is 1 then fetch the message code from the stack
419 -- and return its text
420 --
421
422 x_msg_count := FND_MSG_PUB.Count_Msg;
423 IF x_msg_count = 1 THEN
424 pa_interface_utils_pub.get_messages ( p_encoded => FND_API.G_TRUE
425 ,p_msg_index => 1
426 ,p_data => x_msg_data
427 ,p_msg_index_out => l_msg_index_out
428 );
429 END IF;
430
431 -- Reset the error stack when returning to the calling program
432 PA_DEBUG.Reset_Err_Stack;
433
434 --commit;
435
436 -- Put any message text from message stack into the Message ARRAY
437 EXCEPTION
438 WHEN OTHERS THEN
439 rollback;
440
441 -- Set the excetption Message and the stack
442 FND_MSG_PUB.add_exc_msg ( p_pkg_name => 'PA_PAGE_LAYOUT_PUB.ADD_Page_Region'
443 ,p_procedure_name => PA_DEBUG.G_Err_Stack );
444 --
445 x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
446 RAISE; -- This is optional depending on the needs
447
448 END add_page_region;
449
450 PROCEDURE Delete_Page_Region
451 (
452 p_api_version IN NUMBER := 1.0,
453 p_init_msg_list IN VARCHAR2 := fnd_api.g_true,
454 p_commit IN VARCHAR2 := FND_API.g_false,
455 p_validate_only IN VARCHAR2 := FND_API.g_true,
456 p_max_msg_count IN NUMBER := FND_API.g_miss_num,
457
458 p_page_id IN NUMBER := null,
459 P_REGION_SOURCE_TYPE in VARCHAR2 := 'STD',
460 P_REGION_SOURCE_CODE in VARCHAR2,
461 p_record_version_number IN NUMBER := null,
462 x_return_status OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
463 x_msg_count OUT NOCOPY NUMBER, --File.Sql.39 bug 4440895
464 x_msg_data OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
465 ) IS
466
467 l_msg_index_out NUMBER;
468 BEGIN
469
470 -- Initialize the Error Stack
471 PA_DEBUG.init_err_stack('PA_PAGE_LAYOUT_PUB.Delete_Page_Region');
472
473 -- Initialize the return status to success
474 x_return_status := FND_API.G_RET_STS_SUCCESS;
475
476 --Clear the global PL/SQL message table
477 IF FND_API.TO_BOOLEAN( p_init_msg_list ) THEN
478 FND_MSG_PUB.initialize;
479 END IF;
480
481 pa_page_layout_pvt.Delete_Page_Region
482 (
483 p_api_version => p_api_version,
484 p_init_msg_list => p_init_msg_list,
485 p_commit => p_commit,
486 p_validate_only => p_validate_only,
487 p_max_msg_count => p_max_msg_count,
488 p_page_id => p_page_id,
489 p_region_source_type => p_region_source_type,
490 p_region_source_code => p_region_source_code,
491 p_record_version_number => p_record_version_number,
492 x_return_status => x_return_status,
493 x_msg_count => x_msg_count,
494 x_msg_data => x_msg_data
495 );
496
497
498
499 --
500 -- IF the number of messaages is 1 then fetch the message code from the
501 -- stack and return its text
502 --
503 x_msg_count := FND_MSG_PUB.Count_Msg;
504 IF x_msg_count = 1 THEN
505 pa_interface_utils_pub.get_messages ( p_encoded => FND_API.G_TRUE
506 ,p_msg_index => 1
507 ,p_data => x_msg_data
508 ,p_msg_index_out => l_msg_index_out
509 );
510 END IF;
511
512
513 -- Reset the error stack when returning to the calling program
514 PA_DEBUG.Reset_Err_Stack;
515
516
517 -- Put any message text from message stack into the Message ARRAY
518 EXCEPTION
519 WHEN OTHERS THEN
520
521 -- Set the exception Message and the stack
522 FND_MSG_PUB.add_exc_msg ( p_pkg_name => 'PA_PAGE_LAYOUT_PUB.Delete_Page_Region'
523 ,p_procedure_name => PA_DEBUG.G_Err_Stack );
524 --
525 x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
526 RAISE; -- This is optional depending on the needs
527 --
528
529 END delete_page_region;
530
534 p_init_msg_list IN VARCHAR2 := fnd_api.g_true,
531 PROCEDURE Delete_All_Page_Region
532 (
533 p_api_version IN NUMBER := 1.0,
535 p_commit IN VARCHAR2 := FND_API.g_false,
536 p_validate_only IN VARCHAR2 := FND_API.g_true,
537 p_max_msg_count IN NUMBER := FND_API.g_miss_num,
538
539 p_page_id IN NUMBER := null,
540 p_region_position IN VARCHAR2 := null,
541
542 x_return_status OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
543 x_msg_count OUT NOCOPY NUMBER, --File.Sql.39 bug 4440895
544 x_msg_data OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
545 ) IS
546
547 l_msg_index_out NUMBER;
548 BEGIN
549
550 -- Initialize the Error Stack
551 PA_DEBUG.init_err_stack('PA_PAGE_LAYOUT_PUB.Delete_All_Page_Region');
552
553 -- Initialize the return status to success
554 x_return_status := FND_API.G_RET_STS_SUCCESS;
555
556 --Clear the global PL/SQL message table
557 IF FND_API.TO_BOOLEAN( p_init_msg_list ) THEN
558 FND_MSG_PUB.initialize;
559 END IF;
560
561 pa_page_layout_pvt.Delete_All_Page_Region
562 (
563 p_api_version => p_api_version,
564 p_init_msg_list => p_init_msg_list,
565 p_commit => p_commit,
566 p_validate_only => p_validate_only,
567 p_max_msg_count => p_max_msg_count,
568
569 p_page_id => p_page_id,
570 p_region_position => p_region_position,
571
572 x_return_status => x_return_status,
573 x_msg_count => x_msg_count,
574 x_msg_data => x_msg_data
575 );
576
577
578
579 --
580 -- IF the number of messaages is 1 then fetch the message code from the
581 -- stack and return its text
582 --
583 x_msg_count := FND_MSG_PUB.Count_Msg;
584 IF x_msg_count = 1 THEN
585 pa_interface_utils_pub.get_messages ( p_encoded => FND_API.G_TRUE
586 ,p_msg_index => 1
587 ,p_data => x_msg_data
588 ,p_msg_index_out => l_msg_index_out
589 );
590 END IF;
591
592
593 -- Reset the error stack when returning to the calling program
594 PA_DEBUG.Reset_Err_Stack;
595
596
597 -- Put any message text from message stack into the Message ARRAY
598 EXCEPTION
599 WHEN OTHERS THEN
600
601 -- Set the exception Message and the stack
602 FND_MSG_PUB.add_exc_msg ( p_pkg_name => 'PA_PAGE_LAYOUT_PUB.Delete_All_Page_Region'
603 ,p_procedure_name => PA_DEBUG.G_Err_Stack );
604 --
605 x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
606 RAISE; -- This is optional depending on the needs
607 --
608
609 END delete_all_page_region;
610
611 PROCEDURE Delete_All_link_Page_Region
612 (
613 p_api_version IN NUMBER := 1.0,
614 p_init_msg_list IN VARCHAR2 := fnd_api.g_true,
615 p_commit IN VARCHAR2 := FND_API.g_false,
616 p_validate_only IN VARCHAR2 := FND_API.g_true,
617 p_max_msg_count IN NUMBER := FND_API.g_miss_num,
618
619 p_page_id IN NUMBER := null,
620 p_region_position IN VARCHAR2 := null,
621
622 x_return_status OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
623 x_msg_count OUT NOCOPY NUMBER, --File.Sql.39 bug 4440895
624 x_msg_data OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
625 ) IS
626
627 l_msg_index_out NUMBER;
628 BEGIN
629
630 -- Initialize the Error Stack
631 PA_DEBUG.init_err_stack('PA_PAGE_LAYOUT_PUB.Delete_All_link_Page_Region');
632
633 -- Initialize the return status to success
634 x_return_status := FND_API.G_RET_STS_SUCCESS;
635
636 --Clear the global PL/SQL message table
637 IF FND_API.TO_BOOLEAN( p_init_msg_list ) THEN
638 FND_MSG_PUB.initialize;
639 END IF;
640
641 pa_page_layout_pvt.Delete_All_link_Page_Region
642 (
643 p_api_version => p_api_version,
644 p_init_msg_list => p_init_msg_list,
645 p_commit => p_commit,
646 p_validate_only => p_validate_only,
647 p_max_msg_count => p_max_msg_count,
648
649 p_page_id => p_page_id,
650 p_region_position => p_region_position,
651
652 x_return_status => x_return_status,
653 x_msg_count => x_msg_count,
654 x_msg_data => x_msg_data
655 );
656
657
658
659 --
660 -- IF the number of messaages is 1 then fetch the message code from the
661 -- stack and return its text
662 --
663 x_msg_count := FND_MSG_PUB.Count_Msg;
664 IF x_msg_count = 1 THEN
665 pa_interface_utils_pub.get_messages ( p_encoded => FND_API.G_TRUE
666 ,p_msg_index => 1
667 ,p_data => x_msg_data
668 ,p_msg_index_out => l_msg_index_out
669 );
670 END IF;
671
672
673 -- Reset the error stack when returning to the calling program
674 PA_DEBUG.Reset_Err_Stack;
675
676
677 -- Put any message text from message stack into the Message ARRAY
678 EXCEPTION
679 WHEN OTHERS THEN
680
681 -- Set the exception Message and the stack
682 FND_MSG_PUB.add_exc_msg ( p_pkg_name => 'PA_PAGE_LAYOUT_PUB.Delete_All_link_Page_Region'
683 ,p_procedure_name => PA_DEBUG.G_Err_Stack );
684 --
685 x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
686 RAISE; -- This is optional depending on the needs
687 --
688
689 END delete_all_link_page_region;
690
691
692 END PA_PAGE_LAYOUT_PUB;