560: x_tokenname := 'DOC_NUMBER';
561: x_tokenvalue := x_document_num;
562: end if;
563: IF (g_po_pdoi_write_to_file = 'Y') THEN
564: PO_DEBUG.put_line ('x_colname:' || (x_colname));
565: PO_DEBUG.put_line ('x_tokenname:' || (x_tokenname));
566: PO_DEBUG.put_line ('x_tokenvalue:' ||(x_tokenvalue));
567: END IF;
568: /* Cto Changes FPH end */
561: x_tokenvalue := x_document_num;
562: end if;
563: IF (g_po_pdoi_write_to_file = 'Y') THEN
564: PO_DEBUG.put_line ('x_colname:' || (x_colname));
565: PO_DEBUG.put_line ('x_tokenname:' || (x_tokenname));
566: PO_DEBUG.put_line ('x_tokenvalue:' ||(x_tokenvalue));
567: END IF;
568: /* Cto Changes FPH end */
569: IF x_temp = 0 THEN
562: end if;
563: IF (g_po_pdoi_write_to_file = 'Y') THEN
564: PO_DEBUG.put_line ('x_colname:' || (x_colname));
565: PO_DEBUG.put_line ('x_tokenname:' || (x_tokenname));
566: PO_DEBUG.put_line ('x_tokenvalue:' ||(x_tokenvalue));
567: END IF;
568: /* Cto Changes FPH end */
569: IF x_temp = 0 THEN
570:
572: /* call the error handling routine with the error code =
573: 'PDOI_INVALID_ORIGINAL_CATALOG' */
574:
575: IF (g_po_pdoi_write_to_file = 'Y') THEN
576: PO_DEBUG.put_line ('X_vendor_id:' || to_char(X_vendor_id));
577: PO_DEBUG.put_line ('X_vendor_doc_num:' || X_vendor_doc_num);
578: PO_DEBUG.put_line ('X_vendor_doc_num:' || X_vendor_doc_num);
579: PO_DEBUG.put_line ('x_document_num:' || X_vendor_doc_num);
580: END IF;
573: 'PDOI_INVALID_ORIGINAL_CATALOG' */
574:
575: IF (g_po_pdoi_write_to_file = 'Y') THEN
576: PO_DEBUG.put_line ('X_vendor_id:' || to_char(X_vendor_id));
577: PO_DEBUG.put_line ('X_vendor_doc_num:' || X_vendor_doc_num);
578: PO_DEBUG.put_line ('X_vendor_doc_num:' || X_vendor_doc_num);
579: PO_DEBUG.put_line ('x_document_num:' || X_vendor_doc_num);
580: END IF;
581: if ( X_vendor_doc_num is null and x_document_num is null) then
574:
575: IF (g_po_pdoi_write_to_file = 'Y') THEN
576: PO_DEBUG.put_line ('X_vendor_id:' || to_char(X_vendor_id));
577: PO_DEBUG.put_line ('X_vendor_doc_num:' || X_vendor_doc_num);
578: PO_DEBUG.put_line ('X_vendor_doc_num:' || X_vendor_doc_num);
579: PO_DEBUG.put_line ('x_document_num:' || X_vendor_doc_num);
580: END IF;
581: if ( X_vendor_doc_num is null and x_document_num is null) then
582: x_colname := 'VENDOR_DOC_NUM';
575: IF (g_po_pdoi_write_to_file = 'Y') THEN
576: PO_DEBUG.put_line ('X_vendor_id:' || to_char(X_vendor_id));
577: PO_DEBUG.put_line ('X_vendor_doc_num:' || X_vendor_doc_num);
578: PO_DEBUG.put_line ('X_vendor_doc_num:' || X_vendor_doc_num);
579: PO_DEBUG.put_line ('x_document_num:' || X_vendor_doc_num);
580: END IF;
581: if ( X_vendor_doc_num is null and x_document_num is null) then
582: x_colname := 'VENDOR_DOC_NUM';
583: x_tokenname := 'DOC_NUMBER';
634: ELSIF x_temp > 1 THEN
635: /* if returns more than 1 row, it is an error */
636: X_progress := '040';
637: IF (g_po_pdoi_write_to_file = 'Y') THEN
638: PO_DEBUG.put_line ('X_vendor_doc_num:' || X_vendor_doc_num);
639: PO_DEBUG.put_line ('x_document_num:' || X_vendor_doc_num);
640: END IF;
641: --
642: -- Added the following 'if/else' for standard purchase orders.
635: /* if returns more than 1 row, it is an error */
636: X_progress := '040';
637: IF (g_po_pdoi_write_to_file = 'Y') THEN
638: PO_DEBUG.put_line ('X_vendor_doc_num:' || X_vendor_doc_num);
639: PO_DEBUG.put_line ('x_document_num:' || X_vendor_doc_num);
640: END IF;
641: --
642: -- Added the following 'if/else' for standard purchase orders.
643:
690: --
691: -- Valid original catalog exists and can be updated.
692: --
693: IF (g_po_pdoi_write_to_file = 'Y') THEN
694: PO_DEBUG.put_line ('Valid catalog/blanket exists and can be updated');
695: END IF;
696:
697: -- Bug 2449186. Truncate dates when comparing them. Also refactored update.
698: --
715: --
716: -- Added the following api to check whether the document is in valid
717: -- status and updateable.
718: IF (g_po_pdoi_write_to_file = 'Y') THEN
719: PO_DEBUG.put_line ('Calling status check api for standard POs');
720: END IF;
721:
722: PO_DOCUMENT_CHECKS_GRP.po_status_check(
723: p_api_version => 1.0,
759: if x_po_status_rec.updatable_flag(1) = 'N' or
760: x_consigned_consumption_flag='Y' then
761:
762: if (g_po_pdoi_write_to_file = 'Y') THEN
763: PO_DEBUG.put_line ('Standard PO is not updatable');
764: PO_DEBUG.put_line('x_po_status_rec.updatable_flag is ' || x_po_status_rec.updatable_flag(1));
765: PO_DEBUG.put_line ('x_consigned_consumption_flag is
766: '|| x_consigned_consumption_flag);
767: end if;
760: x_consigned_consumption_flag='Y' then
761:
762: if (g_po_pdoi_write_to_file = 'Y') THEN
763: PO_DEBUG.put_line ('Standard PO is not updatable');
764: PO_DEBUG.put_line('x_po_status_rec.updatable_flag is ' || x_po_status_rec.updatable_flag(1));
765: PO_DEBUG.put_line ('x_consigned_consumption_flag is
766: '|| x_consigned_consumption_flag);
767: end if;
768:
761:
762: if (g_po_pdoi_write_to_file = 'Y') THEN
763: PO_DEBUG.put_line ('Standard PO is not updatable');
764: PO_DEBUG.put_line('x_po_status_rec.updatable_flag is ' || x_po_status_rec.updatable_flag(1));
765: PO_DEBUG.put_line ('x_consigned_consumption_flag is
766: '|| x_consigned_consumption_flag);
767: end if;
768:
769: po_interface_errors_sv1.handle_interface_errors(
871: x_temp := 0;
872: end if;
873:
874: IF (g_po_pdoi_write_to_file = 'Y') THEN
875: po_debug.put_line ('Value of count(*) is :' || to_char(x_temp));
876: END IF;
877:
878: IF x_temp = 0 THEN
879: