[Home] [Help]
PACKAGE BODY: APPS.POS_SUPP_PUB_RAISE_EVENT_PKG
Source
1 PACKAGE BODY pos_supp_pub_raise_event_pkg AS
2 /* $Header: POSSPPBEB.pls 120.1 2010/11/25 12:13:06 puppulur noship $ */
3 -- Start of comments
4 -- API name : publish_supplier
5 -- Type : Public
6 -- Version : Initial version 1.0
7 -- End of comments
8 FUNCTION rem_first_comma(in_string IN VARCHAR2) RETURN VARCHAR2 IS
9
10 BEGIN
11 IF (TRIM(in_string) IS NOT NULL) THEN
12
13 RETURN substr(in_string, 2, length(in_string));
14 ELSE
15 RETURN in_string;
16 END IF;
17 EXCEPTION
18 WHEN OTHERS THEN
19 RETURN '';
20
21 END;
22
23 PROCEDURE list_to_csv_varchar(x_array IN pos_tbl_number,
24 x_result1 OUT NOCOPY VARCHAR2,
25 x_result2 OUT NOCOPY VARCHAR2,
26 x_result3 OUT NOCOPY VARCHAR2) IS
27
28 -- For longcomments enhancement, Bug 2234299
29 -- changed 'value' type from qa_results.character1%TYPE to varchar2(2000)
30 -- rponnusa Thu Mar 14 21:27:04 PST 2002
31
32 l_value VARCHAR2(2000);
33 c VARCHAR2(10);
34 separator CONSTANT VARCHAR2(1) := ',';
35 arr_index INTEGER;
36 p INTEGER;
37 n INTEGER;
38 l_list_count INTEGER;
39
40 BEGIN
41 --
42 -- Loop until a single ',' is found or x_result is exhausted.
43 --
44 l_list_count := x_array.count;
45 IF l_list_count > 2900 THEN
46
47 FOR i IN 1 .. 2900 LOOP
48
49 x_result1 := x_result1 || separator || x_array(i);
50
51 END LOOP;
52 x_result1 := rem_first_comma(x_result1);
53 IF l_list_count < 5800 THEN
54
55 FOR i IN 2901 .. l_list_count LOOP
56 x_result2 := x_result2 || separator || x_array(i);
57
58 END LOOP;
59 x_result2 := rem_first_comma(x_result2);
60 ELSE
61 FOR i IN 2901 .. 5800 LOOP
62 x_result2 := x_result2 || separator || x_array(i);
63
64 END LOOP;
65 FOR i IN 5801 .. l_list_count LOOP
66 x_result3 := x_result3 || separator || x_array(i);
67
68 END LOOP;
69 x_result2 := rem_first_comma(x_result2);
70 x_result3 := rem_first_comma(x_result3);
71 END IF;
72 ELSE
73 FOR i IN x_array.first .. x_array.last LOOP
74
75 x_result1 := x_result1 || separator || x_array(i);
76
77 END LOOP;
78 x_result1 := rem_first_comma(x_result1);
79 END IF;
80
81 END list_to_csv_varchar;
82
83 PROCEDURE parse_list(x_result IN VARCHAR2,
84 x_array IN OUT NOCOPY pos_tbl_number) IS
85
86 -- For longcomments enhancement, Bug 2234299
87 -- changed 'value' type from qa_results.character1%TYPE to varchar2(2000)
88 -- rponnusa Thu Mar 14 21:27:04 PST 2002
89
90 l_value VARCHAR2(2000);
91 c VARCHAR2(10);
92 separator CONSTANT VARCHAR2(1) := ',';
93 arr_index INTEGER;
94 p INTEGER;
95 n INTEGER;
96 l_array_count INTEGER := 0;
97
98 BEGIN
99 --
100 -- Loop until a single ',' is found or x_result is exhausted.
101 --
102 BEGIN
103
104 l_array_count := x_array.count;
105 EXCEPTION
106 WHEN OTHERS THEN
107 NULL;
108 END;
109 IF l_array_count > 1 THEN
110 arr_index := l_array_count;
111 ELSE
112 arr_index := 1;
113 END IF;
114
115 p := 1;
116 n := length(x_result);
117 WHILE p <= n LOOP
118 c := substr(x_result, p, 1);
119 p := p + 1;
120 IF (c = separator) THEN
121
122 x_array(arr_index) := l_value;
123 arr_index := arr_index + 1;
124 l_value := '';
125 x_array.extend(1);
126 ELSE
127 l_value := l_value || c;
128 END IF;
129
130 END LOOP;
131 x_array(arr_index) := l_value;
132 END parse_list;
133
134 /*#
135 * Use this routine to raise supplier publish event
136 * @param p_api_version The version of API
137 * @param p_init_msg_list The Initialization message list
138 * @param p_party_id The party id
139 * @param p_published_by The published by
140 * @param p_publish_detail The publish details
141 * @param x_publication_event_id The generated publication event id
142 * @param x_actions_request_id The actions request id
143 * @param x_return_status The return status
144 * @param x_msg_count The message count
145 * @param x_msg_data The message data
146 * @rep:scope public
147 * @rep:lifecycle active
148 * @rep:displayname Create Supplier Publication Event
149 * @rep:catagory BUSSINESS_ENTITY AP_SUPPLIER
150 */
151
152 PROCEDURE create_supp_publish_event(p_api_version IN INTEGER,
153 p_init_msg_list IN VARCHAR2,
154 p_party_id IN pos_tbl_number,
155 p_published_by IN INTEGER,
156 p_publish_detail IN VARCHAR,
157 x_publication_event_id OUT NOCOPY NUMBER,
158 x_actions_request_id OUT NOCOPY NUMBER,
159 x_return_status OUT NOCOPY VARCHAR2,
160 x_msg_count OUT NOCOPY NUMBER,
161 x_msg_data OUT NOCOPY VARCHAR2) IS
162 l_user_id NUMBER := fnd_global.user_id;
163 l_last_update_login NUMBER := fnd_global.login_id;
164 l_vendor_id NUMBER := 0;
165 l_actions_request_id NUMBER;
166 l_party_id_cs_1 VARCHAR(32767) := '';
167 l_party_id_cs_2 VARCHAR(32767) := '';
168 l_party_id_cs_3 VARCHAR(32767) := '';
169 x_error_buff VARCHAR(400);
170 x_error_code VARCHAR(2);
171 actions_request_id NUMBER := 0;
172
173 BEGIN
174
175 x_publication_event_id := get_curr_supp_pub_event_id;
176 list_to_csv_varchar(p_party_id,
177 l_party_id_cs_1,
178 l_party_id_cs_2,
179 l_party_id_cs_3);
180
181
182 actions_request_id := fnd_request.submit_request('POS',
183 'POSSUPBO',
184 NULL,
185 NULL,
186 FALSE,
187 l_party_id_cs_1,
188 l_party_id_cs_2,
189 l_party_id_cs_3,
190 p_published_by,
191 p_publish_detail,
192 x_publication_event_id);
193 x_actions_request_id := actions_request_id;
194
195
196 COMMIT;
197 EXCEPTION
198 WHEN fnd_api.g_exc_error THEN
199 ROLLBACK;
200 x_return_status := fnd_api.g_ret_sts_error;
201 x_msg_count := 1;
202 x_msg_data := SQLCODE || SQLERRM;
203 WHEN fnd_api.g_exc_unexpected_error THEN
204 ROLLBACK;
205 x_return_status := fnd_api.g_ret_sts_unexp_error;
206 x_msg_count := 1;
207 x_msg_data := SQLCODE || SQLERRM;
208 WHEN OTHERS THEN
209 ROLLBACK;
210 x_return_status := fnd_api.g_ret_sts_unexp_error;
211 x_msg_count := 1;
212 x_msg_data := SQLCODE || SQLERRM;
213 END create_supp_publish_event;
214
215 -- This routine is used to re raise the already published events
216 PROCEDURE create_supp_publish_event_hist (p_api_version IN INTEGER,
217 p_init_msg_list IN VARCHAR2,
218 p_publication_event_id IN pos_tbl_number,
219 x_return_status OUT NOCOPY VARCHAR2,
220 x_msg_count OUT NOCOPY NUMBER,
221 x_msg_data OUT NOCOPY VARCHAR2) IS
222 l_event_key NUMBER := NULL;
223 l_msg_data Varchar2(30000) := null;
224 l_msg_count NUMBER :=0;
225 l_user_id NUMBER := fnd_global.user_id;
226 l_last_update_login NUMBER := fnd_global.login_id;
227 BEGIN
228
229 FOR i IN p_publication_event_id.first .. p_publication_event_id.last LOOP
230 -- Raising the Workflow event for already published events
231 l_event_key := raise_publish_supplier_event(p_publication_event_id(i));
232 l_msg_data:=l_msg_data||p_publication_event_id(i)||',';
233 l_msg_count:=l_msg_count+1;
234
235 -- Update the Last login details etc., in pos_supp_pub_history table
236 update pos_supp_pub_history set last_updated_by=l_user_id , last_update_date=sysdate,
237 last_update_login=l_last_update_login where publication_event_id=p_publication_event_id(i);
238 commit;
239
240 END LOOP;
241 if (l_msg_count>0) then
242 x_msg_data:=substr(l_msg_data,1,length(l_msg_data)-1);
243 end if;
244 EXCEPTION
245 WHEN OTHERS THEN
246 x_msg_count := 1;
247 x_msg_data := SQLCODE || SQLERRM;
248 END create_supp_publish_event_hist;
249
250 ------------------------------------------
251 /*#
252 * Use this routine to Create Supplier Publication Event Response
253 * @param p_publication_event_id The Publication event id
254 * @param p_party_id The party id
255 * @param p_target_system The target spoke system id
256 * @param p_pub_req_process_id The publication request process id
257 * @param p_pub_req_process_stats The publication request process status
258 * @rep:scope public
259 * @rep:lifecycle active
260 * @rep:displayname Create Supplier Publication Event Response
261 * @rep:catagory BUSSINESS_ENTITY AP_SUPPLIER
262 */
263
264 PROCEDURE create_supp_publish_resp(p_publication_event_id IN NUMBER,
265 p_party_id IN NUMBER,
266 p_target_system IN VARCHAR2,
267 p_pub_req_process_id IN NUMBER,
268 p_pub_req_process_stats IN VARCHAR2) IS
269 l_user_id NUMBER := fnd_global.user_id;
270 l_last_update_login NUMBER := fnd_global.login_id;
271
272
273 BEGIN
274
275 INSERT INTO pos_supp_pub_responses
276 (publication_event_id,
277 target_system,
278 request_process_id,
279 request_process_status,
280 created_by,
281 creation_date,
282 last_updated_by,
283 last_update_date,
284 last_update_login)
285 VALUES
286 (p_publication_event_id,
287 p_target_system,
288 p_pub_req_process_id,
289 p_pub_req_process_stats,
290 l_user_id,
291 SYSDATE,
292 l_user_id,
293 SYSDATE,
294 l_last_update_login);
295 COMMIT;
296 EXCEPTION
297 WHEN OTHERS THEN
298 ROLLBACK;
299 END create_supp_publish_resp;
300
301 --------------------------------------------
302 /*#
303 * Use this routine to Update Supplier Publication Event Response
304 * @param p_api_version The version of API
305 * @param p_init_msg_list The Initialization message list
306 * @param p_commit The commit flag
307 * @param p_validation_level The validation level
308 * @param p_publication_event_id The Publication event id
309 * @param p_party_id The party id
310 * @param p_target_system The target spoke system id
311 * @param p_pub_resp_process_id The publication response process id
312 * @param p_pub_resp_process_stats The publication response process status
313 * @param p_target_system_resp_date The target system response date
314 * @param p_error_message The error messages
315 * @param x_return_status The return status
316 * @param x_msg_count The message count
317 * @param x_msg_data The message data
318 * @rep:scope public
319 * @rep:lifecycle active
320 * @rep:displayname Update Supplier Publication Event Response
321 * @rep:catagory BUSSINESS_ENTITY AP_SUPPLIER
322 */
323 PROCEDURE update_supp_pub_resp(p_api_version IN NUMBER,
324 p_init_msg_list IN VARCHAR2,
325 p_commit IN VARCHAR2,
326 p_validation_level IN NUMBER,
327 p_publication_event_id IN NUMBER,
328 p_party_id IN NUMBER,
329 p_target_system IN NUMBER,
330 p_pub_resp_process_id IN NUMBER,
331 p_pub_resp_process_stats IN VARCHAR2,
332 p_target_system_resp_date IN DATE,
333 p_error_message IN VARCHAR2,
334 x_return_status OUT NOCOPY VARCHAR2,
335 x_msg_count OUT NOCOPY NUMBER,
336 x_msg_data OUT NOCOPY VARCHAR2) IS
337 l_user_id NUMBER := fnd_global.user_id;
338 l_last_update_login NUMBER := fnd_global.login_id;
339 BEGIN
340
341 UPDATE pos_supp_pub_responses
342 SET response_process_id = p_pub_resp_process_id,
343 response_process_status = p_pub_resp_process_id,
344 target_system_response_date = p_target_system_resp_date,
345 error_message = p_error_message,
346 last_updated_by = l_user_id,
347 last_update_date = SYSDATE,
348 last_update_login = l_last_update_login
349 WHERE publication_event_id = p_publication_event_id
350 AND target_system = p_target_system
351 AND publication_event_id = p_publication_event_id
352 AND party_id = p_party_id;
353
354 EXCEPTION
355 WHEN fnd_api.g_exc_error THEN
356 ROLLBACK;
357 x_return_status := fnd_api.g_ret_sts_error;
358 x_msg_count := 1;
362 x_return_status := fnd_api.g_ret_sts_unexp_error;
359 x_msg_data := SQLCODE || SQLERRM;
360 WHEN fnd_api.g_exc_unexpected_error THEN
361 ROLLBACK;
363 x_msg_count := 1;
364 x_msg_data := SQLCODE || SQLERRM;
365 WHEN OTHERS THEN
366 ROLLBACK;
367 x_return_status := fnd_api.g_ret_sts_unexp_error;
368
369 x_msg_count := 1;
370 x_msg_data := SQLCODE || SQLERRM;
371 END update_supp_pub_resp;
372 --------------------------------------
373 FUNCTION raise_publish_supplier_event(p_publication_event_id NUMBER)
374 RETURN NUMBER IS
375
376 l_itemkey NUMBER;
377 l_parameter_list wf_parameter_list_t := wf_parameter_list_t();
378 l_event_name VARCHAR2(50) := 'oracle.apps.pos.supplier.publish';
379 l_message VARCHAR2(50) := NULL;
380
381 CURSOR c IS
382 SELECT POS_SUPP_NOTIFY_WORKFLOW_S.nextval
383 FROM dual;
384
385 BEGIN
386
387 OPEN c;
388 FETCH c
389 INTO l_itemkey;
390 CLOSE c;
391
392 wf_event.addparametertolist(p_name => 'PUBLICATION_EVENT_ID',
393 p_value => p_publication_event_id,
394 p_parameterlist => l_parameter_list);
395
396 wf_event.raise(
397 p_event_name => l_event_name,
398 p_event_key => l_itemkey,
399 p_parameters => l_parameter_list);
400
401 l_parameter_list.DELETE;
402
403 COMMIT;
404 RETURN l_itemkey;
405 EXCEPTION
406 WHEN fnd_api.g_exc_error THEN
407 fnd_file.put_line(fnd_file.log,'Exception:'||SQLCODE ||':'|| SQLERRM);
408 ROLLBACK;
409 WHEN fnd_api.g_exc_unexpected_error THEN
410 fnd_file.put_line(fnd_file.log,'Exception:'||SQLCODE ||':'|| SQLERRM);
411 ROLLBACK;
412 WHEN OTHERS THEN
413 fnd_file.put_line(fnd_file.log,'Exception:'||SQLCODE ||':'|| SQLERRM);
414 ROLLBACK;
415 END raise_publish_supplier_event;
416
417 PROCEDURE populate_bo_and_save_concur(x_errbuf OUT NOCOPY VARCHAR2,
418 x_retcode OUT NOCOPY NUMBER,
419 p_party_id_cs_1 IN VARCHAR2 DEFAULT '',
420 p_party_id_cs_2 IN VARCHAR2 DEFAULT '',
421 p_party_id_cs_3 IN VARCHAR2 DEFAULT '',
422 p_published_by IN VARCHAR2 DEFAULT '',
423 p_publish_detail IN VARCHAR2 DEFAULT '',
424 p_publication_event_id_in IN VARCHAR2 DEFAULT '') IS
425 l_pos_supplier_bo pos_supplier_bo;
426 x_return_status VARCHAR2(100);
427 x_msg_data VARCHAR2(100);
428 x_msg_count NUMBER;
429 l_publication_event_id NUMBER := NULL;
430 p_publication_event_id_out NUMBER := NULL;
431 p_party_id pos_tbl_number := pos_tbl_number();
432 l_event_key NUMBER := NULL;
433 BEGIN
434 SAVEPOINT populate_bo_and_save;
435
436 p_party_id.extend(1);
437
438 IF p_publication_event_id_in IS NULL THEN
439 l_publication_event_id := get_curr_supp_pub_event_id;
440 ELSE
441 l_publication_event_id := p_publication_event_id_in;
442 END IF;
443
444 IF TRIM(p_party_id_cs_1) IS NULL THEN
445 RETURN;
446 END IF;
447 parse_list(p_party_id_cs_1, p_party_id);
448 IF TRIM(p_party_id_cs_2) IS NOT NULL THEN
449 parse_list(p_party_id_cs_2, p_party_id);
450 END IF;
451
452 IF TRIM(p_party_id_cs_3) IS NOT NULL THEN
453 parse_list(p_party_id_cs_3, p_party_id);
454 END IF;
455
456 get_bo_and_insert(p_party_id,
457 l_publication_event_id,
458 p_published_by,
459 p_publish_detail);
460
461 l_event_key := raise_publish_supplier_event(l_publication_event_id);
462 x_retcode := 0;
463 x_errbuf := '';
464 EXCEPTION
465 WHEN fnd_api.g_exc_error THEN
466 ROLLBACK TO populate_bo_and_save;
467 x_return_status := fnd_api.g_ret_sts_error;
468 x_msg_count := 1;
469 x_msg_data := SQLCODE || SQLERRM;
470 fnd_file.put_line(fnd_file.log,'Exception:'||x_msg_data);
471 WHEN fnd_api.g_exc_unexpected_error THEN
472 ROLLBACK TO populate_bo_and_save;
473 x_return_status := fnd_api.g_ret_sts_unexp_error;
474 x_msg_count := 1;
475 x_msg_data := SQLCODE || SQLERRM;
476 fnd_file.put_line(fnd_file.log,'Exception:'||x_msg_data);
477 WHEN OTHERS THEN
478 ROLLBACK TO populate_bo_and_save;
479 x_return_status := fnd_api.g_ret_sts_unexp_error;
480
481 x_msg_count := 1;
482 x_msg_data := SQLCODE || SQLERRM;
483 fnd_file.put_line(fnd_file.log,'Exception:'||x_msg_data);
484 END;
485
486 FUNCTION get_curr_supp_pub_event_id RETURN NUMBER IS
487
488 BEGIN
489 --checking for no zero value for current supplier publication event id, if not zero, then just return it, else find the next sequence and return
490 -- IF g_curr_supp_publish_event_id = 0 THEN
494 --END IF;
491 SELECT pos_supp_pub_event_s.nextval
492 INTO g_curr_supp_publish_event_id
493 FROM dual;
495
496 RETURN g_curr_supp_publish_event_id;
497
498 EXCEPTION
499 WHEN OTHERS THEN
500 RETURN - 1;
501 END;
502
503 PROCEDURE get_bo_and_insert(p_party_id IN pos_tbl_number,
504 p_publication_event_id IN NUMBER,
505 p_published_by IN NUMBER,
506 p_publish_detail IN VARCHAR)
507
508 IS
509 l_user_id NUMBER := fnd_global.user_id;
510 l_last_update_login NUMBER := fnd_global.login_id;
511 l_request_id NUMBER := FND_GLOBAL.CONC_REQUEST_ID;
512 l_pos_supplier_bo pos_supplier_bo;
513 x_return_status VARCHAR2(1000);
514 x_msg_count NUMBER := 0;
515 x_msg_data VARCHAR2(1000);
516 l_xml_data xmltype;
517 l_xml_conversion_stats INTEGER := 0;
518 BEGIN
519
520 FOR i IN p_party_id.first .. p_party_id.last LOOP
521
522 fnd_file.put_line(fnd_file.log,'Extracting the data for the Party Id:'||p_party_id(i));
523
524 pos_supplier_bo_pkg.pos_get_supplier_bo(NULL,
525 NULL,
526 p_party_id(i),
527 NULL,
528 NULL,
529 l_pos_supplier_bo,
530 x_return_status,
531 x_msg_count,
532 x_msg_data);
533
534 l_xml_conversion_stats := 0;
535 BEGIN
536 l_xml_data := xmltype(l_pos_supplier_bo);
537 l_xml_conversion_stats := 1;
538 EXCEPTION
539 WHEN OTHERS THEN
540 RAISE;
541
542 END;
543 IF l_xml_conversion_stats = 0 THEN
544 GOTO exit1;
545 END IF;
546
547 fnd_file.put_line(fnd_file.log,'Inserting the XML Payload into pos_supp_pub_history table');
548 INSERT INTO pos_supp_pub_history
549 (publication_event_id,
550 party_id,
551 publication_date,
552 published_by,
553 publish_detail,
554 xmlcontent,
555 created_by,
556 creation_date,
557 last_updated_by,
558 last_update_date,
559 last_update_login,
560 request_id)
561 VALUES
562 (p_publication_event_id,
563 p_party_id(i),
564 SYSDATE, -- p_publication_date,
565 p_published_by,
566 p_publish_detail,
567 l_xml_data,
568 l_user_id,
569 SYSDATE,
570 l_user_id,
571 SYSDATE,
572 l_last_update_login,
573 l_request_id);
574 /*
575 create_supp_publish_resp(p_publication_event_id,
576 p_party_id(i),
577 '',
578 0,
579 0);
580 */
581 <<exit1>>
582 COMMIT;
583
584 END LOOP;
585 EXCEPTION
586 WHEN fnd_api.g_exc_error THEN
587 ROLLBACK;
588 x_return_status := fnd_api.g_ret_sts_error;
589 x_msg_count := 1;
590 x_msg_data := SQLCODE || SQLERRM;
591 fnd_file.put_line(fnd_file.log,'Exception:'||x_msg_data);
592 WHEN fnd_api.g_exc_unexpected_error THEN
593 ROLLBACK;
594 x_return_status := fnd_api.g_ret_sts_unexp_error;
595 x_msg_count := 1;
596 x_msg_data := SQLCODE || SQLERRM;
597 fnd_file.put_line(fnd_file.log,'Exception:'||x_msg_data);
598 WHEN OTHERS THEN
599 ROLLBACK;
600 x_return_status := fnd_api.g_ret_sts_unexp_error;
601
602 x_msg_count := 1;
603 x_msg_data := SQLCODE || SQLERRM;
604 fnd_file.put_line(fnd_file.log,'Exception:'||x_msg_data);
605 END get_bo_and_insert;
606
607 FUNCTION test_event_subscription(p_subscription_guid IN RAW,
608 p_event IN OUT NOCOPY wf_event_t)
609 RETURN VARCHAR2 IS
610
611 BEGIN
612 --bu_debug_proc(1, '++ Publish Event raised ++ ');
613 --bu_debug_proc(2, 'Event Name:' || p_event.geteventname());
614 --bu_debug_proc(3, 'PUBLICATION_EVENT_ID:' || p_event.GetValueForParameter('PUBLICATION_EVENT_ID'));
615 create_supp_publish_resp(p_event.GetValueForParameter('PUBLICATION_EVENT_ID'),
616 '',
617 'SIEBEL',
618 0,
619 'Y');
620 RETURN 'SUCCESS';
621 EXCEPTION
622 WHEN OTHERS THEN
623 RETURN 'FAILURE';
624 END test_event_subscription;
625 /*#
626 * Use this routine to get party id list for given publication event id
627 * @param p_api_version The version of API
631 * @param x_return_status The return status
628 * @param p_init_msg_list The Initialization message list
629 * @param p_publication_event_id The publication event id
630 * @param x_party_id_cursor The list of party ids as cursor
632 * @param x_msg_count The message count
633 * @param x_msg_data The message data
634 * @rep:scope public
635 * @rep:lifecycle active
636 * @rep:displayname Get Party Id list for a publication event id
637 * @rep:catagory BUSSINESS_ENTITY AP_SUPPLIER
638 */
639 PROCEDURE get_partyids_per_event(p_api_version IN NUMBER DEFAULT NULL,
640 p_init_msg_list IN VARCHAR2 DEFAULT NULL,
641 p_publication_event_id IN NUMBER,
642 x_party_id_cursor OUT NOCOPY SYS_REFCURSOR,
643 x_return_status OUT NOCOPY VARCHAR2,
644 x_msg_count OUT NOCOPY NUMBER,
645 x_msg_data OUT NOCOPY VARCHAR2) IS
646 BEGIN
647
648 OPEN x_party_id_cursor FOR
649 SELECT party_id
650 FROM pos_supp_pub_history
651 WHERE publication_event_id = p_publication_event_id;
652 EXCEPTION
653 WHEN OTHERS THEN
654 x_return_status := fnd_api.g_ret_sts_unexp_error;
655 x_msg_count := 1;
656 x_msg_data := SQLCODE || SQLERRM;
657 END;
658
659 END pos_supp_pub_raise_event_pkg;