70: 'po_number = ' || po_number || '/ ' ||
71: 'interface_source_code = ' || interface_source_code;
72:
73: IF (g_po_wf_debug = 'Y') THEN
74: po_wf_debug_pkg.insert_debug(Itemtype,Itemkey,x_progress);
75: END IF;
76:
77:
78: /* If a process is passed then it will be run
91: process => workflow_process );
92:
93: x_progress:= '20: start_wf_process: Just after CreateProcess';
94: IF (g_po_wf_debug = 'Y') THEN
95: po_wf_debug_pkg.insert_debug(Itemtype,Itemkey,x_progress);
96: END IF;
97:
98:
99: /* Initialize workflow item attributes */
187: /* Kick off the process */
188:
189: x_progress := '30: start_wf_process: Kicking off StartProcess ';
190: IF (g_po_wf_debug = 'Y') THEN
191: po_wf_debug_pkg.insert_debug(Itemtype,Itemkey,x_progress);
192: END IF;
193:
194: wf_engine.StartProcess(itemtype => itemtype,
195: itemkey => itemkey );
235: resultout := wf_engine.eng_completed || ':' || 'Y';
236:
237: x_progress:= '10: should_req_be_autocreated: result = Y';
238: IF (g_po_wf_debug = 'Y') THEN
239: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
240: END IF;
241:
242: else
243: resultout := wf_engine.eng_completed || ':' || 'N';
243: resultout := wf_engine.eng_completed || ':' || 'N';
244:
245: x_progress:= '20: should_req_be_autocreated: result = N';
246: IF (g_po_wf_debug = 'Y') THEN
247: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
248: END IF;
249: end if;
250:
251: exception
498: x_progress:= '10: launch_req_line_processing: Just before opening cursor c1 ' ||
499: 'for req_header_id = ' || to_char(x_req_header_id);
500:
501: IF (g_po_wf_debug = 'Y') THEN
502: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
503: END IF;
504:
505: --Bug 10243160 Added IF x_req_header_id is not null condition
506: IF x_req_header_id is not null then
514:
515: x_progress:= '20: launch_req_line_processing in CLM flow : In loop,fetched C_CLMReqLines req_line_id = '||
516: to_char(x_req_line_id);
517: IF (g_po_wf_debug = 'Y') THEN
518: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
519: END IF;
520:
521: /* Get the unique sequence to make sure item key will be unique */
522:
542: || '/ ' || 'called_item_key = ' || x_ItemKey || '/ ' ||
543: 'group_id = ' || to_char(x_group_id);
544:
545: IF (g_po_wf_debug = 'Y') THEN
546: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
547: END IF;
548:
549: po_autocreate_doc.start_wf_line_process (x_ItemType,
550: x_ItemKey,
569:
570: x_progress:= '20: launch_req_line_processing: In loop,fetched c1 req_line_id = '||
571: to_char(x_req_line_id);
572: IF (g_po_wf_debug = 'Y') THEN
573: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
574: END IF;
575:
576: /* Get the unique sequence to make sure item key will be unique */
577:
597: || '/ ' || 'called_item_key = ' || x_ItemKey || '/ ' ||
598: 'group_id = ' || to_char(x_group_id);
599:
600: IF (g_po_wf_debug = 'Y') THEN
601: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
602: END IF;
603:
604: po_autocreate_doc.start_wf_line_process (x_ItemType,
605: x_ItemKey,
623:
624: x_progress:= '21: launch_req_line_processing: In loop,fetched c2 req_line_id = '||
625: to_char(x_req_line_id);
626: IF (g_po_wf_debug = 'Y') THEN
627: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
628: END IF;
629:
630: /* Get the unique sequence to make sure item key will be unique */
631:
651: || '/ ' || 'called_item_key = ' || x_ItemKey || '/ ' ||
652: 'group_id = ' || to_char(x_group_id);
653:
654: IF (g_po_wf_debug = 'Y') THEN
655: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
656: END IF;
657:
658: po_autocreate_doc.start_wf_line_process (x_ItemType,
659: x_ItemKey,
670: resultout := wf_engine.eng_completed || ':' || 'ACTIVITY_PERFORMED';
671:
672: x_progress:= '40:launch_req_line_processing: result = ACTIVITY_PERFORMED';
673: IF (g_po_wf_debug = 'Y') THEN
674: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
675: END IF;
676:
677: --
678: ELSE --if l_consume_req_demand_doc_id is not null
700: || 'for l_consume_req_demand_doc_id='
701: || to_char(l_consume_req_demand_doc_id);
702:
703: IF (g_po_wf_debug = 'Y') THEN
704: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
705: END IF;
706:
707: OPEN C_ConsumeReqLines;
708:
713: x_progress:= '20: launch_req_line_processing: In loop,fetched'
714: ||' C_ConsumeReqLines req_line_id = '
715: || to_char(x_req_line_id);
716: IF (g_po_wf_debug = 'Y') THEN
717: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
718: END IF;
719:
720: --Get the unique sequence to make sure item key will be unique
721:
739: || x_ItemKey || '/ ' || 'group_id = '
740: || to_char(x_group_id);
741:
742: IF (g_po_wf_debug = 'Y') THEN
743: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
744: END IF;
745:
746: po_autocreate_doc.start_wf_line_process (x_ItemType,
747: x_ItemKey,
758: resultout := wf_engine.eng_completed || ':' || 'ACTIVITY_PERFORMED';
759:
760: x_progress:='40:launch_req_line_processing: result =ACTIVITY_PERFORMED';
761: IF (g_po_wf_debug = 'Y') THEN
762: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
763: END IF;
764: END IF; --l_consume_req_demand_doc_id is null--
765: --
766:
799:
800: x_progress := '10: start_wf_line_process: Called with item_type = ' || ItemType ||
801: '/ '|| 'item_key = ' || ItemKey;
802: IF (g_po_wf_debug = 'Y') THEN
803: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
804: END IF;
805:
806: /* If a process is passed then it will be run
807: * If a process is not passed then the selector function defined in
816: process => workflow_process );
817:
818: x_progress := '20: start_wf_line_process: Just after CreateProcess';
819: IF (g_po_wf_debug = 'Y') THEN
820: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
821: END IF;
822:
823: /* Initialize workflow item attributes */
824:
850: /* Kick off the process */
851:
852: x_progress:= '30: start_wf_line_process: Kicking off StartProcess';
853: IF (g_po_wf_debug = 'Y') THEN
854: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
855: END IF;
856:
857: wf_engine.StartProcess(itemtype => itemtype,
858: itemkey => itemkey );
862: exception
863: when others then
864: x_progress:= '40: start_wf_line_process: IN EXCEPTION';
865: IF (g_po_wf_debug = 'Y') THEN
866: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
867: END IF;
868: raise;
869: end start_wf_line_process;
870:
986:
987: x_progress:= '10: get_req_info: Just after executing sql stmt with req_line_id ' ||
988: to_char(x_req_line_id);
989: IF (g_po_wf_debug = 'Y') THEN
990: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
991: END IF;
992:
993:
994: /* Set the item attributes */
1144: resultout := wf_engine.eng_completed || ':' || 'ACTIVITY_PERFORMED';
1145:
1146: x_progress:= '20: get_req_info: result = ACTIVITY_PERFORMED';
1147: IF (g_po_wf_debug = 'Y') THEN
1148: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
1149: END IF;
1150:
1151: exception
1152: when others then
1210: resultout := wf_engine.eng_completed || ':' || 'Y';
1211:
1212: x_progress:= '10: rfq_required_check: result = Y';
1213: IF (g_po_wf_debug = 'Y') THEN
1214: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
1215: END IF;
1216:
1217: else
1218: resultout := wf_engine.eng_completed || ':' || 'N';
1218: resultout := wf_engine.eng_completed || ':' || 'N';
1219:
1220: x_progress:= '20: rfq_required_check: result = N';
1221: IF (g_po_wf_debug = 'Y') THEN
1222: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
1223: END IF;
1224:
1225: end if;
1226:
1334:
1335: x_progress:= '10: get_supp_info_for_acrt: result = N ' ||
1336: 'because the supplier id is invalid';
1337: IF (g_po_wf_debug = 'Y') THEN
1338: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
1339: END IF;
1340:
1341: purge_expense_lines(itemtype, itemkey); --
1342:
1366:
1367: x_progress:= '20: get_supp_info_for_acrt: result = N ' ||
1368: 'because the supplier is null or invalid';
1369: IF (g_po_wf_debug = 'Y') THEN
1370: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
1371: END IF;
1372:
1373: purge_expense_lines(itemtype, itemkey); --
1374:
1414:
1415: x_progress:= '30: get_supp_info_for_acrt: result = N ' ||
1416: 'becuase the supplier site id is invalid';
1417: IF (g_po_wf_debug = 'Y') THEN
1418: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
1419: END IF;
1420:
1421: purge_expense_lines(itemtype, itemkey); --
1422:
1445:
1446: x_progress:= '40: get_supp_info_for_acrt: result = N ' ||
1447: 'becuase the supplier site is null or invalid';
1448: IF (g_po_wf_debug = 'Y') THEN
1449: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
1450: END IF;
1451:
1452: purge_expense_lines(itemtype, itemkey); --
1453:
1483: resultout := wf_engine.eng_completed || ':' || 'Y';
1484:
1485: x_progress:= '50: get_supp_info_for_acrt: result = Y';
1486: IF (g_po_wf_debug = 'Y') THEN
1487: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
1488: END IF;
1489:
1490: exception
1491: when others then
1554: resultout := wf_engine.eng_completed || ':' || 'N';
1555:
1556: x_progress:= '10: is_source_doc_info_ok: result = N';
1557: IF (g_po_wf_debug = 'Y') THEN
1558: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
1559: END IF;
1560:
1561: --
1562: --Do not create PO if the referenced GA/Blanket is not valid
1585: x_progress:= '30: is_source_doc_info_ok: result = Y';
1586: END IF;
1587:
1588: IF (g_po_wf_debug = 'Y') THEN
1589: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
1590: END IF;
1591:
1592: --
1593:
1595: resultout := wf_engine.eng_completed || ':' || 'Y';
1596:
1597: x_progress:= '40: is_source_doc_info_ok: result = Y';
1598: IF (g_po_wf_debug = 'Y') THEN
1599: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
1600: END IF;
1601:
1602: end if;
1603:
1919: resultout := wf_engine.eng_completed || ':' || 'N';
1920:
1921: x_progress:= '10: is_req_pcard_line: result = N';
1922: IF (g_po_wf_debug = 'Y') THEN
1923: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
1924: END IF;
1925:
1926: purge_expense_lines(itemtype, itemkey); --
1927:
1929: resultout := wf_engine.eng_completed || ':' || 'Y';
1930:
1931: x_progress:= '20: is_req_pcard_line: result = Y';
1932: IF (g_po_wf_debug = 'Y') THEN
1933: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
1934: END IF;
1935:
1936: end if;
1937:
1980: resultout := wf_engine.eng_completed || ':' || 'ACTION_FAILED';
1981:
1982: x_progress:= '10: get_buyer_from_req_line: result = ACTION_FAILED';
1983: IF (g_po_wf_debug = 'Y') THEN
1984: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
1985: END IF;
1986:
1987: else
1988: resultout := wf_engine.eng_completed || ':' || 'ACTION_SUCCEEDED';
1988: resultout := wf_engine.eng_completed || ':' || 'ACTION_SUCCEEDED';
1989:
1990: x_progress:= '20: get_buyer_from_req_line: result = ACTION_SUCCEEDED';
1991: IF (g_po_wf_debug = 'Y') THEN
1992: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
1993: END IF;
1994:
1995: end if;
1996:
2079: resultout := wf_engine.eng_completed || ':' || 'ACTION_FAILED';
2080:
2081: x_progress:='10: get_buyer_from_item: result = ACTION_FAILED';
2082: IF (g_po_wf_debug = 'Y') THEN
2083: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
2084: END IF;
2085:
2086: else
2087: po_wf_util_pkg.SetItemAttrNumber (itemtype => itemtype,
2092: resultout := wf_engine.eng_completed || ':' || 'ACTION_SUCCEEDED';
2093:
2094: x_progress:='20: get_buyer_from_item: result = ACTION_SUCCEEDED';
2095: IF (g_po_wf_debug = 'Y') THEN
2096: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
2097: END IF;
2098:
2099: end if;
2100:
2160: x_agent_id := NULL;
2161:
2162: x_progress := '10: get_buyer_from_category: More than 1 buyer for this category ';
2163: IF (g_po_wf_debug = 'Y') THEN
2164: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
2165: END IF;
2166:
2167: when NO_DATA_FOUND then
2168:
2169: x_agent_id := NULL;
2170:
2171: x_progress := '20:get_buyer_from_category: No buyer assinged to category';
2172: IF (g_po_wf_debug = 'Y') THEN
2173: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
2174: END IF;
2175:
2176: end;
2177:
2205: x_agent_id := NULL;
2206:
2207: x_progress := '10: get_buyer_from_category: More than 1 buyer for this category ';
2208: IF (g_po_wf_debug = 'Y') THEN
2209: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
2210: END IF;
2211:
2212: when NO_DATA_FOUND then
2213:
2214: x_agent_id := NULL;
2215:
2216: x_progress := '20:get_buyer_from_category: No buyer assinged to category';
2217: IF (g_po_wf_debug = 'Y') THEN
2218: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
2219: END IF;
2220:
2221: end;
2222:
2234: resultout := wf_engine.eng_completed || ':' || 'ACTION_FAILED';
2235:
2236: x_progress := '30:get_buyer_from_category: result = ACTION_FAILED';
2237: IF (g_po_wf_debug = 'Y') THEN
2238: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
2239: END IF;
2240:
2241:
2242: else
2248: resultout := wf_engine.eng_completed || ':' || 'ACTION_SUCCEEDED';
2249:
2250: x_progress := '40:get_buyer_from_category: result = ACTION_SUCCEEDED';
2251: IF (g_po_wf_debug = 'Y') THEN
2252: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
2253: END IF;
2254:
2255: end if;
2256:
2313: when NO_DATA_FOUND then
2314: x_agent_id := NULL;
2315: x_progress := '10:get_buyer_from_source_doc: Source Doc id is wrong';
2316: IF (g_po_wf_debug = 'Y') THEN
2317: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
2318: END IF;
2319: end;
2320: else
2321: /* Right now, it's for pcard one-time item po, need to figure out
2335: resultout := wf_engine.eng_completed || ':' || 'ACTION_FAILED';
2336:
2337: x_progress := '30:get_buyer_from_source_doc: result = ACTION_FAILED';
2338: IF (g_po_wf_debug = 'Y') THEN
2339: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
2340: END IF;
2341:
2342:
2343: else
2349: resultout := wf_engine.eng_completed || ':' || 'ACTION_SUCCEEDED';
2350:
2351: x_progress := '40:get_buyer_from_source_doc: result = ACTION_SUCCEEDED';
2352: IF (g_po_wf_debug = 'Y') THEN
2353: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
2354: END IF;
2355:
2356: end if;
2357:
2421: resultout := wf_engine.eng_completed || ':' || 'ACTION_FAILED';
2422:
2423: x_progress := '30:get_buyer_from_source_doc: result = ACTION_FAILED';
2424: IF (g_po_wf_debug = 'Y') THEN
2425: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
2426: END IF;
2427:
2428: purge_expense_lines(itemtype, itemkey); --
2429:
2436: resultout := wf_engine.eng_completed || ':' || 'ACTION_SUCCEEDED';
2437:
2438: x_progress := '40:get_buyer_from_contract: result = ACTION_SUCCEEDED';
2439: IF (g_po_wf_debug = 'Y') THEN
2440: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
2441: END IF;
2442:
2443: end if;
2444:
2491: resultout := wf_engine.eng_completed || ':' || 'NONE';
2492:
2493: x_progress := '10: get_source_doc_type: result = NONE';
2494: IF (g_po_wf_debug = 'Y') THEN
2495: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
2496: END IF;
2497:
2498: elsif (x_source_doc_type_code = 'BLANKET') then
2499: if nvl(x_ga_flag,'N') = 'Y' then -- FPI GA
2505: end if;
2506:
2507: x_progress := '10: get_source_doc_type: result = BLANKET_PO';
2508: IF (g_po_wf_debug = 'Y') THEN
2509: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
2510: END IF;
2511:
2512: elsif (x_source_doc_type_code = 'CONTRACT') then
2513: resultout := wf_engine.eng_completed || ':' || 'CONTRACT_PO';
2513: resultout := wf_engine.eng_completed || ':' || 'CONTRACT_PO';
2514:
2515: x_progress := '10: get_source_doc_type: result = CONTRACT_PO';
2516: IF (g_po_wf_debug = 'Y') THEN
2517: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
2518: END IF;
2519:
2520: else
2521: /* Must be QUOTATION */
2522: resultout := wf_engine.eng_completed || ':' || 'QUOTATION';
2523:
2524: x_progress := '10: get_source_doc_type: result = QUOTATION';
2525: IF (g_po_wf_debug = 'Y') THEN
2526: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
2527: END IF;
2528:
2529: end if;
2530:
2563: resultout := wf_engine.eng_completed || ':' || 'Y';
2564:
2565: x_progress:= '10: one_time_item_check: result = Y';
2566: IF (g_po_wf_debug = 'Y') THEN
2567: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
2568: END IF;
2569:
2570: else
2571: resultout := wf_engine.eng_completed || ':' || 'N';
2571: resultout := wf_engine.eng_completed || ':' || 'N';
2572:
2573: x_progress:= '10: one_time_item_check: result = N';
2574: IF (g_po_wf_debug = 'Y') THEN
2575: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
2576: END IF;
2577:
2578: end if;
2579:
2750: resultout := wf_engine.eng_completed || ':' || 'NO_METHOD_FOUND';
2751:
2752: x_progress:= '10: get_rel_gen_method: result = NO_METHOD_FOUND';
2753: IF (g_po_wf_debug = 'Y') THEN
2754: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
2755: END IF;
2756:
2757: else
2758: resultout := wf_engine.eng_completed || ':' || x_rel_gen_method;
2758: resultout := wf_engine.eng_completed || ':' || x_rel_gen_method;
2759:
2760: x_progress:= '20: get_rel_gen_method: ' || 'result = ' || x_rel_gen_method;
2761: IF (g_po_wf_debug = 'Y') THEN
2762: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
2763: END IF;
2764: end if;
2765:
2766: --
2805: resultout := wf_engine.eng_completed || ':' || 'Y';
2806:
2807: x_progress:= '10: cont_wf_autocreate_rel_gen: Y';
2808: IF (g_po_wf_debug = 'Y') THEN
2809: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
2810: END IF;
2811:
2812: else
2813: resultout := wf_engine.eng_completed || ':' || 'N';
2813: resultout := wf_engine.eng_completed || ':' || 'N';
2814:
2815: x_progress:= '20: cont_wf_autocreate_rel_gen: N';
2816: IF (g_po_wf_debug = 'Y') THEN
2817: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
2818: END IF;
2819:
2820: -- Remove any associated expense line
2821: purge_expense_lines(itemtype, itemkey); --
2978: x_progress := '10:insert_cand_req_lines_into_tbl: inserting into temp table for ' ||
2979: 'req line = ' || to_char(x_req_line_id);
2980:
2981: IF (g_po_wf_debug = 'Y') THEN
2982: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
2983: END IF;
2984:
2985: begin
2986: INSERT INTO po_wf_candidate_req_lines_temp
3026: when others then
3027: x_progress := '15: insert_cand_req_lines_into_tbl: IN EXCEPTION when inserting' ||
3028: 'into po_wf_candidate_req_lines_temp';
3029: IF (g_po_wf_debug = 'Y') THEN
3030: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
3031: END IF;
3032: raise;
3033: end;
3034:
3039: resultout := wf_engine.eng_completed || ':' || 'ACTIVITY_PERFORMED';
3040:
3041: x_progress:= '20: insert_cand_req_lines_into_tbl: ACTIVITY_PERFORMED';
3042: IF (g_po_wf_debug = 'Y') THEN
3043: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
3044: END IF;
3045:
3046: exception
3047: when others then
3343: c1_valid_style := TRUE;
3344:
3345: x_progress := '01: group_req_lines : c1_req_line_id = '|| to_char(c1_req_line_id);
3346: IF (g_po_wf_debug = 'Y') THEN
3347: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
3348: END IF;
3349:
3350: -- bug 4923134
3351:
3350: -- bug 4923134
3351:
3352: x_progress := '01: group_req_lines : c1_source_doc_id = '|| to_char(c1_source_doc_id);
3353: IF (g_po_wf_debug = 'Y') THEN
3354: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
3355: END IF;
3356:
3357: x_progress := '01: group_req_lines : c1_contract_id = '|| to_char(c1_contract_id);
3358: IF (g_po_wf_debug = 'Y') THEN
3355: END IF;
3356:
3357: x_progress := '01: group_req_lines : c1_contract_id = '|| to_char(c1_contract_id);
3358: IF (g_po_wf_debug = 'Y') THEN
3359: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
3360: END IF;
3361:
3362:
3363: if (nvl(c1_source_doc_id,c1_contract_id) is not null) then
3365: c1_style_id := PO_DOC_STYLE_PVT.get_doc_style_id(nvl(c1_source_doc_id,c1_contract_id)); -- bug 4923134
3366:
3367: x_progress := '01: group_req_lines : c1_style_id = '|| to_char(c1_style_id);
3368: IF (g_po_wf_debug = 'Y') THEN
3369: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
3370: END IF;
3371:
3372: PO_DOC_STYLE_PVT.style_validate_req_attrs(p_api_version => 1.0,
3373: p_init_msg_list => fnd_api.g_true,
3395: if c1_valid_style then --< R12 STYLES PHASE II>
3396:
3397: x_progress := '01: group_req_lines : c1_req_line_id = '|| to_char(c1_req_line_id)||'valid style';
3398: IF (g_po_wf_debug = 'Y') THEN
3399: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
3400: END IF;
3401:
3402: /* FPI GA start */
3403: if (c1_source_doc_id is not null) then
3536: --
3537: c2_valid_style := TRUE;
3538: x_progress := '02: group_req_lines : c2_req_line_id = '|| to_char(c2_req_line_id);
3539: IF (g_po_wf_debug = 'Y') THEN
3540: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
3541: END IF;
3542:
3543: -- bug 4923134
3544: x_progress := '02: group_req_lines : c2_source_doc_id = '|| to_char(c2_source_doc_id);
3542:
3543: -- bug 4923134
3544: x_progress := '02: group_req_lines : c2_source_doc_id = '|| to_char(c2_source_doc_id);
3545: IF (g_po_wf_debug = 'Y') THEN
3546: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
3547: END IF;
3548:
3549: x_progress := '02: group_req_lines : c2_contract_id = '|| to_char(c2_contract_id);
3550: IF (g_po_wf_debug = 'Y') THEN
3547: END IF;
3548:
3549: x_progress := '02: group_req_lines : c2_contract_id = '|| to_char(c2_contract_id);
3550: IF (g_po_wf_debug = 'Y') THEN
3551: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
3552: END IF;
3553:
3554: if (nvl(c2_source_doc_id,c2_contract_id) is not null) then
3555:
3556: c2_style_id := PO_DOC_STYLE_PVT.get_doc_style_id(nvl(c2_source_doc_id,c2_contract_id)); -- bug 4923134
3557:
3558: x_progress := '02: group_req_lines : c2_style_id = '|| to_char(c2_style_id);
3559: IF (g_po_wf_debug = 'Y') THEN
3560: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
3561: END IF;
3562:
3563: PO_DOC_STYLE_PVT.style_validate_req_attrs(p_api_version => 1.0,
3564: p_init_msg_list => fnd_api.g_true,
3586: if c2_valid_style then --
3587:
3588: x_progress := '02: group_req_lines : c2_req_line_id = '|| to_char(c2_req_line_id)||'valid style';
3589: IF (g_po_wf_debug = 'Y') THEN
3590: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
3591: END IF;
3592:
3593: /* FPI GA start */
3594: if (c2_source_doc_id is not null) then
3682: x_suggested_vendor_contact_id := get_contact_id(x_suggested_vendor_contact, c2_suggested_vendor_site_id);
3683: end if;
3684:
3685: IF (g_po_wf_debug = 'Y') THEN
3686: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
3687: END IF;
3688:
3689: /* Bug 1362315
3690: When you initiate the create doc workflow from requisition import
3741: THEN
3742:
3743: x_progress := '20: group_req_lines: c1 and c2 match ';
3744: IF (g_po_wf_debug = 'Y') THEN
3745: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
3746: END IF;
3747:
3748:
3749: /* Update the process code of the current line in the temp table so
3756: -- Bug# 1721991, where current of c2;
3757:
3758: x_progress:= '30:group_req_lines: Updated process_code ';
3759: IF (g_po_wf_debug = 'Y') THEN
3760: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
3761: END IF;
3762:
3763: -- bug 14314684, When the Req has multiple lines with same suggested supplier
3764: -- but with different sourcing document, create doc wf should create different Awards
3774: -- removed as c2_style_id is always populated after bug5695323
3775:
3776: x_progress:= '30:group_req_lines: is progress payments ';
3777: IF (g_po_wf_debug = 'Y') THEN
3778: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
3779: END IF;
3780:
3781: if PO_DOC_STYLE_PVT.is_progress_payments_enabled(c2_style_id) then
3782: l_pcard_id := NULL;
3857:
3858: x_progress := '40: group_req_lines: inserted header'||
3859: ' and line for req line = ' || to_char(c2_req_line_id);
3860: IF (g_po_wf_debug = 'Y') THEN
3861: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
3862: END IF;
3863: /* bug 2656323
3864: Added code to update vendor_contact_id when po_headers is inserted for first time. */
3865: if (x_carry_contact_to_po_flag = 'TRUE' and
3870: where interface_header_id = x_interface_header_id;
3871: exception
3872: when others then
3873: IF (g_po_wf_debug = 'Y') THEN
3874: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
3875: END IF;
3876: end;
3877: end if;
3878:
3905:
3906: x_progress := '50: group_req_lines: inserted just line for '||
3907: 'req line = ' || to_char(c2_req_line_id);
3908: IF (g_po_wf_debug = 'Y') THEN
3909: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
3910: END IF;
3911:
3912: --bug#3586181
3913: if (x_carry_contact_to_po_flag = 'TRUE') then -- SS
3937: */
3938: else
3939: x_progress := '02: group_req_lines : c2_req_line_id = '|| to_char(c2_req_line_id)||'invalid style';
3940: IF (g_po_wf_debug = 'Y') THEN
3941: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
3942: END IF;
3943:
3944: end if ; --if c2_valid_style --
3945:
3954: where interface_header_id = x_interface_header_id;
3955: exception
3956: when others then
3957: IF (g_po_wf_debug = 'Y') THEN
3958: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
3959: END IF;
3960: end;
3961: end if;
3962: */
3989: /* End 3586181 */
3990: else
3991: x_progress := '01: group_req_lines : c1_req_line_id = '|| to_char(c1_req_line_id)||'invalid style';
3992: IF (g_po_wf_debug = 'Y') THEN
3993: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
3994: END IF;
3995: end if; --if c1_valid_style --
3996:
3997:
4006: resultout := wf_engine.eng_completed || ':' || 'ACTIVITY_PERFORMED';
4007:
4008: x_progress := '60: group_req_lines: result = ACTIVITY_PERFORMED ';
4009: IF (g_po_wf_debug = 'Y') THEN
4010: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
4011: END IF;
4012:
4013: exception
4014: when others then
4212: x_progress := '30: insert_into_headers_interface: Just about to get doc' ||
4213: 'num from po_unique_identifier_control';
4214:
4215: IF (g_po_wf_debug = 'Y') THEN
4216: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
4217: END IF;
4218:
4219: /*
4220: Bug# 1869409
4230:
4231: x_progress := '40: insert_into_headers_interface: Got doc' ||
4232: 'num from po_unique_identifier_control';
4233: IF (g_po_wf_debug = 'Y') THEN
4234: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
4235: END IF;
4236:
4237: end if;
4238:
4256:
4257: x_progress := '45: insert_into_headers_interface: document_num is a ' ||
4258: 'duplicate - not going to insert into po_headers_interface';
4259: IF (g_po_wf_debug = 'Y') THEN
4260: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
4261: END IF;
4262:
4263: raise;
4264: end;
4318: IF l_pou_default_rate_type IS NULL THEN
4319: IF (g_po_wf_debug = 'Y') THEN
4320: x_progress := '47: insert_into_headers_interface: Purchasing Operating unit' ||
4321: ' has no default rate type, cannot create PO';
4322: po_wf_debug_pkg.insert_debug (itemtype, itemkey, x_progress);
4323: END IF;
4324: return FALSE;
4325: END IF;
4326:
4340: IF l_pou_default_rate_type IS NULL THEN
4341: IF (g_po_wf_debug = 'Y') THEN
4342: x_progress := '47: insert_into_headers_interface: Purchasing Operating unit' ||
4343: ' has no default rate type, cannot create PO';
4344: po_wf_debug_pkg.insert_debug (itemtype, itemkey, x_progress);
4345: END IF;
4346:
4347: return FALSE;
4348: END IF;
4357: THEN
4358: IF (g_po_wf_debug = 'Y') THEN
4359: x_progress := '48: insert_into_headers_interface: No rate defined to' ||
4360: ' convert from Requesting OU currency to PO currency, cannot create PO';
4361: po_wf_debug_pkg.insert_debug (itemtype, itemkey, x_progress);
4362: END IF;
4363: return FALSE;
4364: END IF;
4365: END IF;
4450:
4451: x_progress := '50: insert_into_headers_interface: Just about to insert into ' ||
4452: 'po_headers_interface';
4453: IF (g_po_wf_debug = 'Y') THEN
4454: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
4455: END IF;
4456:
4457: x_progress := '11: the doc type to be created ' || x_doc_type_to_create ;
4458:
4456:
4457: x_progress := '11: the doc type to be created ' || x_doc_type_to_create ;
4458:
4459: IF (g_po_wf_debug = 'Y') THEN
4460: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
4461: END IF;
4462:
4463: begin
4464: insert into po_headers_interface
4522: when others then
4523: x_progress := '55: insert_into_headers_interface: IN EXCEPTION when '||
4524: 'inserting into po_headers_interface';
4525: IF (g_po_wf_debug = 'Y') THEN
4526: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
4527: END IF;
4528:
4529: raise;
4530: end;
4531:
4532: x_progress := '60: insert_into_headers_interface: Inserted into ' ||
4533: 'po_headers_interface';
4534: IF (g_po_wf_debug = 'Y') THEN
4535: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
4536: END IF;
4537:
4538: /* The interface_header_id is returned as an out parameter so that
4539: * subsequent lines can be tied to this same header if needed.
4678: x_progress := '10: insert_into_lines_interface: Just about to insert into ' ||
4679: 'po_lines_interface';
4680:
4681: IF (g_po_wf_debug = 'Y') THEN
4682: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
4683: END IF;
4684:
4685: x_progress := '11: the doc type to be created ' || x_doc_type_to_create ;
4686:
4684:
4685: x_progress := '11: the doc type to be created ' || x_doc_type_to_create ;
4686:
4687: IF (g_po_wf_debug = 'Y') THEN
4688: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
4689: END IF;
4690: /*Bug11802312 We ll retain the document reference for an consigned PO*/
4691: begin
4692: insert into po_lines_interface
4724: when others then
4725: x_progress:= '15: insert_into_lines_interface: IN EXCEPTION when' ||
4726: 'inserting into po_lines_interface';
4727: IF (g_po_wf_debug = 'Y') THEN
4728: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
4729: END IF;
4730: raise;
4731: end;
4732:
4732:
4733: x_progress := '20: insert_into_lines_interface: Inserted into ' ||
4734: 'po_lines_interface';
4735: IF (g_po_wf_debug = 'Y') THEN
4736: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
4737: END IF;
4738:
4739:
4740: exception
4838: ' x_org_id (from workflow)= '|| to_char(x_org_id) ||
4839: ' l_vendor_site_id (from interface table)='||to_char(l_vendor_site_id);
4840:
4841: IF (g_po_wf_debug = 'Y') THEN
4842: PO_WF_DEBUG_PKG.insert_debug(itemtype => itemtype,
4843: itemkey => itemkey,
4844: x_progress => x_progress);
4845: END IF;
4846:
4868: x_progress:= '10: launch_doc_creation_approval: '||
4869: ' Called start_wf_create_apprv_process with itemkey = '||
4870: x_Itemkey;
4871: IF (g_po_wf_debug = 'Y') THEN
4872: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
4873: END IF;
4874:
4875: po_autocreate_doc.start_wf_create_apprv_process (x_ItemType,
4876: x_ItemKey,
4891: resultout := wf_engine.eng_completed || ':' || 'ACTIVITY_PERFORMED';
4892:
4893: x_progress := '20: launch_doc_creation_approval: result = ACTIVITY_PERFORMED';
4894: IF (g_po_wf_debug = 'Y') THEN
4895: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
4896: END IF;
4897:
4898: exception
4899: when others then
4929: x_progress := '10: start_wf_create_apprv_process: This was called with' ||
4930: 'ItemType = ' || ItemType || '/ ' || 'ItemKey = ' || ItemKey;
4931:
4932: IF (g_po_wf_debug = 'Y') THEN
4933: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
4934: END IF;
4935:
4936:
4937: /* If a process is passed then it will be run
4947: process => workflow_process );
4948:
4949: x_progress:= '20. start_wf_create_apprv_process: Just after create process';
4950: IF (g_po_wf_debug = 'Y') THEN
4951: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
4952: END IF;
4953:
4954: /* Set the item attributes */
4955:
4997: x_progress:= '30. start_wf_create_apprv_process: Kicking off StartProcess ' ||
4998: 'with item_type = ' || itemtype || '/ ' || 'item_key = ' ||
4999: itemkey;
5000: IF (g_po_wf_debug = 'Y') THEN
5001: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
5002: END IF;
5003:
5004: wf_engine.StartProcess(itemtype => itemtype,
5005: itemkey => itemkey );
5009: exception
5010: when others then
5011: x_progress:= '40. start_wf_create_apprv_process: IN EXCEPTION';
5012: IF (g_po_wf_debug = 'Y') THEN
5013: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
5014: END IF;
5015: raise;
5016: end start_wf_create_apprv_process;
5017:
5087:
5088: x_progress:= '10: create_doc: Kicking off backend with' ||
5089: 'interface_header_id = '|| to_char(x_interface_header_id);
5090: IF (g_po_wf_debug = 'Y') THEN
5091: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
5092: END IF;
5093:
5094: --
5095: /*Logic to get the group shipments value in the purchasing options
5125: 'doc_id = ' || to_char(x_autocreated_doc_id) || '/ ' ||
5126: 'num_lines_processed = ' || to_char(x_num_lines_processed);
5127:
5128: IF (g_po_wf_debug = 'Y') THEN
5129: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
5130: END IF;
5131:
5132:
5133: /* If at least one req line got processed then we have succeeded in
5150: resultout := wf_engine.eng_completed || ':' || 'CREATE_OK';
5151:
5152: x_progress:= '30: create_doc: result = CREATE_OK';
5153: IF (g_po_wf_debug = 'Y') THEN
5154: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
5155: END IF;
5156:
5157: else
5158: resultout := wf_engine.eng_completed || ':' || 'CREATE_FAILED';
5158: resultout := wf_engine.eng_completed || ':' || 'CREATE_FAILED';
5159:
5160: x_progress:= '40: create_doc: result = CREATE_FAILED';
5161: IF (g_po_wf_debug = 'Y') THEN
5162: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
5163: END IF;
5164:
5165: end if;
5166:
5346:
5347: x_progress := '10: setup_notification_data: Got the doc num created.' ||
5348: 'Just before call to get_user_name';
5349: IF (g_po_wf_debug = 'Y') THEN
5350: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
5351: END IF;
5352:
5353: po_reqapproval_init1.get_user_name(x_agent_id, x_username, x_user_display_name);
5354:
5360:
5361: x_progress := '20: setup_notification_data: Username = ' || x_username ||
5362: 'End of setup_notification_data';
5363: IF (g_po_wf_debug = 'Y') THEN
5364: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
5365: END IF;
5366:
5367: exception
5368: when others then
5460: p_calling_program => 'AUTOCREATED_DOC_WF');
5461:
5462: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
5463: IF (g_po_wf_debug = 'Y') THEN
5464: po_wf_debug_pkg.insert_debug(itemtype,itemkey,'Tax Errored ');
5465: END IF;
5466: END IF;
5467:
5468: --
5485: resultout := wf_engine.eng_completed || ':' || 'N';
5486:
5487: x_progress:= '0: should_doc_be_approved: result = N';
5488: IF (g_po_wf_debug = 'Y') THEN
5489: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
5490: END IF;
5491:
5492: ELSIF l_default_method = 'FAX' AND (l_fax_number IS NULL OR l_fax_number='') THEN
5493: resultout := wf_engine.eng_completed || ':' || 'N';
5493: resultout := wf_engine.eng_completed || ':' || 'N';
5494:
5495: x_progress:= '1: should_doc_be_approved: result = N';
5496: IF (g_po_wf_debug = 'Y') THEN
5497: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
5498: END IF;
5499: ELSE
5500: resultout := wf_engine.eng_completed || ':' || 'Y';
5501:
5500: resultout := wf_engine.eng_completed || ':' || 'Y';
5501:
5502: x_progress:= '10: should_doc_be_approved: result = Y';
5503: IF (g_po_wf_debug = 'Y') THEN
5504: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
5505: END IF;
5506: END IF;
5507: --END of code changes for the bug 14243104 fix
5508:
5510: resultout := wf_engine.eng_completed || ':' || 'N';
5511:
5512: x_progress:= '20: should_doc_be_approved: result = N';
5513: IF (g_po_wf_debug = 'Y') THEN
5514: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
5515: END IF;
5516:
5517: end if;
5518:
5813: '/ ' || 'doc_type = ' || x_doc_type || '/ ' || 'x_doc_id = ' ||
5814: to_char(x_doc_id);
5815:
5816: IF (g_po_wf_debug = 'Y') THEN
5817: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
5818: END IF;
5819:
5820: po_reqapproval_init1.start_wf_process(
5821: x_ItemType,
5841: resultout := wf_engine.eng_completed || ':' || 'ACTIVITY_PERFORMED';
5842:
5843: x_progress:= '20: launch_po_approval: result = ACTIVITY_PERFORMED';
5844: IF (g_po_wf_debug = 'Y') THEN
5845: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
5846: END IF;
5847:
5848: --
5849: IF x_org_id <> l_purchasing_org_id THEN
5894: resultout := wf_engine.eng_completed || ':' || 'ACTIVITY_PERFORMED';
5895:
5896: x_progress:= '10: purge_rows_from_temp_table: result = ACTIVITY_PERFORMED';
5897: IF (g_po_wf_debug = 'Y') THEN
5898: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
5899: END IF;
5900:
5901:
5902:
5938:
5939: resultout := wf_engine.eng_completed || ':' || 'N';
5940: x_progress:= '10: is_this_emergency_req: result = N';
5941: IF (g_po_wf_debug = 'Y') THEN
5942: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
5943: END IF;
5944:
5945: END;
5946:
5947: IF x_emergency_po_num IS NOT NULL THEN
5948: resultout := wf_engine.eng_completed || ':' || 'Y';
5949: x_progress:= '20: is_this_emergency_req: result = Y';
5950: IF (g_po_wf_debug = 'Y') THEN
5951: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
5952: END IF;
5953:
5954: ELSE
5955: resultout := wf_engine.eng_completed || ':' || 'N';
5954: ELSE
5955: resultout := wf_engine.eng_completed || ':' || 'N';
5956: x_progress:= '30: is_this_emergency_req: result = N';
5957: IF (g_po_wf_debug = 'Y') THEN
5958: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
5959: END IF;
5960:
5961: END IF;
5962:
6089:
6090: x_progress := '10: put_on_one_po : group_id '||
6091: to_char(x_group_id);
6092: IF (g_po_wf_debug = 'Y') THEN
6093: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
6094: END IF;
6095:
6096:
6097: /* only true for the first line */
6235: x_progress := '20: put_on_one_po: inserted header'||
6236: ' and line for req line = ' ||
6237: to_char(c_req_line_id);
6238: IF (g_po_wf_debug = 'Y') THEN
6239: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
6240: END IF;
6241:
6242: x_first_time_for_this_comb := 'FALSE';
6243:
6277:
6278: x_progress := '30: put_on_one_po: inserted just line for '||
6279: 'req line = ' || to_char(c_req_line_id);
6280: IF (g_po_wf_debug = 'Y') THEN
6281: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
6282: END IF;
6283:
6284: end if;
6285:
6299:
6300: exception
6301: when others then
6302: IF (g_po_wf_debug = 'Y') THEN
6303: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
6304: END IF;
6305: end;
6306: end if;
6307:
6309: resultout := wf_engine.eng_completed || ':' || 'ACTIVITY_PERFORMED';
6310:
6311: x_progress := '40: put_on_one_po: result = ACTIVITY_PERFORMED ';
6312: IF (g_po_wf_debug = 'Y') THEN
6313: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
6314: END IF;
6315:
6316: exception
6317: when others then
6500:
6501: x_progress := 'PO_AUTOCREATE_DOC.send_return_notif: 050 - '||
6502: 'itemtype: ' || ItemType || 'itemkey: ' || ItemKey;
6503: IF (g_po_wf_debug = 'Y') THEN
6504: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
6505: END IF;
6506:
6507: -- Set the attributes
6508: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
6627:
6628: -- Start Process
6629: x_progress := 'PO_AUTOCREATE_DOC.send_return_notif: 055';
6630: IF (g_po_wf_debug = 'Y') THEN
6631: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
6632: END IF;
6633:
6634: wf_engine.StartProcess(itemtype => itemtype,
6635: itemkey => itemkey );
6817: resultout := wf_engine.eng_completed || ':' || 'Y';
6818:
6819: x_progress:= '10: non_catalog_item_check: result = '|| resultout;
6820: IF (g_po_wf_debug = 'Y') THEN
6821: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
6822: END IF;
6823:
6824: end if;
6825:
6980: end if;
6981:
6982: x_progress:= '10: is_source_doc_info_ok: result = ' || resultout;
6983: IF (g_po_wf_debug = 'Y') THEN
6984: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
6985: END IF;
6986:
6987: po_wf_util_pkg.SetItemAttrNumber (itemtype => itemtype,
6988: itemkey => itemkey,
7003: resultout := wf_engine.eng_completed || ':' || 'N';
7004:
7005: x_progress:= '20: is_contract_info_ok: result = N';
7006: IF (g_po_wf_debug = 'Y') THEN
7007: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
7008: END IF;
7009:
7010: end if;
7011:
7169: resultout := wf_engine.eng_completed || ':' || 'N';
7170: end if;
7171:
7172: IF (g_po_wf_debug = 'Y') THEN
7173: po_wf_debug_pkg.insert_debug(Itemtype,Itemkey,x_progress);
7174: END IF;
7175:
7176: exception
7177: when others then
7366: END IF; --source doc check
7367: END IF; --check profile option
7368:
7369: IF (g_po_wf_debug = 'Y') THEN
7370: po_wf_debug_pkg.insert_debug (itemtype, itemkey, x_progress);
7371: END IF;
7372:
7373: EXCEPTION
7374: WHEN OTHERS THEN
7484: END IF; --contract_id check
7485: END IF; --check profile option
7486:
7487: IF (g_po_wf_debug = 'Y') THEN
7488: po_wf_debug_pkg.insert_debug (itemtype, itemkey, x_progress);
7489: END IF;
7490:
7491: EXCEPTION
7492: WHEN OTHERS THEN
7562: resultout := wf_engine.eng_completed || ':' || 'Y';
7563: END IF;
7564:
7565: IF (g_po_wf_debug = 'Y') THEN
7566: po_wf_debug_pkg.insert_debug (itemtype, itemkey, x_progress);
7567: END IF;
7568:
7569: EXCEPTION
7570:
7735: END IF;
7736:
7737: IF (g_po_wf_debug = 'Y')
7738: THEN
7739: po_wf_debug_pkg.insert_debug (itemtype, itemkey, x_progress);
7740: END IF;
7741: EXCEPTION
7742: WHEN OTHERS
7743: THEN
7900:
7901: l_progress:= '10: is_expense_line: result = Y';
7902:
7903: IF (g_po_wf_debug = 'Y') THEN
7904: po_wf_debug_pkg.insert_debug(itemtype,
7905: itemkey,
7906: l_progress);
7907: END IF;
7908:
7911:
7912: l_progress:= '20: is_expense_line: result = N';
7913:
7914: IF (g_po_wf_debug = 'Y') THEN
7915: po_wf_debug_pkg.insert_debug(itemtype,
7916: itemkey,
7917: l_progress);
7918: END IF;
7919: END IF;
8021: resultout := wf_engine.eng_completed || ':' || 'Y';
8022:
8023: x_progress:= '10: temp_labor_item_check: result = '|| resultout;
8024: IF (g_po_wf_debug = 'Y') THEN
8025: po_wf_debug_pkg.insert_debug(itemtype,itemkey,x_progress);
8026: END IF;
8027:
8028: end if;
8029: