33:
34:
35: l_progress := 'PO_APPROVAL_REMINDER_SV.Select_Unapprove_docs: 01 - BEGIN ';
36: IF (g_po_wf_debug = 'Y') THEN
37: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
38: END IF;
39:
40:
41: Process_unapprove_reqs;
53: process_po_temp_labor_lines; --
54:
55: l_progress := 'PO_APPROVAL_REMINDER_SV.Select_Unapprove_docs: 900 - END ';
56: IF (g_po_wf_debug = 'Y') THEN
57: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
58: END IF;
59:
60:
61: EXCEPTION
65: wf_core.context ('PO_APPROVAL_REMINDER_SV','Select_Unapprove_docs ' || l_progress);
66: l_progress := 'PO_APPROVAL_REMINDER_SV.Select_Unapprove_docs: 990 - ' ||
67: 'EXCEPTION sql error: ' || sqlcode;
68: IF (g_po_wf_debug = 'Y') THEN
69: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
70: END IF;
71:
72: RAISE;
73:
136:
137:
138: l_progress := 'PO_APPROVAL_REMINDER_SV.Process unapprove_reqs: 01 - BEGIN ';
139: IF (g_po_wf_debug = 'Y') THEN
140: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
141: END IF;
142:
143:
144: l_itemkey := ' ';
182: NULL;
183:
184: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_unapprove_reqs: 05 ' ||
185: 'open WF item key exists ' ||l_itemkey;
186: -- /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
187:
188: ELSE
189:
190:
209:
210: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_unapprove_reqs: 10 ' ||
211: 'Start WF item key =' ||l_itemkey;
212: IF (g_po_wf_debug = 'Y') THEN
213: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
214: END IF;
215:
216: PO_APPROVAL_REMINDER_SV.Start_Approval_Reminder (l_doc_header_id,
217: l_doc_number,
239:
240:
241: l_progress := 'PO_APPROVAL_REMINDER_SV.Process unapprove_reqs: 900 - END ';
242: IF (g_po_wf_debug = 'Y') THEN
243: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
244: END IF;
245:
246:
247: EXCEPTION
249: wf_core.context ('PO_APPROVAL_REMINDER_SV','Process_Unapprove_reqs','No data found');
250: l_progress := 'PO_APPROVAL_REMINDER_SV.Process unapprove_reqs: 901 - ' ||
251: 'EXCEPTION - no data found sql error: ' || sqlcode;
252: IF (g_po_wf_debug = 'Y') THEN
253: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
254: END IF;
255:
256:
257: WHEN OTHERS THEN
258: wf_core.context ('PO_APPROVAL_REMINDER_SV','Process_Unapprove_reqs','SQL error ' || sqlcode);
259: l_progress := 'PO_APPROVAL_REMINDER_SV.Process unapprove_reqs: 990 - ' ||
260: 'EXCEPTION - sql error: ' || sqlcode;
261: IF (g_po_wf_debug = 'Y') THEN
262: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
263: END IF;
264:
265: RAISE;
266:
319:
320:
321: l_progress := 'PO_APPROVAL_REMINDER_SV.Process unapprove_pos: 01 - BEGIN ';
322: IF (g_po_wf_debug = 'Y') THEN
323: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
324: END IF;
325:
326:
327: l_itemkey := ' ';
372: NULL;
373:
374: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_unapprove_pos: 05 ' ||
375: 'open WF item key exists ' ||l_itemkey;
376: -- /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
377:
378: ELSE
379:
380:
398:
399: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_unapprove_pos: 10 ' ||
400: 'Start WF item key =' ||l_itemkey;
401: IF (g_po_wf_debug = 'Y') THEN
402: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
403: END IF;
404:
405: PO_APPROVAL_REMINDER_SV.Start_Approval_Reminder (l_doc_header_id,
406: l_doc_number,
429:
430:
431: l_progress := 'PO_APPROVAL_REMINDER_SV.Process unapprove_pos: 900 - END ';
432: IF (g_po_wf_debug = 'Y') THEN
433: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
434: END IF;
435:
436: EXCEPTION
437: WHEN NO_DATA_FOUND THEN
439:
440: l_progress := 'PO_APPROVAL_REMINDER_SV.Process unapprove_pos: 901 - ' ||
441: 'EXCEPTION - no data found sql error: ' || sqlcode;
442: IF (g_po_wf_debug = 'Y') THEN
443: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
444: END IF;
445:
446: WHEN OTHERS THEN
447: wf_core.context ('PO_APPROVAL_REMINDER_SV','Process_Unapprove_pos','SQL error ' || sqlcode);
448:
449: l_progress := 'PO_APPROVAL_REMINDER_SV.Process unapprove_pos: 990 - ' ||
450: 'EXCEPTION - sql error: ' || sqlcode;
451: IF (g_po_wf_debug = 'Y') THEN
452: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
453: END IF;
454:
455:
456: RAISE;
512:
513:
514: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_unapprove_releases: 01 - BEGIN ';
515: IF (g_po_wf_debug = 'Y') THEN
516: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
517: END IF;
518:
519: l_itemkey := ' ';
520:
564: NULL;
565:
566: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_unapprove_releases: 05 ' ||
567: 'open WF item key exists ' ||l_itemkey;
568: -- /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
569:
570:
571: ELSE
572:
592:
593: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_unapprove_releases: 10 ' ||
594: 'Start WF item key =' ||l_itemkey;
595: IF (g_po_wf_debug = 'Y') THEN
596: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
597: END IF;
598:
599: PO_APPROVAL_REMINDER_SV.Start_Approval_Reminder (l_doc_header_id,
600: l_doc_number,
621: CLOSE Unapprove_REL;
622:
623: l_progress := 'PO_APPROVAL_REMINDER_SV.Process unapprove_releases: 900 - END ';
624: IF (g_po_wf_debug = 'Y') THEN
625: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
626: END IF;
627:
628: EXCEPTION
629: WHEN NO_DATA_FOUND THEN
630: wf_core.context ('PO_APPROVAL_REMINDER_SV','Process_Unapprove_releases','No data found');
631: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_Unapprove_releases: 901 - ' ||
632: 'EXCEPTION - no data found sql error: ' || sqlcode;
633: IF (g_po_wf_debug = 'Y') THEN
634: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
635: END IF;
636:
637:
638: WHEN OTHERS THEN
639: wf_core.context ('PO_APPROVAL_REMINDER_SV','Process_Unapprove_releases','SQL error ' || sqlcode);
640: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_Unapprove_releases: 990 - ' ||
641: 'EXCEPTION - sql error: ' || sqlcode;
642: IF (g_po_wf_debug = 'Y') THEN
643: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
644: END IF;
645:
646: RAISE;
647:
714:
715:
716: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_po_acceptance: 01 - BEGIN ';
717: IF (g_po_wf_debug = 'Y') THEN
718: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
719: END IF;
720:
721:
722: l_itemkey := '';
769:
770: -- bug 3896181
771: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_po_acceptance: 02 - item key exists ';
772: IF (g_po_wf_debug = 'Y') THEN
773: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
774: end if;
775: -- bug 3896181
776:
777: IF trunc(l_acceptance_due_date) > trunc(sysdate) THEN
778:
779: -- bug 3896181
780: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_po_acceptance: 03 - acc_due_date > sysdate ';
781: IF (g_po_wf_debug = 'Y') THEN
782: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
783: END IF;
784: IF l_Item_end_date is not null then
785: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_po_acceptance: 04 - end_date not null';
786: IF (g_po_wf_debug = 'Y') THEN
783: END IF;
784: IF l_Item_end_date is not null then
785: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_po_acceptance: 04 - end_date not null';
786: IF (g_po_wf_debug = 'Y') THEN
787: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
788: END IF;
789: -- bug 3896181
790: PO_APPROVAL_REMINDER_SV.Cancel_Notif (l_doc_type,
791: l_doc_header_id,
807: COMMIT;
808: ELSE -- l_Item_end_date is not null
809: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_po_acceptance: 05 - end_date is null';
810: IF (g_po_wf_debug = 'Y') THEN
811: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
812: -- bug 3896181
813: END IF;
814:
815: -- bug 3896181
822: IF l_message_name = 'PO_ACCEPTANCE_PAST_DUE' then
823: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_po_acceptance: 06 - PO_ACCEPTANCE_PAST_DUE';
824: -- bug 3896181
825: IF (g_po_wf_debug = 'Y') THEN
826: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
827: END IF;
828: -- bug 3896181
829: PO_APPROVAL_REMINDER_SV.Cancel_Notif (l_doc_type,
830: l_doc_header_id,
853: ELSE -- l_acceptance_due_date) > trunc(sysdate)
854: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_po_acceptance: 07 - acc_due_date < sysdate';
855: -- bug 3896181
856: IF (g_po_wf_debug = 'Y') THEN
857: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
858: END IF;
859:
860: -- bug 3896181
861: IF l_Item_end_date is not NULL THEN
860: -- bug 3896181
861: IF l_Item_end_date is not NULL THEN
862: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_po_acceptance: 08 - end_date is not null';
863: IF (g_po_wf_debug = 'Y') THEN
864: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
865: END IF;
866: PO_APPROVAL_REMINDER_SV.Cancel_Notif (l_doc_type,
867: l_doc_header_id,
868: NULL);
889: -- bug 3896181
890: ELSE -- l_Item_end_date is not NULL
891: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_po_acceptance: 09 - end_date is null';
892: IF (g_po_wf_debug = 'Y') THEN
893: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
894: -- bug 3896181
895: END IF;
896: -- bug 3896181
897: /* FP bug 14019376
912: WHEN OTHERS THEN
913: l_message_name := null;
914: l_progress := 'This PO may have WFENG_NOTIFICATION_PERFORMER issue - please check wfstatus';
915: IF (g_po_wf_debug = 'Y') THEN
916: PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
917: END IF;
918: END; --End 14019376
919:
920: IF l_message_name = 'PO_ACCEPTANCE_REQUIRED' then
919:
920: IF l_message_name = 'PO_ACCEPTANCE_REQUIRED' then
921: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_po_acceptance: 10 - PO_ACCEPTANCE_REQUIRED';
922: IF (g_po_wf_debug = 'Y') THEN
923: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
924: END IF;
925: PO_APPROVAL_REMINDER_SV.Cancel_Notif (l_doc_type,
926: l_doc_header_id,
927: NULL);
947: ELSE -- l_item_exist = 'Y'
948: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_po_acceptance: 11 - l_item_exists is N';
949: -- bug 3896181
950: IF (g_po_wf_debug = 'Y') THEN
951: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
952: END IF;
953: -- bug 3896181
954: PO_APPROVAL_REMINDER_SV.Start_Approval_Reminder (l_doc_header_id,
955: l_doc_number,
976:
977:
978: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_po_acceptance: 900 - END ';
979: IF (g_po_wf_debug = 'Y') THEN
980: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
981: END IF;
982:
983: EXCEPTION
984: WHEN NO_DATA_FOUND THEN
985: wf_core.context ('PO_APPROVAL_REMINDER_SV','Process_po_acceptance','No data found');
986: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_po_acceptance: 901 - ' ||
987: 'EXCEPTION - no data found sql error: ' || sqlcode;
988: IF (g_po_wf_debug = 'Y') THEN
989: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
990: END IF;
991:
992: WHEN OTHERS THEN
993: wf_core.context ('PO_APPROVAL_REMINDER_SV','Process_po_acceptance','SQL error ' || sqlcode);
993: wf_core.context ('PO_APPROVAL_REMINDER_SV','Process_po_acceptance','SQL error ' || sqlcode);
994: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_po_acceptance: 990 - ' ||
995: 'EXCEPTION - sql error: ' || sqlcode;
996: IF (g_po_wf_debug = 'Y') THEN
997: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
998: END IF;
999:
1000: RAISE;
1001:
1073: BEGIN
1074:
1075: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_rel_acceptance: 01 - BEGIN ';
1076: IF (g_po_wf_debug = 'Y') THEN
1077: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
1078: END IF;
1079:
1080: l_itemkey := '';
1081:
1130:
1131: --bug 3896181
1132: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_rel_acceptance: 02 - item key exists ';
1133: IF (g_po_wf_debug = 'Y') THEN
1134: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
1135: END IF;
1136: IF trunc(l_acceptance_due_date) > trunc(sysdate) THEN
1137: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_rel_acceptance: 03 - acc_due_date > sysdate ';
1138: IF (g_po_wf_debug = 'Y') THEN
1135: END IF;
1136: IF trunc(l_acceptance_due_date) > trunc(sysdate) THEN
1137: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_rel_acceptance: 03 - acc_due_date > sysdate ';
1138: IF (g_po_wf_debug = 'Y') THEN
1139: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
1140: END IF;
1141: IF l_Item_end_date is not null then
1142: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_rel_acceptance: 04 - end_date not null';
1143: IF (g_po_wf_debug = 'Y') THEN
1140: END IF;
1141: IF l_Item_end_date is not null then
1142: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_rel_acceptance: 04 - end_date not null';
1143: IF (g_po_wf_debug = 'Y') THEN
1144: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
1145: END IF;
1146: --bug 3896181
1147:
1148: PO_APPROVAL_REMINDER_SV.Cancel_Notif (l_doc_type,
1164: COMMIT;
1165: ELSE -- l_Item_end_date is not null
1166: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_rel_acceptance: 05 - end_date is null';
1167: IF (g_po_wf_debug = 'Y') THEN
1168: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
1169: --bug 3896181
1170: END IF;
1171:
1172: --bug 3896181
1184: IF l_message_name = 'REL_ACCEPTANCE_PAST_DUE' then
1185: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_rel_acceptance: 06 - REL_ACCEPTANCE_PAST_DUE';
1186: --bug 3896181
1187: IF (g_po_wf_debug = 'Y') THEN
1188: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
1189: END IF;
1190: --bug 3896181
1191: PO_APPROVAL_REMINDER_SV.Cancel_Notif (l_doc_type,
1192: l_doc_header_id,
1215: ELSE -- trunc(l_acceptance_due_date) > trunc(sysdate)
1216: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_rel_acceptance: 07 - acc_due_date < sysdate';
1217: --bug 3896181
1218: IF (g_po_wf_debug = 'Y') THEN
1219: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
1220: END IF;
1221:
1222: --bug 3896181
1223: IF l_Item_end_date is not NULL THEN
1222: --bug 3896181
1223: IF l_Item_end_date is not NULL THEN
1224: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_rel_acceptance: 08 - end_date is not null';
1225: IF (g_po_wf_debug = 'Y') THEN
1226: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
1227: END IF;
1228: PO_APPROVAL_REMINDER_SV.Cancel_Notif (l_doc_type,
1229: l_doc_header_id,
1230: NULL);
1251: --bug 3896181
1252: ELSE -- l_Item_end_date is not NULL
1253: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_rel_acceptance: 09 - end_date is null';
1254: IF (g_po_wf_debug = 'Y') THEN
1255: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
1256: --bug 3896181
1257: END IF;
1258:
1259: --bug 3896181
1270: end ;
1271: If l_message_name = 'REL_ACCEPTANCE_REQUIRED' then
1272: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_rel_acceptance: 10 - REL_ACCEPTANCE_REQUIRED';
1273: IF (g_po_wf_debug = 'Y') THEN
1274: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
1275: END IF;
1276: PO_APPROVAL_REMINDER_SV.Cancel_Notif (l_doc_type,
1277: l_doc_header_id,
1278: NULL);
1297: ELSE -- l_item_exist = 'Y'
1298: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_rel_acceptance: 11 - l_item_exists is N';
1299: --bug 3896181
1300: IF (g_po_wf_debug = 'Y') THEN
1301: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
1302: END IF;
1303: --bug 3896181
1304: PO_APPROVAL_REMINDER_SV.Start_Approval_Reminder (l_doc_header_id,
1305: l_doc_number,
1326: CLOSE REL_acceptance;
1327:
1328: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_rel_acceptance: 900 - END ';
1329: IF (g_po_wf_debug = 'Y') THEN
1330: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
1331: END IF;
1332:
1333:
1334: EXCEPTION
1336: wf_core.context ('PO_APPROVAL_REMINDER_SV','Process_rel_acceptance','No data found');
1337: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_rel_acceptance: 901 - ' ||
1338: 'EXCEPTION - no data found sql error: ' || sqlcode;
1339: IF (g_po_wf_debug = 'Y') THEN
1340: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
1341: END IF;
1342:
1343: WHEN OTHERS THEN
1344: wf_core.context ('PO_APPROVAL_REMINDER_SV','Process_rel_acceptance','SQL error ' || sqlcode);
1344: wf_core.context ('PO_APPROVAL_REMINDER_SV','Process_rel_acceptance','SQL error ' || sqlcode);
1345: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_rel_acceptance: 990 - ' ||
1346: 'EXCEPTION - sql error: ' || sqlcode;
1347: IF (g_po_wf_debug = 'Y') THEN
1348: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
1349: END IF;
1350:
1351:
1352: RAISE;
1432: BEGIN
1433:
1434: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_rfq_quote: 01 - BEGIN ';
1435: IF (g_po_wf_debug = 'Y') THEN
1436: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
1437: END IF;
1438:
1439: l_itemkey := ' ';
1440:
1494:
1495:
1496: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_rfq_quote: 02 - sysdate : '||
1497: to_char(SYSDATE,'DD/MM/YYYY');
1498: --/* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
1499:
1500:
1501: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_rfq_quote: 02 - quote end date active : '||
1502: to_char(l_quote_end_date_active,'DD/MM/YYYY');
1499:
1500:
1501: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_rfq_quote: 02 - quote end date active : '||
1502: to_char(l_quote_end_date_active,'DD/MM/YYYY');
1503: --/* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
1504:
1505: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_rfq_quote: 02 - quote warning delay : '||
1506: l_quote_warning_delay;
1507: --/* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
1503: --/* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
1504:
1505: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_rfq_quote: 02 - quote warning delay : '||
1506: l_quote_warning_delay;
1507: --/* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
1508:
1509:
1510: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_rfq_quote: 02 - quote end date temp : '||
1511: to_char(l_quote_end_date_temp,'DD/MM/YYYY');
1508:
1509:
1510: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_rfq_quote: 02 - quote end date temp : '||
1511: to_char(l_quote_end_date_temp,'DD/MM/YYYY');
1512: --/* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
1513:
1514:
1515: -- check for Quotation date range
1516: IF to_date(to_char(SYSDATE,'DD/MM/YYYY'),'DD/MM/YYYY') <=
1521: l_start_ntfn_wf_ok := 'Y';
1522:
1523: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_rfq_quote: 02-set l_start_ntfn_wf_ok: '||
1524: l_start_ntfn_wf_ok;
1525: --/* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
1526:
1527: END IF;
1528:
1529: ELSE
1537:
1538: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_rfq_quote: 03 - l_start_ntfn_wf_ok: '||
1539: l_start_ntfn_wf_ok;
1540: IF (g_po_wf_debug = 'Y') THEN
1541: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
1542: END IF;
1543:
1544:
1545: IF l_start_ntfn_wf_ok = 'Y' THEN
1562: NULL;
1563:
1564: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_rfq_quote: 05 ' ||
1565: 'open WF item key exists ' ||l_itemkey;
1566: -- /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
1567:
1568: ELSE
1569: -- Workflow item does not exist
1570: -- Invoke the Start_Approval_Reminder workflow
1572:
1573: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_rfq_quote: 10 ' ||
1574: 'Start WF item key =' ||l_itemkey;
1575: IF (g_po_wf_debug = 'Y') THEN
1576: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
1577: END IF;
1578:
1579: PO_APPROVAL_REMINDER_SV.Start_Approval_Reminder (l_doc_header_id,
1580: l_doc_number,
1606:
1607:
1608: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_rfq_quote: 900 - END ';
1609: IF (g_po_wf_debug = 'Y') THEN
1610: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
1611: END IF;
1612:
1613:
1614: EXCEPTION
1616: wf_core.context ('PO_APPROVAL_REMINDER_SV','Process_rfq_quote','No data found');
1617: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_rfq_quote: 901 - ' ||
1618: 'EXCEPTION - no data found sql error: ' || sqlcode;
1619: IF (g_po_wf_debug = 'Y') THEN
1620: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
1621: END IF;
1622:
1623: WHEN OTHERS THEN
1624: wf_core.context ('PO_APPROVAL_REMINDER_SV','Process_rfq_quote','SQL error ' || sqlcode);
1624: wf_core.context ('PO_APPROVAL_REMINDER_SV','Process_rfq_quote','SQL error ' || sqlcode);
1625: l_progress := 'PO_APPROVAL_REMINDER_SV.Process_rfq_quote: 990 - ' ||
1626: 'EXCEPTION - sql error: ' || sqlcode;
1627: IF (g_po_wf_debug = 'Y') THEN
1628: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
1629: END IF;
1630:
1631: RAISE;
1632:
1666: BEGIN
1667:
1668: l_progress := 'PO_APPROVAL_REMINDER_SV.Start_Approval_Reminder: 01 ';
1669: IF (g_po_wf_debug = 'Y') THEN
1670: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
1671: END IF;
1672:
1673: fnd_profile.get('RESP_ID', l_responsibility_id);
1674: fnd_profile.get('RESP_APPL_ID', l_application_id);
1756: ItemKey => l_ItemKey );
1757:
1758: l_progress := 'PO_APPROVAL_REMINDER_SV.Start_Approval_Reminder: 900 ';
1759: IF (g_po_wf_debug = 'Y') THEN
1760: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
1761: END IF;
1762:
1763:
1764: EXCEPTION
1767: wf_core.context ('PO_APPROVAL_REMINDER_SV','Start_Approval_Reminder','SQL error ' || sqlcode);
1768: l_progress := 'PO_APPROVAL_REMINDER_SV.Start_Approval_Reminder: 990 - ' ||
1769: 'EXCEPTION - sql error: ' || sqlcode;
1770: IF (g_po_wf_debug = 'Y') THEN
1771: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
1772: END IF;
1773:
1774:
1775: RAISE;
1828: BEGIN
1829:
1830: l_progress := 'PO_APPROVAL_REMINDER_SV.Set_Doc_Type: 01 ';
1831: IF (g_po_wf_debug = 'Y') THEN
1832: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,l_progress);
1833: END IF;
1834:
1835:
1836: IF ( funmode = 'RUN' ) THEN
2105:
2106: l_progress := 'PO_APPROVAL_REMINDER_SV.Set_Doc_Type: 05 RESULT ' ||
2107: l_doc_type;
2108: IF (g_po_wf_debug = 'Y') THEN
2109: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,l_progress);
2110: END IF;
2111:
2112:
2113: ELSIF ( funmode = 'CANCEL' ) THEN
2118:
2119:
2120: l_progress := 'PO_APPROVAL_REMINDER_SV.Set_Doc_Type: 900 ';
2121: IF (g_po_wf_debug = 'Y') THEN
2122: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,l_progress);
2123: END IF;
2124:
2125:
2126: EXCEPTION
2128: wf_core.context ('PO_APPROVAL_REMINDER_SV','Set_Doc_Type','No data found');
2129: l_progress := 'PO_APPROVAL_REMINDER_SV.Set_Doc_Type: 901 - ' ||
2130: 'EXCEPTION - no data found sql error: ' || sqlcode;
2131: IF (g_po_wf_debug = 'Y') THEN
2132: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,l_progress);
2133: END IF;
2134:
2135: WHEN OTHERS THEN
2136: wf_core.context ('PO_APPROVAL_REMINDER_SV','Set_Doc_Type','SQL error ' || sqlcode);
2136: wf_core.context ('PO_APPROVAL_REMINDER_SV','Set_Doc_Type','SQL error ' || sqlcode);
2137: l_progress := 'PO_APPROVAL_REMINDER_SV.Set_Doc_Type: 990 - ' ||
2138: 'EXCEPTION - sql error: ' || sqlcode;
2139: IF (g_po_wf_debug = 'Y') THEN
2140: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,l_progress);
2141: END IF;
2142:
2143:
2144: RAISE;
2183: BEGIN
2184:
2185: l_progress := 'PO_APPROVAL_REMINDER_SV.Start_Doc_Approval: 01 ';
2186: IF (g_po_wf_debug = 'Y') THEN
2187: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,l_progress);
2188: END IF;
2189:
2190:
2191: IF ( funmode = 'RUN' ) THEN
2315:
2316:
2317: l_progress := 'PO_APPROVAL_REMINDER_SV.Start_Doc_Approval: 900 - END ';
2318: IF (g_po_wf_debug = 'Y') THEN
2319: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,l_progress);
2320: END IF;
2321:
2322:
2323: EXCEPTION
2325: wf_core.context ('PO_APPROVAL_REMINDER_SV','Start_Doc_Approval','No data found');
2326: l_progress := 'PO_APPROVAL_REMINDER_SV.Start_Doc_Approval: 901 - ' ||
2327: 'EXCEPTION - no data found sql error: ' || sqlcode;
2328: IF (g_po_wf_debug = 'Y') THEN
2329: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,l_progress);
2330: END IF;
2331:
2332:
2333: WHEN OTHERS THEN
2334: wf_core.context ('PO_APPROVAL_REMINDER_SV','Start_Doc_Approval','SQL error ' || sqlcode);
2335: l_progress := 'PO_APPROVAL_REMINDER_SV.Start_Doc_Approval: 990 - ' ||
2336: 'EXCEPTION - sql error: ' || sqlcode;
2337: IF (g_po_wf_debug = 'Y') THEN
2338: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,l_progress);
2339: END IF;
2340:
2341:
2342: RAISE;
2409:
2410: l_progress := 'PO_APPROVAL_REMINDER_SV.SetUpWorkFlow: 01 ' ||
2411: p_DocumentTypeCode || p_DocumentSubtype || p_DocumentNumber;
2412: IF (g_po_wf_debug = 'Y') THEN
2413: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug('APVRMDER',NULL,l_progress);
2414: END IF;
2415:
2416:
2417: PO_REQAPPROVAL_INIT1.get_multiorg_context (p_DocumentTypeCode, p_DocumentID, l_orgid);
2446: l_progress := 'PO_APPROVAL_REMINDER_SV.SetUpWorkFlow: 02 ' ||
2447: p_DocumentTypeCode || p_DocumentSubtype ||
2448: p_DocumentNumber;
2449: IF (g_po_wf_debug = 'Y') THEN
2450: PO_WF_DEBUG_PKG.insert_debug('POXWARMB',NULL,l_progress);
2451: END IF;
2452:
2453: PO_VENDOR_SITES_SV.Get_Transmission_Defaults(
2454: p_document_id => p_DocumentID,
2491: l_progress := 'PO_APPROVAL_REMINDER_SV.SetUpWorkFlow: 03 ' ||
2492: p_DocumentTypeCode || p_DocumentSubtype ||
2493: p_DocumentNumber;
2494: IF (g_po_wf_debug = 'Y') THEN
2495: PO_WF_DEBUG_PKG.insert_debug('POXWARMB',NULL,l_progress);
2496: END IF;
2497: po_approve_sv.get_document_types(
2498: p_document_type_code => p_DocumentTypeCode,
2499: p_document_subtype => p_DocumentSubtype,
2557: l_progress := 'PO_APPROVAL_REMINDER_SV.SetUpWorkFlow: 04 ' ||
2558: p_DocumentTypeCode || p_DocumentSubtype ||
2559: p_DocumentNumber;
2560: IF (g_po_wf_debug = 'Y') THEN
2561: PO_WF_DEBUG_PKG.insert_debug('POXWARMB',NULL,l_progress);
2562: END IF;
2563: PO_REQAPPROVAL_INIT1.Start_WF_Process ( ItemType => l_ItemType,
2564: ItemKey => l_ItemKey,
2565: WorkflowProcess => l_WorkflowProcess,
2583:
2584: l_progress := 'PO_APPROVAL_REMINDER_SV.SetUpWorkFlow: 900 ' ||
2585: p_DocumentTypeCode || p_DocumentSubtype || p_DocumentNumber;
2586: IF (g_po_wf_debug = 'Y') THEN
2587: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug('APVRMDER',l_itemkey,l_progress);
2588: END IF;
2589:
2590:
2591:
2595: wf_core.context ('PO_APPROVAL_REMINDER_SV','SetUpWorkFlow','SQL error ' || sqlcode);
2596: l_progress := 'PO_APPROVAL_REMINDER_SV.SetUpWorkFlow: 990 - ' ||
2597: 'EXCEPTION - sql error: ' || sqlcode;
2598: IF (g_po_wf_debug = 'Y') THEN
2599: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug('APVRMDER',l_itemkey,l_progress);
2600: END IF;
2601:
2602: RAISE;
2603:
2632: BEGIN
2633:
2634: x_progress := 'PO_APPROVAL_REMINDER_SV.Is_Forward_To_Valid: 01';
2635: IF (g_po_wf_debug = 'Y') THEN
2636: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
2637: END IF;
2638:
2639:
2640: -- Do nothing in cancel or timeout mode
2661:
2662: x_progress := 'PO_APPROVAL_REMINDER_SV.Is_Forward_To_Valid: 02';
2663: x_progress := x_progress || ' Forward-To=' || l_forward_to_username_response;
2664: IF (g_po_wf_debug = 'Y') THEN
2665: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
2666: END IF;
2667:
2668: IF l_forward_to_username_response is NULL THEN
2669:
2787:
2788:
2789: x_progress := 'PO_APPROVAL_REMINDER_SV.Is_Forward_To_Valid: 900';
2790: IF (g_po_wf_debug = 'Y') THEN
2791: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
2792: END IF;
2793:
2794:
2795: EXCEPTION
2798: wf_core.context ('PO_APPROVAL_REMINDER_SV','Is_Forward_To_Valid','SQL error ' || sqlcode);
2799: x_progress := 'PO_APPROVAL_REMINDER_SV.Is_Forward_To_Valid: 990 - ' ||
2800: 'EXCEPTION - sql error: ' || sqlcode;
2801: IF (g_po_wf_debug = 'Y') THEN
2802: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
2803: END IF;
2804:
2805:
2806: RAISE;
3085:
3086: EXCEPTION
3087: WHEN OTHERS THEN
3088: IF (g_po_wf_debug = 'Y') THEN
3089: PO_WF_DEBUG_PKG.insert_debug(null,null,x_progress);
3090: END IF;
3091: wf_core.context ('PO_APPROVAL_REMINDER_SV','Process_Cancel_notification','SQL error ' || sqlcode);
3092: RAISE;
3093:
3135: WHEN NO_DATA_FOUND THEN
3136: return FALSE;
3137: WHEN OTHERS THEN
3138: IF (g_po_wf_debug = 'Y') THEN
3139: PO_WF_DEBUG_PKG.insert_debug(null,null,x_progress);
3140: END IF;
3141: wf_core.context ('PO_APPROVAL_REMINDER_SV','Process_Check_Status','SQL error ' || sqlcode);
3142: RAISE;
3143: return FALSE;
3166: BEGIN
3167:
3168:
3169: l_progress := 'PO_APPROVAL_REMINDER_SV.Item_Exist: 01';
3170: -- /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(p_itemtype,p_itemkey,l_progress);
3171:
3172: -- initialize the return variables
3173: p_item_exist := NULL;
3174: p_item_end_date := NULL;
3180: AND WI.ITEM_KEY = p_ItemKey;
3181:
3182:
3183: l_progress := 'PO_APPROVAL_REMINDER_SV.Item_Exist: 900 ';
3184: -- /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(p_itemtype,p_itemkey,l_progress);
3185:
3186:
3187: EXCEPTION
3188: WHEN NO_DATA_FOUND THEN
3196: wf_core.context ('PO_APPROVAL_REMINDER_SV','Item_exist','SQL error ' || sqlcode);
3197: l_progress := 'PO_APPROVAL_REMINDER_SV.Item_Exist: 990 - ' ||
3198: 'EXCEPTION - sql error: ' || sqlcode;
3199: IF (g_po_wf_debug = 'Y') THEN
3200: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(p_itemtype,p_itemkey,l_progress);
3201: END IF;
3202:
3203: RAISE;
3204: