1 package body ad_pa_submit_request as
2 /* $Header: adpasrb.pls 120.3 2006/09/08 16:14:20 ababkuma noship $ */
3
4 -- Procedure to submit InfoBundle Upload Request for Patch Advisor
5 -- repeatOption is 'yes' if want to recur the request
6 -- repeatInterval is number of repeatUnit
7 -- repeatUnit is either MINUTES/HOURS/DAYS/MONTHS
8 -- repeatEndDate is the end date
9 -- errMsg is the Error Message
10
11 procedure SUBMIT_INFOBUNDLE_REQUEST(
12 reqId out NOCOPY number ,
13 submitDate in varchar2,
14 repeatOption in varchar2,
15 repeatInterval in varchar2,
16 repeatUnit in varchar2,
17 repeatEndDate in varchar2,
18 errMsg out NOCOPY varchar2
19 )
20 is
21 retVal boolean;
22 begin
23 retVal := true;
24 /** Set repeat parameters if want to repeat the request**/
25 if ( repeatOption = 'yes' ) then
26 retVal := false;
27 if (length(repeatInterval) <> 0 ) then
28 --if the repeat inteval is not null, then recurr the request after this
29 --interval
30 retVal := FND_REQUEST.SET_REPEAT_OPTIONS('' , repeatInterval ,repeatUnit
31 , 'START', repeatEndDate);
32 else
33 --if the repeatInteval is null, then recurr the request daily at this time
34 --Extract the time from submitDate
35 retVal := FND_REQUEST.SET_REPEAT_OPTIONS(SUBSTR('submitDate' ,
36 - INSTR('submitDate',' ', -8, 1) ,
37 INSTR('submitDate',' ', -8, 1)) , '' , '',
38 'START', repeatEndDate);
39 end if;
40 if (retval = false) then
41 errMsg := fnd_message.get();
42 return;
43 end if;
44 end if;
45
46 --Submit the request
47 if (retVal = true) then
48 reqId := FND_REQUEST.submit_request ('AD','FND_PAUPLOAD',
49 'PatchWizard - Information Bundle Upload',submitDate, FALSE);
50 end if;
51
52 -- This is to get the actual error in case concurrent program fails.
53 if ( reqId <= 0 ) then
54 errMsg := fnd_message.get();
55 end if;
56
57 commit;
58
59 end submit_infobundle_request;
60
61 -- Procedure to submit Patch Upload and Patch Analysis Request set for Patch Advisor
62 -- pIsAggregate is the flag to determine whether aggregate impact is to be done or not.
63
64 procedure submit_patches_request(
65 reqId out NOCOPY number,
66 patchList in varchar2,
67 submitDate in varchar2 ,
68 repeatOption in varchar2,
69 repeatInterval in varchar2,
70 repeatUnit in varchar2,
71 repeatEndDate in varchar2,
72 pIsAggregate in varchar2,
73 errMsg out NOCOPY varchar2
74 )
75 is
76 retVal boolean;
77 n0 number;
78 n3 number;
79 n5 number;
80 n10 number;
81 n20 number;
82 n30 number;
83 n35 number;
84 n40 number;
85 n50 number;
86 n60 number;
87 n65 number;
88 n70 number;
89 lRepeatFlag number := 1;
90 begin
91 /** Set repeat parameters if want to repeat the request **/
92 if ( repeatOption = 'yes' ) then
93 retVal := false;
94 if (length(repeatInterval) <> 0 ) then
95 --if the repeat inteval is not null, then recurr the request after this interval
96 retVal := FND_SUBMIT.SET_REPEAT_OPTIONS('' , repeatInterval ,repeatUnit, 'START', repeatEndDate);
97 else
98 --if the repeatInteval is null, then recurr the request daily at this time
99 --Extract the time from submitDate
100 retVal := FND_SUBMIT.SET_REPEAT_OPTIONS(SUBSTR('submitDate' ,
101 - INSTR('submitDate',' ', -8, 1) ,
102 INSTR('submitDate',' ', -8, 1)) , '' , '',
103 'START', repeatEndDate);
104 end if;
105 end if;
106 if(retVal = false) then
107 lRepeatFlag := -1;
108 errMsg := fnd_message.get();
109 return;
110 end if;
111
112 retVal := FND_SUBMIT.SET_REQUEST_SET('AD','FNDRSSUB1242');
113 if ( retVal = true ) then
114 n0 := 1;
115 else
116 errMsg := fnd_message.get();
117 return;
118 end if;
119
120 -- bug#3984358 Call the PAANALYZEPATCHES wrapper.
121 retVal := FND_SUBMIT.SUBMIT_PROGRAM('AD','PAANALYZEPATCHES','STAGE3',patchList);
122 if ( retVal = true ) then
123 n3 := 1;
124 else
125 errMsg := fnd_message.get();
126 return;
127 end if;
128
129 -- bug#3984358 PAPATCHDOWNLOADER is now dummy request. replaced by PAANALYZEPATCHES wrapper.
130 retVal := FND_SUBMIT.SUBMIT_PROGRAM('AD','PAPATCHDOWNLOADER','STAGE5',patchList);
131 if ( retVal = true ) then
132 n5 := 1;
133 else
134 errMsg := fnd_message.get();
135 return;
136 end if;
137
138 -- bug#3984358 PATCHUPLOAD is now dummy request. replaced by PAANALYZEPATCHES wrapper.
139 retVal := FND_SUBMIT.SUBMIT_PROGRAM('AD','PATCHUPLOAD','STAGE10',patchList);
140 if ( retVal = true ) then
141 n10 := 1;
142 else
143 errMsg := fnd_message.get();
144 return;
145 end if;
146
147 -- bug#3984358 PATCHANALYSIS is now dummy request. replaced by PAANALYZEPATCHES wrapper.
148 retVal := FND_SUBMIT.SUBMIT_PROGRAM('AD','PATCHANALYSIS','STAGE20',patchList);
149 if ( retVal = true ) then
150 n20 := 1;
151 else
152 errMsg := fnd_message.get();
153 return;
154 end if;
155
156 retVal := FND_SUBMIT.SUBMIT_PROGRAM('FND','BUILDJSPDEP','STAGE30');
157 if ( retVal = true ) then
158 n30 := 1;
159 else
160 errMsg := fnd_message.get();
161 return;
162 end if;
163
164 retVal := FND_SUBMIT.SUBMIT_PROGRAM('FND','COMPDIAGTESTVER','STAGE35');
165 if ( retVal = true ) then
166 n35 := 1;
167 else
168 errMsg := fnd_message.get();
169 return;
170 end if;
171
172 retVal := FND_SUBMIT.SUBMIT_PROGRAM('FND','ANALYZEIMPACT','STAGE40');
173 if ( retVal = true ) then
174 n40 := 1;
175 else
176 errMsg := fnd_message.get();
177 return;
178 end if;
179
180 retVal := FND_SUBMIT.SUBMIT_PROGRAM('FND','MENUTREEANALYSIS','STAGE50');
181 if ( retVal = true ) then
182 n50 := 1;
183 else
184 errMsg := fnd_message.get();
185 return;
186 end if;
187
188 retVal := FND_SUBMIT.SUBMIT_PROGRAM('FND','ANALYZEIMPACT2','STAGE60');
189 if ( retVal = true )
190 then n60 := 1;
191 else
192 errMsg := fnd_message.get();
193 return;
194 end if;
195
196 -- bug#3984358 Call the Agggregate PIA request with proper values.
197 if(pIsAggregate = 'Y') then
198 retVal := FND_SUBMIT.SUBMIT_PROGRAM('FND','AGGREGATEIMPACT','STAGE65',null);
199 else
200 retVal := FND_SUBMIT.SUBMIT_PROGRAM('FND','AGGREGATEIMPACT','STAGE65', -1);
201 end if;
202 if ( retVal = true )
203 then n65 := 1;
204 else
205 errMsg := fnd_message.get();
206 return;
207 end if;
208
209 retVal := FND_SUBMIT.SUBMIT_PROGRAM('AD','PWSTATUSTRACKER','STAGE70');
210 if ( retVal = true )
211 then n70 := 1;
212 else
213 errMsg := fnd_message.get();
214 return;
215 end if;
216
217 -- if ( (n1 = 1 ) and (n1_0 = 1 ) and (n1_1 = 1 ) and (n2 = 1 ) and (n3 = 1 ) and (n4 = 1 ) and (n5 = 1) and (n6 = 1) and (n7 = 1) and (n8 = 1) and (n9 = 1) and (lRepeatFlag = 1)) then
218 if ( (n0 = 1 ) and (n3 = 1 ) and (n5 = 1 ) and (n10 = 1 ) and (n20 = 1 ) and (n30 = 1 ) and (n35 = 1 ) and (n40 = 1 ) and (n50 = 1 ) and (n60 = 1) and (n65 = 1) and (n70 = 1) and (lRepeatFlag = 1)) then
219 reqId := FND_SUBMIT.SUBMIT_SET(submitDate);
220 else
221 reqId := 0;
222 errMsg := fnd_message.get();
223 return;
224 end if;
225
226 -- This is to get the actual error in case concurrent program fails.
227 if ( reqId <= 0 ) then
228 errMsg := fnd_message.get();
229 end if;
230
231
232 commit;
233
234 end submit_patches_request;
235
236
237 -- Procedure to submit Analysis Request set for Patch Advisor
238 -- pIsAggregate is the flag to determine whether aggregate impact is to be done or not.
239
240 procedure submit_advisor_request(
241 reqId out NOCOPY number,
242 criteriaId in varchar2 ,
243 submitDate in varchar2 ,
244 repeatOption in varchar2,
245 repeatInterval in varchar2,
246 repeatUnit in varchar2,
247 repeatEndDate in varchar2,
248 pUploadPatchInfo in varchar2,
249 pIsAggregate in varchar2,
250 errMsg out NOCOPY varchar2
251
252 )
253 is
254 retVal boolean;
255 n0 number ;
256 n3 number ;
257 n5 number ;
258 n10 number ;
259 n20 number ;
260 n25 number ;
261 n30 number ;
262 n40 number ;
263 n50 number ;
264 n55 number ;
265 n60 number ;
266 lRepeatFlag number := 1;
267 begin
268
269 /** Set repeat parameters if want to repeat the request**/
270 if ( repeatOption = 'yes' ) then
271 retVal := false;
272 if (length(repeatInterval) <> 0 ) then
273 --if the repeat inteval is not null, then recurr the request after this interval
274 retVal := FND_SUBMIT.SET_REPEAT_OPTIONS('' , repeatInterval ,repeatUnit
275 , 'START', repeatEndDate);
276 else
277 --if the repeatInteval is null, then recurr the request daily at this time
278 --Extract the time from submitDate
279 retVal := FND_SUBMIT.SET_REPEAT_OPTIONS(SUBSTR('submitDate' ,
280 - INSTR('submitDate',' ', -8, 1) ,
281 INSTR('submitDate',' ', -8, 1)) , '' , '',
282 'START', repeatEndDate);
283 end if;
284 end if;
285 if(retVal = false) then
286 lRepeatFlag := -1;
287 errMsg := fnd_message.get();
288 return;
289 end if;
290
291 retVal := FND_SUBMIT.SET_REQUEST_SET('AD','FNDRSSUB1243');
292 if ( retVal = true ) then
293 n0 := 1;
294 else
295 errMsg := fnd_message.get();
296 return;
297 end if;
298
299 -- bug#3984358 Call PAANALYZEPATCHES wrapper request.
300 retVal := FND_SUBMIT.SUBMIT_PROGRAM('AD','PARECOMMENDPATCHES','STAGE3', criteriaId, pUploadPatchInfo);
301 if ( retVal = true ) then
302 n3 := 1;
303 else
304 errMsg := fnd_message.get();
305 return;
306 end if;
307
308 -- bug#3984358 FND_PAUPLOAD is now dummy request. replaced by PAANALYZEPATCHES wrapper.
309 retVal := FND_SUBMIT.SUBMIT_PROGRAM('AD','FND_PAUPLOAD','STAGE5', pUploadPatchInfo);
310 if ( retVal = true ) then
311 n5 := 1;
312 else
313 errMsg := fnd_message.get();
314 return;
315 end if;
316
317 -- bug#3984358 PAANALYSIS is now dummy request. replaced by PAANALYZEPATCHES wrapper.
318 retVal := FND_SUBMIT.SUBMIT_PROGRAM('AD','PAANALYSIS','STAGE10',criteriaId);
319 if ( retVal = true ) then
320 n10 := 1;
321 else
322 errMsg := fnd_message.get();
323 return;
324 end if;
325
326 retVal := FND_SUBMIT.SUBMIT_PROGRAM('FND','BUILDJSPDEP','STAGE20');
327 if ( retVal = true ) then
328 n20 := 1;
329 else
330 errMsg := fnd_message.get();
331 return;
332 end if;
333
334 retVal := FND_SUBMIT.SUBMIT_PROGRAM('FND','COMPDIAGTESTVER','STAGE25');
335 if ( retVal = true ) then
336 n25 := 1;
337 else
338 errMsg := fnd_message.get();
339 return;
340 end if;
341
342 retVal := FND_SUBMIT.SUBMIT_PROGRAM('FND','ANALYZEIMPACT','STAGE30');
343 if ( retVal = true ) then
344 n30 := 1;
345 else
346 errMsg := fnd_message.get();
347 return;
348 end if;
349
350 retVal := FND_SUBMIT.SUBMIT_PROGRAM('FND','MENUTREEANALYSIS','STAGE40');
351 if ( retVal = true ) then
352 n40 := 1;
353 else
354 errMsg := fnd_message.get();
355 return;
356 end if;
357
358 -- bug#3984358 Call Aggregate PIA request.
359 retVal := FND_SUBMIT.SUBMIT_PROGRAM('FND','ANALYZEIMPACT2','STAGE50');
360 if ( retVal = true ) then
361 n50 := 1;
362 else
363 errMsg := fnd_message.get();
364 return;
365 end if;
366
367 retVal := FND_SUBMIT.SUBMIT_PROGRAM('AD','PWSTATUSTRACKER','STAGE60');
368 if ( retVal = true ) then
369 n60 := 1;
370 else
371 errMsg := fnd_message.get();
372 return;
373 end if;
374
375 if(pIsAggregate = 'Y') then
376 retVal := FND_SUBMIT.SUBMIT_PROGRAM('FND','AGGREGATEIMPACT','STAGE55',null);
377 else
378 retVal := FND_SUBMIT.SUBMIT_PROGRAM('FND','AGGREGATEIMPACT','STAGE55', -1);
379 end if;
380 if ( retVal = true )
381 then n55 := 1;
382 else
383 errMsg := fnd_message.get();
384 return;
385 end if;
386
387 -- if ( (n1 = 1 ) and (n1_1 = 1) and (n2 = 1 ) and (n3 = 1 ) and (n4 = 1 ) and (n5 = 1) and (n6 = 1) and (n7 = 1) and (n8 = 1) and (lRepeatFlag = 1)) then
388 if ( (n0 = 1 ) and (n3 = 1 ) and (n20 = 1 ) and (n25 = 1) and (n30 = 1) and (n40 = 1) and (n50 = 1) and (n55 = 1) and (n60 = 1 ) and (lRepeatFlag = 1)) then
389 reqId := FND_SUBMIT.SUBMIT_SET(submitDate);
390 else
391 reqId := 0;
392 errMsg := fnd_message.get();
393 return;
394 end if;
395
396 -- This is to get the actual error in case concurrent program fails.
397 if ( reqId <= 0 ) then
398 errMsg := fnd_message.get();
399 end if;
400
401 commit;
402
403 end submit_advisor_request;
404
405
406
407 -- Procedure to submit Download Patches Request Set for Patch Wizard
408 -- patchList is the List of Patches
409 -- mergeName is the Merge Name
410 -- mergeType is the Merge Type
411 -- automerge is the option to merge patches or not.
412 -- Languages is the list of languages codes
413 -- Platform is the platform code
414 -- StagingDir is the staging directory
415 -- Options is the options to download or download and analyze
416 -- errMsg is the Error Message
417 -- pIsAggregate is the flag to determine whether aggregate impact is to be done or not.
418
419 procedure submit_download_patch_reqset(
420 reqId out NOCOPY number,
421 pSubmitDate in varchar2,
422 pPatchList in varchar2 ,
423 pAutoMerge in varchar2,
424 pMergeName in varchar2,
425 pMergeType in varchar2,
426 pLanguages in varchar2,
427 pPlatform in varchar2,
428 pStagingDir in varchar2,
429 pOptions in varchar2,
430 errMsg out NOCOPY varchar2
431 )
432 is
433 retVal boolean;
434
435 n0 number ;
436 n10 number ;
437 n20 number ;
438 n30 number ;
439 n40 number ;
440 n50 number ;
441 n60 number ;
442 n65 number ;
443 n70 number ;
444 begin
445 retVal := FND_SUBMIT.SET_REQUEST_SET('AD','FNDRSSUB1623');
446
447 if ( retVal = true ) then
448 n0 := 1;
449 else
450 errMsg := fnd_message.get();
451 return;
452 end if;
453
454 retVal := FND_SUBMIT.SUBMIT_PROGRAM('AD','PADOWNLOADPATCHES','STAGE10'
455 , pPatchList
456 , pAutoMerge
457 , pMergeName
458 , pMergeType
459 , pLanguages
460 , pPlatform
461 , pStagingDir
462 , pOptions);
463 if ( retVal = true ) then
464 n10 := 1;
465 else
466 errMsg := fnd_message.get();
467 return;
468 end if;
469
470 retVal := FND_SUBMIT.SUBMIT_PROGRAM('FND','BUILDJSPDEP','STAGE20');
471 if ( retVal = true ) then
472 n20 := 1;
473 else
474 errMsg := fnd_message.get();
475 return;
476 end if;
477
478 retVal := FND_SUBMIT.SUBMIT_PROGRAM('FND','COMPDIAGTESTVER','STAGE30');
479 if ( retVal = true ) then
480 n30 := 1;
481 else
482 errMsg := fnd_message.get();
483 return;
484 end if;
485
486 retVal := FND_SUBMIT.SUBMIT_PROGRAM('FND','ANALYZEIMPACT','STAGE40');
487 if ( retVal = true ) then
488 n40 := 1;
489 else
490 errMsg := fnd_message.get();
491 return;
492 end if;
493
494 retVal := FND_SUBMIT.SUBMIT_PROGRAM('FND','MENUTREEANALYSIS','STAGE50');
495 if ( retVal = true ) then
496 n50 := 1;
497 else
498 errMsg := fnd_message.get();
499 return;
500 end if;
501
502 retVal := FND_SUBMIT.SUBMIT_PROGRAM('FND','ANALYZEIMPACT2','STAGE60');
503 if ( retVal = true ) then
504 n60 := 1;
505 else
506 errMsg := fnd_message.get();
507 return;
508 end if;
509
510 -- If the user has chosen Option 3 (Download, Analyze and Aggregate Patch Impact) only then
511 -- do the Aggregate PIA (otherwise we pass -1 not aggregate)
512 if(pOptions = '3') then
513 retVal := FND_SUBMIT.SUBMIT_PROGRAM('FND','AGGREGATEIMPACT','STAGE65', null);
514 else
515 retVal := FND_SUBMIT.SUBMIT_PROGRAM('FND','AGGREGATEIMPACT','STAGE65', -1);
516 end if;
517 if ( retVal = true )
518 then n65 := 1;
519 else
520 errMsg := fnd_message.get();
521 return;
522 end if;
523
524 retVal := FND_SUBMIT.SUBMIT_PROGRAM('AD','PWSTATUSTRACKER','STAGE70');
525 if ( retVal = true ) then
526 n70 := 1;
527 else
528 errMsg := fnd_message.get();
529 return;
530 end if;
531
532 -- if ( (n1 = 1 ) and (n2 = 1 ) and (n3 = 1 ) and (n4 = 1 ) and (n5 = 1) and (n6 = 1) and (n7 = 1) and (n8 = 1)) then
533 if ( (n0 = 1 ) and (n10 = 1 ) and (n20 = 1 ) and (n30 = 1) and (n40 = 1) and (n50 = 1) and (n60 = 1 ) and (n65 = 1) and (n70 = 1) ) then
534 reqId := FND_SUBMIT.SUBMIT_SET(pSubmitDate);
535 else
536 reqId := 0;
537 errMsg := fnd_message.get();
538 return;
539 end if;
540
541 -- This is to get the actual error in case concurrent program fails.
542 if ( reqId <= 0 ) then
543 errMsg := fnd_message.get();
544 end if;
545
546 commit;
547
548 end submit_download_patch_reqset;
549
550
551 PROCEDURE StatusTracker(
552 ERRBUF OUT NOCOPY VARCHAR2,
553 RETCODE OUT NOCOPY NUMBER
554 ) IS
555 l_request_id INTEGER;
556 l_request_set_id INTEGER;
557 l_sub_requests FND_CONCURRENT.REQUESTS_TAB_TYPE;
558 l_cnt NUMBER;
559 BEGIN
560
561 -- Set the default value to 0 (Normal)
562 RETCODE := 0;
563
564 fnd_file.put_line(fnd_file.log, 'Status Tracker: This request set is the'||
565 ' dummy request to track the status of individual requests and assign the'||
566 ' right status to the request set');
567
568 -- Get the request id for the current request, ie, StatusTracker
569 SELECT fnd_global.conc_request_id INTO l_request_id from dual;
570
571 fnd_file.put_line(fnd_file.log, 'Current request id : '|| l_request_id);
572
573 -- Get the request set id for the current request, ie, StatusTracker
574 SELECT parent_request_id INTO l_request_set_id FROM fnd_concurrent_requests
575 WHERE request_id =
576 ( SELECT parent_request_id
577 FROM fnd_concurrent_requests
578 WHERE request_id = l_request_id );
579
580 fnd_file.put_line(fnd_file.log, 'Current request set id : '|| l_request_set_id);
581
582 -- Get the data for all the requests in the current request set
583 l_sub_requests := fnd_concurrent.get_sub_requests(l_request_set_id);
584
585 -- Check the status of each request within the request set and assign the highest value to RETCODE
586 l_cnt := l_sub_requests.first;
587 WHILE l_cnt IS NOT NULL LOOP
588 fnd_file.put_line(fnd_file.log, l_sub_requests(l_cnt).request_id ||' '||l_sub_requests(l_cnt).status);
589 IF (RETCODE <> 2 AND l_sub_requests(l_cnt).status = 'Warning') THEN
590 RETCODE := 1;
591 ELSIF (RETCODE <> 2 AND l_sub_requests(l_cnt).status = 'Error') THEN
592 RETCODE := 2;
593 END IF;
594 l_cnt := l_sub_requests.next(l_cnt);
595 END LOOP;
596
597 IF (RETCODE = 0 ) THEN
598 fnd_file.put_line(fnd_file.log,'Overall request set Status is Normal');
599 ELSIF (RETCODE = 2 ) THEN
600 fnd_file.put_line(fnd_file.log,'Overall request set Status is Warning');
601 ELSE
602 fnd_file.put_line(fnd_file.log,'Overall request set Status is Error');
603 END IF;
604
605 EXCEPTION
606 WHEN OTHERS THEN
607 RETCODE := 2;
608 ERRBUF := sqlcode||':'||sqlerrm;
609 fnd_file.put_line(fnd_file.log, 'StatusTracker failed ' || sqlcode||':'||sqlerrm);
610
611 END StatusTracker;
612 -- ababkuma bug#5488292 changed buglist type from t_rec_patch to t_recomm_patch_tab
613 -- Procedure to submit Aggregate Patch Impact Request.
614 PROCEDURE submit_aggregate_impact(
615 reqId out NOCOPY number,
616 pReqId in number,
617 pPatchList in varchar2,
618 errMsg out NOCOPY varchar2
619 )
620 IS
621 retVal boolean ;
622 --bugno varchar2(50);
623 patchid varchar2(50);
624 lPatchList varchar2(2000);
625 count1 number ;
626 pos number ;
627 --buglist ad_patch_impact_api.t_rec_patch;
628 buglist ad_patch_impact_api.t_recomm_patch_tab;
629 l_rec ad_patch_impact_api.t_recomm_patch_rec;
630 l_bugnum number ;
631 l_baseline varchar2(150);
632
633 BEGIN
634
635
636 buglist := ad_patch_impact_api.t_recomm_patch_tab();
637
638 retVal := true;
639 lPatchList := pPatchList;
640 count1 := 1;
641 pos := 1;
642 l_bugnum := 0;
643 l_baseline := '';
644 -- Append a ',' to the patch list if it has some patches.
645 -- Patchlist contains the set of unique patch_id from ad_pm_patches tables
646 lPatchList := trim(pPatchList);
647 if (length(lPatchList) > 1) then
648 lPatchList := concat(lPatchList, ',');
649 end if;
650
651 --Prepare the patch list.
652 while (pos <> 0) loop
653 pos := instr(lPatchList, ',');
654 if (pos <> 0) then
655 patchid := trim(substr(lPatchList,1, pos-1));
656 lPatchList := substr(lPatchList, pos+1);
657 --buglist(count1) := to_number(bugno);
658 SELECT bug_number, baseline
659 INTO l_bugnum, l_baseline
660 FROM ad_pm_patches
661 WHERE patch_id = patchid;
662
663 l_rec.bug_number := l_bugnum;
664 l_rec.baseline := l_baseline;
665 l_rec.patch_id := patchid;
666 buglist.extend;
667 buglist(count1) := l_rec;
668
669 count1 := count1 + 1;
670 end if;
671 end loop;
672
673 --Set the list of patches to be aggregated.
674 fnd_imp_pkg.set_aggregate_list(pReqId,buglist);
675
676 --Submit the request.
677 if (retVal = true) then
678 reqId := FND_REQUEST.submit_request ('FND','AGGREGATEIMPACT',
679 'Aggregate Patch Impact', NULL, FALSE, pReqId);
680 end if;
681
682 -- This is to get the actual error in case concurrent program fails.
683 if ( reqId <= 0 ) then
684 errMsg := fnd_message.get();
685 end if;
686
687 END submit_aggregate_impact;
688
689 end ad_pa_submit_request;