359: x_ship_via_lookup_code := NULL;
360: x_fob_lookup_code := NULL;
361: x_freight_terms_lu_code := NULL;
362: x_terms_id := NULL;
363: fnd_message.set_name('PO', 'PO_MISSING_FSP_VALUES');
364: po_copydoc_s1.online_report(x_online_report_id,
365: x_sequence,
366: substr(fnd_message.get, 1, 240),
367: 0, 0, 0);
362: x_terms_id := NULL;
363: fnd_message.set_name('PO', 'PO_MISSING_FSP_VALUES');
364: po_copydoc_s1.online_report(x_online_report_id,
365: x_sequence,
366: substr(fnd_message.get, 1, 240),
367: 0, 0, 0);
368: WHEN OTHERS THEN
369: x_ship_to_location_id := NULL;
370: x_bill_to_location_id := NULL;
518: -- This field has to be not NULL, because it's a mandatory field.
519: -- unless DB is corrupted.
520:
521: IF (x_buyer_id IS NULL) THEN
522: fnd_message.set_name('PO', 'PO_PO_MISSING_BUYER_ID');
523: po_copydoc_s1.online_report(x_online_report_id,
524: x_sequence,
525: substr(fnd_message.get, 1, 240),
526: 0, 0, 0);
521: IF (x_buyer_id IS NULL) THEN
522: fnd_message.set_name('PO', 'PO_PO_MISSING_BUYER_ID');
523: po_copydoc_s1.online_report(x_online_report_id,
524: x_sequence,
525: substr(fnd_message.get, 1, 240),
526: 0, 0, 0);
527:
528: ELSE
529: x_progress := '001';
540:
541: EXCEPTION
542: WHEN NO_DATA_FOUND THEN
543: x_buyer_id := NULL;
544: fnd_message.set_name('PO', 'PO_RI_INVALID_SUGGESTED_BUYER');
545: po_copydoc_s1.online_report(x_online_report_id,
546: x_sequence,
547: substr(fnd_message.get, 1, 240),
548: 0, 0, 0);
543: x_buyer_id := NULL;
544: fnd_message.set_name('PO', 'PO_RI_INVALID_SUGGESTED_BUYER');
545: po_copydoc_s1.online_report(x_online_report_id,
546: x_sequence,
547: substr(fnd_message.get, 1, 240),
548: 0, 0, 0);
549: WHEN OTHERS THEN
550: x_buyer_id := NULL;
551: po_copydoc_s1.copydoc_sql_error('validate_buyer_id', x_progress, sqlcode,
586: AND SYSDATE BETWEEN nvl(start_date_active, SYSDATE-1)
587: AND nvl(end_date_active, SYSDATE+1);
588: EXCEPTION
589: WHEN NO_DATA_FOUND THEN
590: fnd_message.set_name('PO', 'PO_PDOI_INVALID_VENDOR');
591: fnd_message.set_token('VALUE', to_char(x_vendor_id), FALSE);
592: x_vendor_id := NULL;
593: po_copydoc_s1.online_report(x_online_report_id,
594: x_sequence,
587: AND nvl(end_date_active, SYSDATE+1);
588: EXCEPTION
589: WHEN NO_DATA_FOUND THEN
590: fnd_message.set_name('PO', 'PO_PDOI_INVALID_VENDOR');
591: fnd_message.set_token('VALUE', to_char(x_vendor_id), FALSE);
592: x_vendor_id := NULL;
593: po_copydoc_s1.online_report(x_online_report_id,
594: x_sequence,
595: substr(fnd_message.get, 1, 240),
591: fnd_message.set_token('VALUE', to_char(x_vendor_id), FALSE);
592: x_vendor_id := NULL;
593: po_copydoc_s1.online_report(x_online_report_id,
594: x_sequence,
595: substr(fnd_message.get, 1, 240),
596: 0, 0, 0);
597: WHEN OTHERS THEN
598: x_vendor_id := NULL;
599: po_copydoc_s1.copydoc_sql_error('validate_vendor', x_progress, sqlcode,
617: AND purchasing_site_flag = 'Y'
618: AND SYSDATE < nvl(inactive_date, SYSDATE + 1);
619: EXCEPTION
620: WHEN NO_DATA_FOUND THEN
621: fnd_message.set_name('PO', 'PO_PDOI_INVALID_VENDOR_SITE');
622: fnd_message.set_token('VALUE', to_char(x_vendor_site_id), FALSE);
623: x_vendor_site_id := NULL;
624: po_copydoc_s1.online_report(x_online_report_id,
625: x_sequence,
618: AND SYSDATE < nvl(inactive_date, SYSDATE + 1);
619: EXCEPTION
620: WHEN NO_DATA_FOUND THEN
621: fnd_message.set_name('PO', 'PO_PDOI_INVALID_VENDOR_SITE');
622: fnd_message.set_token('VALUE', to_char(x_vendor_site_id), FALSE);
623: x_vendor_site_id := NULL;
624: po_copydoc_s1.online_report(x_online_report_id,
625: x_sequence,
626: substr(fnd_message.get, 1, 240),
622: fnd_message.set_token('VALUE', to_char(x_vendor_site_id), FALSE);
623: x_vendor_site_id := NULL;
624: po_copydoc_s1.online_report(x_online_report_id,
625: x_sequence,
626: substr(fnd_message.get, 1, 240),
627: 0, 0, 0);
628: WHEN OTHERS THEN
629: x_vendor_site_id := NULL;
630: po_copydoc_s1.copydoc_sql_error('validate_vendor', x_progress, sqlcode,
646: AND vendor_site_id = x_vendor_site_id
647: AND SYSDATE < nvl(inactive_date, SYSDATE+1);
648: EXCEPTION
649: WHEN NO_DATA_FOUND THEN
650: fnd_message.set_name('PO', 'PO_PDOI_INVALID_VDR_CNTCT');
651: fnd_message.set_token('VALUE', to_char(x_vendor_contact_id), FALSE);
652: x_vendor_contact_id := NULL;
653: po_copydoc_s1.online_report(x_online_report_id,
654: x_sequence,
647: AND SYSDATE < nvl(inactive_date, SYSDATE+1);
648: EXCEPTION
649: WHEN NO_DATA_FOUND THEN
650: fnd_message.set_name('PO', 'PO_PDOI_INVALID_VDR_CNTCT');
651: fnd_message.set_token('VALUE', to_char(x_vendor_contact_id), FALSE);
652: x_vendor_contact_id := NULL;
653: po_copydoc_s1.online_report(x_online_report_id,
654: x_sequence,
655: substr(fnd_message.get, 1, 240),
651: fnd_message.set_token('VALUE', to_char(x_vendor_contact_id), FALSE);
652: x_vendor_contact_id := NULL;
653: po_copydoc_s1.online_report(x_online_report_id,
654: x_sequence,
655: substr(fnd_message.get, 1, 240),
656: 0, 0, 0);
657: WHEN OTHERS THEN
658: x_vendor_contact_id := NULL;
659: po_copydoc_s1.copydoc_sql_error('validate_vendor', x_progress, sqlcode,
742: AND (set_of_books_id IS NULL OR set_of_books_id = x_sob_id);
743: EXCEPTION
744: WHEN NO_DATA_FOUND THEN
745: x_ship_to_location_id := NULL;
746: fnd_message.set_name('PO', 'PO_PO_SHIP_LOCN_INVALID');
747: po_copydoc_s1.online_report(x_online_report_id,
748: x_sequence,
749: substr(fnd_message.get, 1, 240),
750: 0, 0, 0);
745: x_ship_to_location_id := NULL;
746: fnd_message.set_name('PO', 'PO_PO_SHIP_LOCN_INVALID');
747: po_copydoc_s1.online_report(x_online_report_id,
748: x_sequence,
749: substr(fnd_message.get, 1, 240),
750: 0, 0, 0);
751: WHEN OTHERS THEN
752: x_ship_to_location_id := NULL;
753: po_copydoc_s1.copydoc_sql_error('validate_location_terms', x_progress, sqlcode,
765: FROM HR_BILLING_LOCATIONS_PO_V
766: WHERE location_id = x_bill_to_location_id;
767: EXCEPTION
768: WHEN NO_DATA_FOUND THEN
769: fnd_message.set_name('PO', 'PO_PDOI_INVALID_BILL_LOC_ID');
770: fnd_message.set_token('VALUE', to_char(x_bill_to_location_id));
771: x_bill_to_location_id := NULL;
772: po_copydoc_s1.online_report(x_online_report_id,
773: x_sequence,
766: WHERE location_id = x_bill_to_location_id;
767: EXCEPTION
768: WHEN NO_DATA_FOUND THEN
769: fnd_message.set_name('PO', 'PO_PDOI_INVALID_BILL_LOC_ID');
770: fnd_message.set_token('VALUE', to_char(x_bill_to_location_id));
771: x_bill_to_location_id := NULL;
772: po_copydoc_s1.online_report(x_online_report_id,
773: x_sequence,
774: substr(fnd_message.get, 1, 240),
770: fnd_message.set_token('VALUE', to_char(x_bill_to_location_id));
771: x_bill_to_location_id := NULL;
772: po_copydoc_s1.online_report(x_online_report_id,
773: x_sequence,
774: substr(fnd_message.get, 1, 240),
775: 0, 0, 0);
776: WHEN OTHERS THEN
777: x_bill_to_location_id := NULL;
778: po_copydoc_s1.copydoc_sql_error('validate_location_terms', x_progress, sqlcode,
792: AND SYSDATE < nvl(inactive_date, SYSDATE+1)
793: AND lookup_code = x_fob_lookup_code;
794: EXCEPTION
795: WHEN NO_DATA_FOUND THEN
796: fnd_message.set_name('PO', 'PO_PDOI_INVALID_FOB');
797: fnd_message.set_token('VALUE', x_fob_lookup_code, FALSE);
798: x_fob_lookup_code := NULL;
799: po_copydoc_s1.online_report(x_online_report_id,
800: x_sequence,
793: AND lookup_code = x_fob_lookup_code;
794: EXCEPTION
795: WHEN NO_DATA_FOUND THEN
796: fnd_message.set_name('PO', 'PO_PDOI_INVALID_FOB');
797: fnd_message.set_token('VALUE', x_fob_lookup_code, FALSE);
798: x_fob_lookup_code := NULL;
799: po_copydoc_s1.online_report(x_online_report_id,
800: x_sequence,
801: substr(fnd_message.get, 1, 240),
797: fnd_message.set_token('VALUE', x_fob_lookup_code, FALSE);
798: x_fob_lookup_code := NULL;
799: po_copydoc_s1.online_report(x_online_report_id,
800: x_sequence,
801: substr(fnd_message.get, 1, 240),
802: 0, 0, 0);
803: WHEN OTHERS THEN
804: x_fob_lookup_code := NULL;
805: po_copydoc_s1.copydoc_sql_error('validate_location_terms', x_progress, sqlcode,
819: AND SYSDATE < nvl(inactive_date, SYSDATE+1)
820: AND lookup_code = x_freight_terms_lu_code;
821: EXCEPTION
822: WHEN NO_DATA_FOUND THEN
823: fnd_message.set_name('PO', 'PO_PDOI_INVALID_FREIGHT_TERMS');
824: fnd_message.set_token('VALUE', x_freight_terms_lu_code, FALSE);
825: x_freight_terms_lu_code := NULL;
826: po_copydoc_s1.online_report(x_online_report_id,
827: x_sequence,
820: AND lookup_code = x_freight_terms_lu_code;
821: EXCEPTION
822: WHEN NO_DATA_FOUND THEN
823: fnd_message.set_name('PO', 'PO_PDOI_INVALID_FREIGHT_TERMS');
824: fnd_message.set_token('VALUE', x_freight_terms_lu_code, FALSE);
825: x_freight_terms_lu_code := NULL;
826: po_copydoc_s1.online_report(x_online_report_id,
827: x_sequence,
828: substr(fnd_message.get, 1, 240),
824: fnd_message.set_token('VALUE', x_freight_terms_lu_code, FALSE);
825: x_freight_terms_lu_code := NULL;
826: po_copydoc_s1.online_report(x_online_report_id,
827: x_sequence,
828: substr(fnd_message.get, 1, 240),
829: 0, 0, 0);
830: WHEN OTHERS THEN
831: x_freight_terms_lu_code := NULL;
832: po_copydoc_s1.copydoc_sql_error('validate_location_terms', x_progress, sqlcode,
844: FROM AP_TERMS_VAL_V
845: WHERE term_id = x_terms_id;
846: EXCEPTION
847: WHEN NO_DATA_FOUND THEN
848: fnd_message.set_name('PO', 'PO_PDOI_INVALID_PAY_TERMS');
849: fnd_message.set_token('VALUE', to_char(x_terms_id), FALSE);
850: x_terms_id := NULL;
851: po_copydoc_s1.online_report(x_online_report_id,
852: x_sequence,
845: WHERE term_id = x_terms_id;
846: EXCEPTION
847: WHEN NO_DATA_FOUND THEN
848: fnd_message.set_name('PO', 'PO_PDOI_INVALID_PAY_TERMS');
849: fnd_message.set_token('VALUE', to_char(x_terms_id), FALSE);
850: x_terms_id := NULL;
851: po_copydoc_s1.online_report(x_online_report_id,
852: x_sequence,
853: substr(fnd_message.get, 1, 240),
849: fnd_message.set_token('VALUE', to_char(x_terms_id), FALSE);
850: x_terms_id := NULL;
851: po_copydoc_s1.online_report(x_online_report_id,
852: x_sequence,
853: substr(fnd_message.get, 1, 240),
854: 0, 0, 0);
855: WHEN OTHERS THEN
856: x_terms_id := NULL;
857: po_copydoc_s1.copydoc_sql_error('validate_location_terms', x_progress, sqlcode,
893: AND purchasing_enabled_flag = 'Y'
894: AND organization_id = x_inv_org_id;
895: EXCEPTION
896: WHEN NO_DATA_FOUND THEN
897: fnd_message.set_name('PO', 'PO_PDOI_ITEM_INVALID');
898: fnd_message.set_token('ITEM', to_char(x_item_id), FALSE);
899: x_item_id := NULL;
900: po_copydoc_s1.online_report(x_online_report_id,
901: x_sequence,
894: AND organization_id = x_inv_org_id;
895: EXCEPTION
896: WHEN NO_DATA_FOUND THEN
897: fnd_message.set_name('PO', 'PO_PDOI_ITEM_INVALID');
898: fnd_message.set_token('ITEM', to_char(x_item_id), FALSE);
899: x_item_id := NULL;
900: po_copydoc_s1.online_report(x_online_report_id,
901: x_sequence,
902: substr(fnd_message.get, 1, 240),
898: fnd_message.set_token('ITEM', to_char(x_item_id), FALSE);
899: x_item_id := NULL;
900: po_copydoc_s1.online_report(x_online_report_id,
901: x_sequence,
902: substr(fnd_message.get, 1, 240),
903: x_line_num, 0, 0);
904: x_return_code := -1;
905: RETURN;
906: WHEN OTHERS THEN
934: EXCEPTION
935: WHEN NO_DATA_FOUND THEN
936: x_item_id := NULL;
937: -- Bug 3488117: Truncate at 2000 characters instead of 240.
938: fnd_message.set_name('PO', 'PO_RI_LINE_TYPE_ITEM_MISMATCH');
939: po_copydoc_s1.online_report(x_online_report_id,
940: x_sequence,
941: substr(fnd_message.get, 1, 2000),
942: x_line_num, 0, 0);
937: -- Bug 3488117: Truncate at 2000 characters instead of 240.
938: fnd_message.set_name('PO', 'PO_RI_LINE_TYPE_ITEM_MISMATCH');
939: po_copydoc_s1.online_report(x_online_report_id,
940: x_sequence,
941: substr(fnd_message.get, 1, 2000),
942: x_line_num, 0, 0);
943: x_return_code := -1;
944: RETURN;
945: WHEN OTHERS THEN
962: AND order_type_lookup_code <> 'AMOUNT';
963: EXCEPTION
964: WHEN NO_DATA_FOUND THEN
965: x_item_id := NULL;
966: fnd_message.set_name('PO', 'PO_PDOI_MISMATCH_ITEM_ITEMTYPE');
967: po_copydoc_s1.online_report(x_online_report_id,
968: x_sequence,
969: substr(fnd_message.get, 1, 240),
970: x_line_num, 0, 0);
965: x_item_id := NULL;
966: fnd_message.set_name('PO', 'PO_PDOI_MISMATCH_ITEM_ITEMTYPE');
967: po_copydoc_s1.online_report(x_online_report_id,
968: x_sequence,
969: substr(fnd_message.get, 1, 240),
970: x_line_num, 0, 0);
971: x_return_code := -1;
972: RETURN;
973: WHEN OTHERS THEN
989: WHERE revision = x_item_revision
990: AND inventory_item_id = x_item_id;
991: EXCEPTION
992: WHEN NO_DATA_FOUND THEN
993: fnd_message.set_name('PO', 'PO_RI_INVALID_ITEM_REVISION');
994: fnd_message.set_token('VALUE', x_item_revision);
995: x_item_revision := NULL;
996: po_copydoc_s1.online_report(x_online_report_id,
997: x_sequence,
990: AND inventory_item_id = x_item_id;
991: EXCEPTION
992: WHEN NO_DATA_FOUND THEN
993: fnd_message.set_name('PO', 'PO_RI_INVALID_ITEM_REVISION');
994: fnd_message.set_token('VALUE', x_item_revision);
995: x_item_revision := NULL;
996: po_copydoc_s1.online_report(x_online_report_id,
997: x_sequence,
998: substr(fnd_message.get, 1, 240),
994: fnd_message.set_token('VALUE', x_item_revision);
995: x_item_revision := NULL;
996: po_copydoc_s1.online_report(x_online_report_id,
997: x_sequence,
998: substr(fnd_message.get, 1, 240),
999: x_line_num, 0, 0);
1000: WHEN OTHERS THEN
1001: x_item_revision := NULL;
1002: po_copydoc_s1.copydoc_sql_error('validate_item', x_progress, sqlcode,
1018: AND MIC.category_set_id = MDSV.category_set_id
1019: AND MDSV.functional_area_id = 2;
1020: EXCEPTION
1021: WHEN NO_DATA_FOUND THEN
1022: fnd_message.set_name('PO', 'PO_PO_MISSING_CATEGORY');
1023: fnd_message.set_token('ITEM', to_char(x_item_id), FALSE);
1024: x_category_id := NULL;
1025: po_copydoc_s1.online_report(x_online_report_id,
1026: x_sequence,
1019: AND MDSV.functional_area_id = 2;
1020: EXCEPTION
1021: WHEN NO_DATA_FOUND THEN
1022: fnd_message.set_name('PO', 'PO_PO_MISSING_CATEGORY');
1023: fnd_message.set_token('ITEM', to_char(x_item_id), FALSE);
1024: x_category_id := NULL;
1025: po_copydoc_s1.online_report(x_online_report_id,
1026: x_sequence,
1027: substr(fnd_message.get, 1, 240),
1023: fnd_message.set_token('ITEM', to_char(x_item_id), FALSE);
1024: x_category_id := NULL;
1025: po_copydoc_s1.online_report(x_online_report_id,
1026: x_sequence,
1027: substr(fnd_message.get, 1, 240),
1028: x_line_num, 0, 0);
1029: x_return_code := -1;
1030: RETURN;
1031: WHEN OTHERS THEN
1061: EXCEPTION
1062: WHEN NO_DATA_FOUND THEN
1063: x_category_id := NULL;
1064: -- Bug 3488117: Truncate at 2000 characters instead of 240.
1065: fnd_message.set_name('PO', 'PO_RI_INVALID_CATEGORY_ID');
1066: po_copydoc_s1.online_report(x_online_report_id,
1067: x_sequence,
1068: substr(fnd_message.get, 1, 2000),
1069: x_line_num, 0, 0);
1064: -- Bug 3488117: Truncate at 2000 characters instead of 240.
1065: fnd_message.set_name('PO', 'PO_RI_INVALID_CATEGORY_ID');
1066: po_copydoc_s1.online_report(x_online_report_id,
1067: x_sequence,
1068: substr(fnd_message.get, 1, 2000),
1069: x_line_num, 0, 0);
1070: x_return_code := -1;
1071: RETURN;
1072: WHEN OTHERS THEN
1084: END IF;
1085: ELSE
1086: x_item_revision := NULL;
1087: IF (x_category_id IS NULL) THEN
1088: fnd_message.set_name('PO', 'PO_RI_CAT_ID_ITEM_DESC_MISSING');
1089: po_copydoc_s1.online_report(x_online_report_id,
1090: x_sequence,
1091: substr(fnd_message.get, 1, 240),
1092: x_line_num, 0, 0);
1087: IF (x_category_id IS NULL) THEN
1088: fnd_message.set_name('PO', 'PO_RI_CAT_ID_ITEM_DESC_MISSING');
1089: po_copydoc_s1.online_report(x_online_report_id,
1090: x_sequence,
1091: substr(fnd_message.get, 1, 240),
1092: x_line_num, 0, 0);
1093: x_return_code := -1;
1094: RETURN;
1095: ELSE
1148:
1149: EXCEPTION
1150: WHEN NO_DATA_FOUND THEN
1151: x_category_id := NULL;
1152: fnd_message.set_name('PO', 'PO_RI_INVALID_CATEGORY_ID');
1153: po_copydoc_s1.online_report(x_online_report_id,
1154: x_sequence,
1155: substr(fnd_message.get, 1, 240),
1156: x_line_num, 0, 0);
1151: x_category_id := NULL;
1152: fnd_message.set_name('PO', 'PO_RI_INVALID_CATEGORY_ID');
1153: po_copydoc_s1.online_report(x_online_report_id,
1154: x_sequence,
1155: substr(fnd_message.get, 1, 240),
1156: x_line_num, 0, 0);
1157: x_return_code := -1;
1158: RETURN;
1159: WHEN OTHERS THEN
1166: RETURN;
1167: END;
1168: END IF;
1169: IF (x_item_description IS NULL) THEN
1170: fnd_message.set_name('PO', 'PO_RI_CAT_ID_ITEM_DESC_MISSING');
1171: po_copydoc_s1.online_report(x_online_report_id,
1172: x_sequence,
1173: substr(fnd_message.get, 1, 240),
1174: x_line_num, 0, 0);
1169: IF (x_item_description IS NULL) THEN
1170: fnd_message.set_name('PO', 'PO_RI_CAT_ID_ITEM_DESC_MISSING');
1171: po_copydoc_s1.online_report(x_online_report_id,
1172: x_sequence,
1173: substr(fnd_message.get, 1, 240),
1174: x_line_num, 0, 0);
1175: x_return_code := -1;
1176: RETURN;
1177: END IF;
1227: EXCEPTION
1228: WHEN NO_DATA_FOUND THEN
1229: x_account_id := NULL;
1230: IF x_account_type = 'BUDGET' THEN
1231: fnd_message.set_name('PO', 'PO_RI_INVALID_BUDGET_ACC_ID');
1232: ELSIF x_account_type = 'ACCRUAL' THEN
1233: fnd_message.set_name('PO', 'PO_RI_INVALID_ACCRUAL_ACC_ID');
1234: ELSIF x_account_type = 'CHARGE' THEN
1235: fnd_message.set_name('PO', 'PO_RI_INVALID_CHARGE_ACC_ID');
1229: x_account_id := NULL;
1230: IF x_account_type = 'BUDGET' THEN
1231: fnd_message.set_name('PO', 'PO_RI_INVALID_BUDGET_ACC_ID');
1232: ELSIF x_account_type = 'ACCRUAL' THEN
1233: fnd_message.set_name('PO', 'PO_RI_INVALID_ACCRUAL_ACC_ID');
1234: ELSIF x_account_type = 'CHARGE' THEN
1235: fnd_message.set_name('PO', 'PO_RI_INVALID_CHARGE_ACC_ID');
1236: ELSIF x_account_type = 'VARIANCE' THEN
1237: fnd_message.set_name('PO', 'PO_RI_INVALID_VARIANCE_ACC_ID');
1231: fnd_message.set_name('PO', 'PO_RI_INVALID_BUDGET_ACC_ID');
1232: ELSIF x_account_type = 'ACCRUAL' THEN
1233: fnd_message.set_name('PO', 'PO_RI_INVALID_ACCRUAL_ACC_ID');
1234: ELSIF x_account_type = 'CHARGE' THEN
1235: fnd_message.set_name('PO', 'PO_RI_INVALID_CHARGE_ACC_ID');
1236: ELSIF x_account_type = 'VARIANCE' THEN
1237: fnd_message.set_name('PO', 'PO_RI_INVALID_VARIANCE_ACC_ID');
1238: END IF;
1239: po_copydoc_s1.online_report(x_online_report_id,
1233: fnd_message.set_name('PO', 'PO_RI_INVALID_ACCRUAL_ACC_ID');
1234: ELSIF x_account_type = 'CHARGE' THEN
1235: fnd_message.set_name('PO', 'PO_RI_INVALID_CHARGE_ACC_ID');
1236: ELSIF x_account_type = 'VARIANCE' THEN
1237: fnd_message.set_name('PO', 'PO_RI_INVALID_VARIANCE_ACC_ID');
1238: END IF;
1239: po_copydoc_s1.online_report(x_online_report_id,
1240: x_sequence,
1241: substr(fnd_message.get, 1, 240),
1237: fnd_message.set_name('PO', 'PO_RI_INVALID_VARIANCE_ACC_ID');
1238: END IF;
1239: po_copydoc_s1.online_report(x_online_report_id,
1240: x_sequence,
1241: substr(fnd_message.get, 1, 240),
1242: x_line_num, x_shipment_num, x_distribution_num);
1243:
1244: WHEN OTHERS THEN
1245: x_account_id :=NULL;
1316: EXCEPTION
1317: WHEN NO_DATA_FOUND THEN
1318: x_project_id := NULL;
1319: -- Bug 3488117: Truncate at 2000 characters instead of 240.
1320: fnd_message.set_name('PO', 'PO_RI_INVALID_PA_INFO');
1321: po_copydoc_s1.online_report(x_online_report_id,
1322: x_sequence,
1323: substr(fnd_message.get, 1, 2000),
1324: x_line_num, x_shipment_num, x_distribution_num);
1319: -- Bug 3488117: Truncate at 2000 characters instead of 240.
1320: fnd_message.set_name('PO', 'PO_RI_INVALID_PA_INFO');
1321: po_copydoc_s1.online_report(x_online_report_id,
1322: x_sequence,
1323: substr(fnd_message.get, 1, 2000),
1324: x_line_num, x_shipment_num, x_distribution_num);
1325:
1326: WHEN OTHERS THEN
1327: x_project_id :=NULL;
1364: EXCEPTION
1365: WHEN NO_DATA_FOUND THEN
1366: x_task_id := NULL;
1367: -- Bug 3488177: Truncate at 2000 characters instead of 240.
1368: fnd_message.set_name('PO', 'PO_RI_INVALID_PA_INFO');
1369: po_copydoc_s1.online_report(x_online_report_id,
1370: x_sequence,
1371: substr(fnd_message.get, 1, 2000),
1372: x_line_num, x_shipment_num, x_distribution_num);
1367: -- Bug 3488177: Truncate at 2000 characters instead of 240.
1368: fnd_message.set_name('PO', 'PO_RI_INVALID_PA_INFO');
1369: po_copydoc_s1.online_report(x_online_report_id,
1370: x_sequence,
1371: substr(fnd_message.get, 1, 2000),
1372: x_line_num, x_shipment_num, x_distribution_num);
1373:
1374: WHEN OTHERS THEN
1375: x_task_id :=NULL;
1418:
1419: EXCEPTION
1420: WHEN NO_DATA_FOUND THEN
1421: x_exp_item_date := NULL;
1422: fnd_message.set_name('PO', 'PO_RI_INVALID_PA_INFO');
1423: po_copydoc_s1.online_report(x_online_report_id,
1424: x_sequence,
1425: substr(fnd_message.get, 1, 2000),
1426: x_line_num, x_shipment_num, x_distribution_num);
1421: x_exp_item_date := NULL;
1422: fnd_message.set_name('PO', 'PO_RI_INVALID_PA_INFO');
1423: po_copydoc_s1.online_report(x_online_report_id,
1424: x_sequence,
1425: substr(fnd_message.get, 1, 2000),
1426: x_line_num, x_shipment_num, x_distribution_num);
1427:
1428: WHEN OTHERS THEN
1429: x_exp_item_date := NULL;
1463:
1464: EXCEPTION
1465: WHEN NO_DATA_FOUND THEN
1466: x_exp_type := NULL;
1467: fnd_message.set_name('PO', 'PO_RI_INVALID_PA_INFO');
1468: po_copydoc_s1.online_report(x_online_report_id,
1469: x_sequence,
1470: substr(fnd_message.get, 1, 2000),
1471: x_line_num, x_shipment_num, x_distribution_num);
1466: x_exp_type := NULL;
1467: fnd_message.set_name('PO', 'PO_RI_INVALID_PA_INFO');
1468: po_copydoc_s1.online_report(x_online_report_id,
1469: x_sequence,
1470: substr(fnd_message.get, 1, 2000),
1471: x_line_num, x_shipment_num, x_distribution_num);
1472:
1473: WHEN OTHERS THEN
1474: x_exp_type := NULL;
1502:
1503: EXCEPTION
1504: WHEN NO_DATA_FOUND THEN
1505: x_org_id := NULL;
1506: fnd_message.set_name('PO', 'PO_RI_INVALID_PA_INFO');
1507: po_copydoc_s1.online_report(x_online_report_id,
1508: x_sequence,
1509: substr(fnd_message.get, 1, 2000),
1510: x_line_num, x_shipment_num, x_distribution_num);
1505: x_org_id := NULL;
1506: fnd_message.set_name('PO', 'PO_RI_INVALID_PA_INFO');
1507: po_copydoc_s1.online_report(x_online_report_id,
1508: x_sequence,
1509: substr(fnd_message.get, 1, 2000),
1510: x_line_num, x_shipment_num, x_distribution_num);
1511:
1512: WHEN OTHERS THEN
1513: x_org_id := NULL;
1669: END IF; --Bug 3557910
1670: EXCEPTION
1671: WHEN NO_DATA_FOUND THEN
1672: x_destination_type_code := NULL;
1673: fnd_message.set_name('PO', 'PO_RI_INVALID_DEST_TYPE_CODE');
1674: po_copydoc_s1.online_report(x_online_report_id,
1675: x_sequence,
1676: substr(fnd_message.get, 1, 240),
1677: x_line_num, x_shipment_num, x_distribution_num);
1672: x_destination_type_code := NULL;
1673: fnd_message.set_name('PO', 'PO_RI_INVALID_DEST_TYPE_CODE');
1674: po_copydoc_s1.online_report(x_online_report_id,
1675: x_sequence,
1676: substr(fnd_message.get, 1, 240),
1677: x_line_num, x_shipment_num, x_distribution_num);
1678:
1679: WHEN OTHERS THEN
1680: x_destination_type_code := NULL;
1716:
1717: EXCEPTION
1718: WHEN NO_DATA_FOUND THEN
1719: x_deliver_to_person_id := NULL;
1720: fnd_message.set_name('PO', 'PO_PO_INVALID_DEL_TO_PERSON');
1721: po_copydoc_s1.online_report(x_online_report_id,
1722: x_sequence,
1723: substr(fnd_message.get, 1, 240),
1724: x_line_num, x_shipment_num, x_distribution_num);
1719: x_deliver_to_person_id := NULL;
1720: fnd_message.set_name('PO', 'PO_PO_INVALID_DEL_TO_PERSON');
1721: po_copydoc_s1.online_report(x_online_report_id,
1722: x_sequence,
1723: substr(fnd_message.get, 1, 240),
1724: x_line_num, x_shipment_num, x_distribution_num);
1725:
1726: WHEN OTHERS THEN
1727: x_deliver_to_person_id := NULL;
1785: and task.task_id (+) = job.task_id;
1786: end if;
1787: if (x_count < 1) then
1788: -- register error
1789: fnd_message.set_name('PO', 'PO_PO_INVALID_JOB');
1790: po_copydoc_s1.online_report(x_online_report_id,
1791: x_sequence,
1792: substr(fnd_message.get, 1, 240),
1793: x_line_num, x_shipment_num,
1788: -- register error
1789: fnd_message.set_name('PO', 'PO_PO_INVALID_JOB');
1790: po_copydoc_s1.online_report(x_online_report_id,
1791: x_sequence,
1792: substr(fnd_message.get, 1, 240),
1793: x_line_num, x_shipment_num,
1794: x_distribution_num);
1795: end if;
1796: end if;
1804: where line_id = x_wip_line_id
1805: and organization_id = x_destination_organization_id;
1806: if (x_count < 1) then
1807: -- register error
1808: fnd_message.set_name('PO', 'PO_PO_INVALID_JOB_LINE');
1809: po_copydoc_s1.online_report(x_online_report_id,
1810: x_sequence,
1811: substr(fnd_message.get, 1, 240),
1812: x_line_num, x_shipment_num,
1807: -- register error
1808: fnd_message.set_name('PO', 'PO_PO_INVALID_JOB_LINE');
1809: po_copydoc_s1.online_report(x_online_report_id,
1810: x_sequence,
1811: substr(fnd_message.get, 1, 240),
1812: x_line_num, x_shipment_num,
1813: x_distribution_num);
1814: end if;
1815: END IF;
1848: end if;
1849: end if; /* x_entity_type =6 */
1850: if (x_count < 1) then
1851: -- register error
1852: fnd_message.set_name('PO', 'PO_PO_INVALID_OPERATION_SEQ');
1853: po_copydoc_s1.online_report(x_online_report_id,
1854: x_sequence,
1855: substr(fnd_message.get, 1, 240),
1856: x_line_num, x_shipment_num,
1851: -- register error
1852: fnd_message.set_name('PO', 'PO_PO_INVALID_OPERATION_SEQ');
1853: po_copydoc_s1.online_report(x_online_report_id,
1854: x_sequence,
1855: substr(fnd_message.get, 1, 240),
1856: x_line_num, x_shipment_num,
1857: x_distribution_num);
1858: end if;
1859: end if; /*x_wip_operation_seq_num is not null */
1872: and operation_seq_num = x_wip_operation_seq_num;
1873:
1874: if (x_count < 1) then
1875: -- register error
1876: fnd_message.set_name('PO', 'PO_PO_INVALID_RESOURCE_SEQ');
1877: po_copydoc_s1.online_report(x_online_report_id,
1878: x_sequence,
1879: substr(fnd_message.get, 1, 240),
1880: x_line_num, x_shipment_num,
1875: -- register error
1876: fnd_message.set_name('PO', 'PO_PO_INVALID_RESOURCE_SEQ');
1877: po_copydoc_s1.online_report(x_online_report_id,
1878: x_sequence,
1879: substr(fnd_message.get, 1, 240),
1880: x_line_num, x_shipment_num,
1881: x_distribution_num);
1882: end if;
1883: end if;
1936:
1937: EXCEPTION
1938: WHEN NO_DATA_FOUND THEN
1939: x_deliver_to_location_id := NULL;
1940: fnd_message.set_name('PO', 'PO_RI_INVALID_DEL_LOC_ID_DEST');
1941: -- Bug 3488117: Changed trunc size from 240 to 2000.
1942: po_copydoc_s1.online_report(x_online_report_id,
1943: x_sequence,
1944: substr(fnd_message.get, 1, 2000),
1940: fnd_message.set_name('PO', 'PO_RI_INVALID_DEL_LOC_ID_DEST');
1941: -- Bug 3488117: Changed trunc size from 240 to 2000.
1942: po_copydoc_s1.online_report(x_online_report_id,
1943: x_sequence,
1944: substr(fnd_message.get, 1, 2000),
1945: x_line_num, x_shipment_num, x_distribution_num);
1946:
1947: WHEN OTHERS THEN
1948: x_deliver_to_location_id := NULL;
2000:
2001: EXCEPTION
2002: WHEN NO_DATA_FOUND THEN
2003: x_destination_subinventory := NULL;
2004: fnd_message.set_name('PO', 'PO_RI_INVALID_DEST_SUBINV');
2005: po_copydoc_s1.online_report(x_online_report_id,
2006: x_sequence,
2007: substr(fnd_message.get, 1, 240),
2008: x_line_num, x_shipment_num, x_distribution_num);
2003: x_destination_subinventory := NULL;
2004: fnd_message.set_name('PO', 'PO_RI_INVALID_DEST_SUBINV');
2005: po_copydoc_s1.online_report(x_online_report_id,
2006: x_sequence,
2007: substr(fnd_message.get, 1, 240),
2008: x_line_num, x_shipment_num, x_distribution_num);
2009:
2010: WHEN OTHERS THEN
2011: x_destination_subinventory :=NULL;
2067: l_contract_doc_num := PO_HEADERS_SV4.get_doc_num
2068: ( p_po_header_id => p_contract_id
2069: );
2070:
2071: fnd_message.set_name('PO', 'PO_PO_INVALID_CONTRACT');
2072: fnd_message.set_token('VALUE', l_contract_doc_num, FALSE); --
2073:
2074: po_copydoc_s1.online_report(x_online_report_id,
2075: x_sequence,
2068: ( p_po_header_id => p_contract_id
2069: );
2070:
2071: fnd_message.set_name('PO', 'PO_PO_INVALID_CONTRACT');
2072: fnd_message.set_token('VALUE', l_contract_doc_num, FALSE); --
2074: po_copydoc_s1.online_report(x_online_report_id,
2075: x_sequence,
2076: substr(fnd_message.get, 1, 240),
2072: fnd_message.set_token('VALUE', l_contract_doc_num, FALSE); --
2073:
2074: po_copydoc_s1.online_report(x_online_report_id,
2075: x_sequence,
2076: substr(fnd_message.get, 1, 240),
2077: x_line_num, 0, 0);
2078: WHEN OTHERS THEN
2079:
2080: po_copydoc_s1.copydoc_sql_error('validate_contract_num', x_progress, sqlcode,
2113: AND nvl(cancel_flag,'N') <> 'Y';
2114:
2115: EXCEPTION
2116: WHEN NO_DATA_FOUND THEN
2117: fnd_message.set_name('PO', 'PO_SUB_CP_INVALID_GA_REF');
2118: po_copydoc_s1.online_report(p_online_report_id,
2119: p_sequence,
2120: substr(fnd_message.get, 1, 240),
2121: p_line_num, 0, 0);
2116: WHEN NO_DATA_FOUND THEN
2117: fnd_message.set_name('PO', 'PO_SUB_CP_INVALID_GA_REF');
2118: po_copydoc_s1.online_report(p_online_report_id,
2119: p_sequence,
2120: substr(fnd_message.get, 1, 240),
2121: p_line_num, 0, 0);
2122: WHEN OTHERS THEN
2123: po_copydoc_s1.copydoc_sql_error('validate_global_ref', l_progress, sqlcode,
2124: p_online_report_id,
2208:
2209: When no_data_found Then
2210:
2211: IF nvl(hr_general.get_xbg_profile,'N') = 'Y' THEN
2212: fnd_message.set_name('PO', 'PO_SVC_JOB_INVALID_IN_HR_BG');
2213: fnd_message.set_token('JOB', l_job_name);
2214: fnd_message.set_token('BG', l_bg_name);
2215: ELSE
2216: fnd_message.set_name('PO', 'PO_SVC_JOB_INVALID_IN_HR');
2209: When no_data_found Then
2210:
2211: IF nvl(hr_general.get_xbg_profile,'N') = 'Y' THEN
2212: fnd_message.set_name('PO', 'PO_SVC_JOB_INVALID_IN_HR_BG');
2213: fnd_message.set_token('JOB', l_job_name);
2214: fnd_message.set_token('BG', l_bg_name);
2215: ELSE
2216: fnd_message.set_name('PO', 'PO_SVC_JOB_INVALID_IN_HR');
2217: fnd_message.set_token('JOB', l_job_name);
2210:
2211: IF nvl(hr_general.get_xbg_profile,'N') = 'Y' THEN
2212: fnd_message.set_name('PO', 'PO_SVC_JOB_INVALID_IN_HR_BG');
2213: fnd_message.set_token('JOB', l_job_name);
2214: fnd_message.set_token('BG', l_bg_name);
2215: ELSE
2216: fnd_message.set_name('PO', 'PO_SVC_JOB_INVALID_IN_HR');
2217: fnd_message.set_token('JOB', l_job_name);
2218: END IF;
2212: fnd_message.set_name('PO', 'PO_SVC_JOB_INVALID_IN_HR_BG');
2213: fnd_message.set_token('JOB', l_job_name);
2214: fnd_message.set_token('BG', l_bg_name);
2215: ELSE
2216: fnd_message.set_name('PO', 'PO_SVC_JOB_INVALID_IN_HR');
2217: fnd_message.set_token('JOB', l_job_name);
2218: END IF;
2219:
2220: po_copydoc_s1.online_report(p_online_report_id,
2213: fnd_message.set_token('JOB', l_job_name);
2214: fnd_message.set_token('BG', l_bg_name);
2215: ELSE
2216: fnd_message.set_name('PO', 'PO_SVC_JOB_INVALID_IN_HR');
2217: fnd_message.set_token('JOB', l_job_name);
2218: END IF;
2219:
2220: po_copydoc_s1.online_report(p_online_report_id,
2221: p_sequence,
2218: END IF;
2219:
2220: po_copydoc_s1.online_report(p_online_report_id,
2221: p_sequence,
2222: substr(fnd_message.get, 1, 240),
2223: p_line_num, 0, 0);
2224: End;
2225:
2226: -- Sql What : Check if the job exists in the Jobs table
2245:
2246: Exception
2247:
2248: When no_data_found Then
2249: fnd_message.set_name('PO', 'PO_SVC_JOB_ASSOC_INVALID');
2250: fnd_message.set_token('JOB', l_job_name);
2251: fnd_message.set_token('CATEGORY', l_category);
2252: po_copydoc_s1.online_report(p_online_report_id,
2253: p_sequence,
2246: Exception
2247:
2248: When no_data_found Then
2249: fnd_message.set_name('PO', 'PO_SVC_JOB_ASSOC_INVALID');
2250: fnd_message.set_token('JOB', l_job_name);
2251: fnd_message.set_token('CATEGORY', l_category);
2252: po_copydoc_s1.online_report(p_online_report_id,
2253: p_sequence,
2254: substr(fnd_message.get, 1, 240),
2247:
2248: When no_data_found Then
2249: fnd_message.set_name('PO', 'PO_SVC_JOB_ASSOC_INVALID');
2250: fnd_message.set_token('JOB', l_job_name);
2251: fnd_message.set_token('CATEGORY', l_category);
2252: po_copydoc_s1.online_report(p_online_report_id,
2253: p_sequence,
2254: substr(fnd_message.get, 1, 240),
2255: p_line_num, 0, 0);
2250: fnd_message.set_token('JOB', l_job_name);
2251: fnd_message.set_token('CATEGORY', l_category);
2252: po_copydoc_s1.online_report(p_online_report_id,
2253: p_sequence,
2254: substr(fnd_message.get, 1, 240),
2255: p_line_num, 0, 0);
2256: End;
2257:
2258: l_progress := '050';
2721:
2722: IF ( l_val_proj_result = PO_PROJECT_DETAILS_SV.pjm_validate_failure) THEN
2723: -- Write the message to the PO_ONLINE_REPORT_TEXT table as an error.
2724: po_copydoc_s1.online_report(x_online_report_id,
2725: x_sequence, FND_MESSAGE.get,
2726: x_line_num, x_shipment_num, x_distribution_num,
2727: PO_COPYDOC_S1.G_ERROR_MESSAGE_TYPE);
2728: ELSIF ( l_val_proj_result = PO_PROJECT_DETAILS_SV.pjm_validate_warning) THEN
2729: -- Write the message to the PO_ONLINE_REPORT_TEXT table as a warning.
2727: PO_COPYDOC_S1.G_ERROR_MESSAGE_TYPE);
2728: ELSIF ( l_val_proj_result = PO_PROJECT_DETAILS_SV.pjm_validate_warning) THEN
2729: -- Write the message to the PO_ONLINE_REPORT_TEXT table as a warning.
2730: po_copydoc_s1.online_report(x_online_report_id,
2731: x_sequence, FND_MESSAGE.get,
2732: x_line_num, x_shipment_num, x_distribution_num,
2733: PO_COPYDOC_S1.G_WARNING_MESSAGE_TYPE);
2734: END IF;
2735: --< Bug 3265539 End >
2882:
2883: l_progress := '020';
2884:
2885: IF (l_return_status <> FND_API.g_ret_sts_success) THEN
2886: FND_MESSAGE.set_encoded(encoded_message => FND_MSG_PUB.get);
2887: RAISE FND_API.g_exc_error;
2888: END IF;
2889:
2890: l_progress := '030';
2892: IF (NOT l_is_valid) OR
2893: (p_transaction_flow_header_id <>
2894: NVL(l_transaction_flow_header_id, -99))
2895: THEN
2896: FND_MESSAGE.set_name(application => 'PO',
2897: name => 'PO_COPY_DOC_INVALID_TXN_FLOW');
2898: RAISE FND_API.g_exc_error;
2899: END IF;
2900:
2904: WHEN FND_API.g_exc_error THEN
2905: PO_COPYDOC_S1.online_report
2906: (x_online_report_id => p_online_report_id,
2907: x_sequence => x_sequence,
2908: x_message => FND_MESSAGE.get,
2909: x_line_num => p_line_num,
2910: x_shipment_num => p_shipment_num,
2911: x_distribution_num => 0);
2912: WHEN OTHERS THEN
2992:
2993: l_user_id := FND_GLOBAL.user_id;
2994: l_login_id := FND_GLOBAL.login_id;
2995: l_message_type := PO_COPYDOC_S1.g_error_message_type;
2996: l_err_prefix := FND_MESSAGE.get_string(appin => 'PO',
2997: namein => 'PO_GA_ORG_ASSIGN_PREFIX');
2998:
2999: --------------------------------------------------------------
3000: l_progress := '020';
2999: --------------------------------------------------------------
3000: l_progress := '020';
3001:
3002: -- Validate the Requesting Orgs for all enabled org assignments
3003: l_text_line := FND_MESSAGE.get_string
3004: (appin => 'PO',
3005: namein => 'PO_GA_INVALID_REQUESTING_ORG');
3006: INSERT INTO po_online_report_text
3007: (
3047: --------------------------------------------------------------
3048: l_progress := '030';
3049:
3050: -- Validate the Purchasing Orgs for all enabled org assignments
3051: l_text_line := FND_MESSAGE.get_string
3052: (appin => 'PO',
3053: namein => 'PO_GA_INVALID_PURCHASING_ORG');
3054: INSERT INTO po_online_report_text
3055: (
3123: --------------------------------------------------------------
3124: l_progress := '040';
3125:
3126: -- Validate the Purchasing Sites for all enabled org assignments
3127: l_text_line := FND_MESSAGE.get_string
3128: (appin => 'PO',
3129: namein => 'PO_GA_INVALID_PURCHASING_SITE');
3130: INSERT INTO po_online_report_text
3131: (