DBA Data[Home] [Help]

APPS.GR_MIGRATE_TO_12 dependencies on GR_ITEM_GENERAL

Line 46: FROM gr_item_general_mig

42: /* ------------------ CURSORS ---------------------- */
43: /* Cursor used retrieve the inventory_item_ id */
44: CURSOR c_get_inventory_item_id IS
45: SELECT inventory_item_id
46: FROM gr_item_general_mig
47: WHERE item_code = p_item_code
48: AND organization_id = p_organization_id;
49:
50: /* ----------------- EXCEPTIONS -------------------- */

Line 290: -- This PL/SQL procedure is used to insert records into the gr_item_general_mig table.

286: -- PROCEDURE:
287: -- create_item_mig_records
288: --
289: -- DESCRIPTION:
290: -- This PL/SQL procedure is used to insert records into the gr_item_general_mig table.
291: -- This table will be used to drive the migration of Regulatory items to the specified
292: -- organizations.
293: --
294: -- PARAMETERS:

Line 345: FROM gr_item_general;

341:
342: /* Cursor used check if there is Regulatory data if no orgs are set as Regualtory orgs */
343: CURSOR c_check_reg_data IS
344: SELECT 1
345: FROM gr_item_general;
346:
347: /* ----------------- EXCEPTIONS -------------------- */
348: NO_REG_ORG EXCEPTION;
349:

Line 357: p_table_name => 'GR_ITEM_GENERAL_MIG',

353: GMA_COMMON_LOGGING.gma_migration_central_log (
354: p_run_id => P_migration_run_id,
355: p_log_level => FND_LOG.LEVEL_PROCEDURE,
356: p_message_token => 'GMA_MIGRATION_TABLE_STARTED',
357: p_table_name => 'GR_ITEM_GENERAL_MIG',
358: p_context => 'GR_ITEM_MIGRATION_TABLE',
359: p_param1 => NULL,
360: p_param2 => NULL,
361: p_param3 => NULL,

Line 376: INSERT INTO gr_item_general_mig

372: WHILE c_get_master_orgs%FOUND LOOP
373:
374: l_reg_orgs_found := 1;
375:
376: INSERT INTO gr_item_general_mig
377: (
378: item_code,
379: organization_id,
380: inventory_item_id,

Line 388: FROM gr_item_general a

384: a.item_code,
385: l_organization_id,
386: NULL,
387: NULL
388: FROM gr_item_general a
389: WHERE NOT EXISTS (SELECT 1 from gr_item_general_mig b
390: WHERE b.item_code = a.item_code and
391: b.organization_id = l_organization_id);
392:

Line 389: WHERE NOT EXISTS (SELECT 1 from gr_item_general_mig b

385: l_organization_id,
386: NULL,
387: NULL
388: FROM gr_item_general a
389: WHERE NOT EXISTS (SELECT 1 from gr_item_general_mig b
390: WHERE b.item_code = a.item_code and
391: b.organization_id = l_organization_id);
392:
393: /* Issue commit if required */

Line 414: INSERT INTO gr_item_general_mig

410: WHILE c_get_child_orgs%FOUND LOOP
411:
412: l_reg_orgs_found := 1;
413:
414: INSERT INTO gr_item_general_mig
415: (
416: item_code,
417: organization_id,
418: inventory_item_id,

Line 426: FROM gr_item_general a

422: a.item_code,
423: l_organization_id,
424: NULL,
425: NULL
426: FROM gr_item_general a
427: WHERE NOT EXISTS (SELECT 1 from gr_item_general_mig b
428: WHERE b.item_code = a.item_code and
429: b.organization_id = l_organization_id);
430:

Line 427: WHERE NOT EXISTS (SELECT 1 from gr_item_general_mig b

423: l_organization_id,
424: NULL,
425: NULL
426: FROM gr_item_general a
427: WHERE NOT EXISTS (SELECT 1 from gr_item_general_mig b
428: WHERE b.item_code = a.item_code and
429: b.organization_id = l_organization_id);
430:
431: /* Issue commit if required */

Line 454: p_table_name => 'GR_ITEM_GENERAL_MIG',

450: GMA_COMMON_LOGGING.gma_migration_central_log (
451: p_run_id => P_migration_run_id,
452: p_log_level => FND_LOG.LEVEL_PROCEDURE,
453: p_message_token => 'GMA_MIGRATION_TABLE_SUCCESS',
454: p_table_name => 'GR_ITEM_GENERAL_MIG',
455: p_context => 'GR_ITEM_MIGRATION_TABLE',
456: p_param1 => l_migration_count,
457: p_param2 => x_failure_count,
458: p_param3 => NULL,

Line 473: p_table_name => 'GR_ITEM_GENERAL_MIG',

469: GMA_COMMON_LOGGING.gma_migration_central_log (
470: p_run_id => P_migration_run_id,
471: p_log_level => FND_LOG.LEVEL_ERROR,
472: p_message_token => 'GR_NO_REG_ORG',
473: p_table_name => 'GR_ITEM_GENERAL_MIG',
474: p_context => 'GR_ITEM_MIGRATION_TABLE',
475: p_app_short_name => 'GMA');
476:
477: WHEN OTHERS THEN

Line 485: p_table_name => 'GR_ITEM_GENERAL_MIG',

481: GMA_COMMON_LOGGING.gma_migration_central_log (
482: p_run_id => P_migration_run_id,
483: p_log_level => FND_LOG.LEVEL_UNEXPECTED,
484: p_message_token => 'GMA_MIGRATION_DB_ERROR',
485: p_table_name => 'GR_ITEM_GENERAL_MIG',
486: p_context => 'GR_ITEM_MIGRATION_TABLE',
487: p_param1 => NULL,
488: p_param2 => NULL,
489: p_param3 => NULL,

Line 499: p_table_name => 'GR_ITEM_GENERAL_MIG',

495: GMA_COMMON_LOGGING.gma_migration_central_log (
496: p_run_id => P_migration_run_id,
497: p_log_level => FND_LOG.LEVEL_PROCEDURE,
498: p_message_token => 'GMA_TABLE_MIGRATION_TABLE_FAIL',
499: p_table_name => 'GR_ITEM_GENERAL_MIG',
500: p_context => 'GR_ITEM_MIGRATION_TABLE',
501: p_param1 => x_failure_count,
502: p_param2 => NULL,
503: p_param3 => NULL,

Line 570: FROM gr_item_general_mig

566: /* ------------------ CURSORS ---------------------- */
567: /* Cursor used to retrieve record from migration table */
568: CURSOR c_get_mig_rec IS
569: SELECT item_code, organization_id
570: FROM gr_item_general_mig
571: WHERE migration_ind is NULL;
572: l_mig_rec c_get_mig_rec%ROWTYPE;
573:
574: /* Cursor used to retrieve document category ids */

Line 590: FROM gr_item_general

586:
587: /* Cursor used to retrieve regulatory item record */
588: CURSOR c_get_reg_item IS
589: SELECT *
590: FROM gr_item_general
591: WHERE item_code = l_mig_rec.item_code;
592: l_reg_item_rec c_get_reg_item%ROWTYPE;
593:
594: /* Cursor used to retrieve the Regulatory item description*/

Line 624: WHERE entity_name = 'GR_ITEM_GENERAL' and

620: /* Cursor used to retrieve document attached to Regulatory item */
621: CURSOR c_get_attachments IS
622: SELECT *
623: FROM fnd_attached_documents
624: WHERE entity_name = 'GR_ITEM_GENERAL' and
625: pk1_value = l_mig_rec.item_code;
626: l_attachment_rec c_get_attachments%ROWTYPE;
627:
628:

Line 643: p_table_name => 'GR_ITEM_GENERAL',

639: GMA_COMMON_LOGGING.gma_migration_central_log (
640: p_run_id => P_migration_run_id,
641: p_log_level => FND_LOG.LEVEL_PROCEDURE,
642: p_message_token => 'GMA_MIGRATION_TABLE_STARTED',
643: p_table_name => 'GR_ITEM_GENERAL',
644: p_context => 'REGULATORY_ITEMS',
645: p_param1 => NULL,
646: p_param2 => NULL,
647: p_param3 => NULL,

Line 664: p_table_name => 'GR_ITEM_GENERAL',

660: GMA_COMMON_LOGGING.gma_migration_central_log (
661: p_run_id => P_migration_run_id,
662: p_log_level => FND_LOG.LEVEL_PROCEDURE,
663: p_message_token => 'GR_NO_REGITEMS_TO_MIG',
664: p_table_name => 'GR_ITEM_GENERAL',
665: p_context => 'REGULATORY_ITEMS',
666: p_param1 => NULL,
667: p_param2 => NULL,
668: p_param3 => NULL,

Line 719: p_table_name => 'GR_ITEM_GENERAL',

715: GMA_COMMON_LOGGING.gma_migration_central_log (
716: p_run_id => P_migration_run_id,
717: p_log_level => FND_LOG.LEVEL_PROCEDURE,
718: p_message_token => 'GR_NO_CAS_NUMBER',
719: p_table_name => 'GR_ITEM_GENERAL',
720: p_context => 'Migrate_regulatory_items',
721: p_param1 => l_reg_item_rec.item_code,
722: p_param2 => l_reg_item_rec.primary_cas_number,
723: p_param3 => NULL,

Line 762: p_table_name => 'GR_ITEM_GENERAL',

758: GMA_COMMON_LOGGING.gma_migration_central_log (
759: p_run_id => P_migration_run_id,
760: p_log_level => FND_LOG.LEVEL_PROCEDURE,
761: p_message_token => 'GMA_MIGRATION_TABLE_STARTED',
762: p_table_name => 'GR_ITEM_GENERAL',
763: p_context => 'REGULATORY_ITEMS',
764: p_param1 => NULL,
765: p_param2 => NULL,
766: p_param3 => NULL,

Line 1060: UPDATE gr_item_general_mig

1056: FETCH c_get_related INTO l_related_rec;
1057: END LOOP; -- Related Items
1058: CLOSE c_get_related;
1059:
1060: UPDATE gr_item_general_mig
1061: SET migration_ind = 1,
1062: inventory_item_id = l_inventory_item_id
1063: WHERE item_code = l_mig_rec.item_code and
1064: organization_id = l_mig_rec. organization_id;

Line 1085: p_table_name => 'GR_ITEM_GENERAL',

1081: GMA_COMMON_LOGGING.gma_migration_central_log (
1082: p_run_id => P_migration_run_id,
1083: p_log_level => FND_LOG.LEVEL_EXCEPTION,
1084: p_message_token => 'GR_INVALID_REG_ITEM',
1085: p_table_name => 'GR_ITEM_GENERAL',
1086: p_context => 'REGULATORY_ITEMS',
1087: p_param1 => l_mig_rec.item_code,
1088: p_param2 => NULL,
1089: p_param3 => NULL,

Line 1103: p_table_name => 'GR_ITEM_GENERAL',

1099: GMA_COMMON_LOGGING.gma_migration_central_log (
1100: p_run_id => P_migration_run_id,
1101: p_log_level => FND_LOG.LEVEL_EXCEPTION,
1102: p_message_token => 'GR_NO_CAS_NUMBER',
1103: p_table_name => 'GR_ITEM_GENERAL',
1104: p_context => 'REGULATORY_ITEMS',
1105: p_param1 => l_mig_rec.item_code,
1106: p_param2 => NULL,
1107: p_param3 => NULL,

Line 1122: p_table_name => 'GR_ITEM_GENERAL',

1118: GMA_COMMON_LOGGING.gma_migration_central_log (
1119: p_run_id => P_migration_run_id,
1120: p_log_level => FND_LOG.LEVEL_EXCEPTION,
1121: p_message_token => 'GR_INV_ITEM_ERROR',
1122: p_table_name => 'GR_ITEM_GENERAL',
1123: p_context => 'REGULATORY_ITEMS',
1124: p_param1 => l_mig_rec.item_code,
1125: p_param2 => NULL,
1126: p_param3 => NULL,

Line 1140: p_table_name => 'GR_ITEM_GENERAL',

1136: GMA_COMMON_LOGGING.gma_migration_central_log (
1137: p_run_id => P_migration_run_id,
1138: p_log_level => FND_LOG.LEVEL_EXCEPTION,
1139: p_message_token => l_msg_data,
1140: p_table_name => 'GR_ITEM_GENERAL',
1141: p_context => 'REGULATORY_ITEMS',
1142: p_param1 => NULL,
1143: p_param2 => NULL,
1144: p_param3 => NULL,

Line 1158: p_table_name => 'GR_ITEM_GENERAL',

1154: GMA_COMMON_LOGGING.gma_migration_central_log (
1155: p_run_id => P_migration_run_id,
1156: p_log_level => FND_LOG.LEVEL_UNEXPECTED,
1157: p_message_token => 'GMA_MIGRATION_DB_ERROR',
1158: p_table_name => 'GR_ITEM_GENERAL',
1159: p_context => 'REGULATORY_ITEMS',
1160: p_param1 => NULL,
1161: p_param2 => NULL,
1162: p_param3 => NULL,

Line 1183: p_table_name => 'GR_ITEM_GENERAL',

1179: GMA_COMMON_LOGGING.gma_migration_central_log (
1180: p_run_id => P_migration_run_id,
1181: p_log_level => FND_LOG.LEVEL_PROCEDURE,
1182: p_message_token => 'GMA_MIGRATION_TABLE_SUCCESS',
1183: p_table_name => 'GR_ITEM_GENERAL',
1184: p_context => 'REGULATORY_ITEMS',
1185: p_param1 => l_migration_count,
1186: p_param2 => x_failure_count,
1187: p_param3 => NULL,

Line 1200: p_table_name => 'GR_ITEM_GENERAL',

1196: GMA_COMMON_LOGGING.gma_migration_central_log (
1197: p_run_id => P_migration_run_id,
1198: p_log_level => FND_LOG.LEVEL_UNEXPECTED,
1199: p_message_token => 'GMA_MIGRATION_DB_ERROR',
1200: p_table_name => 'GR_ITEM_GENERAL',
1201: p_context => 'REGULATORY_ITEMS',
1202: p_param1 => NULL,
1203: p_param2 => NULL,
1204: p_param3 => NULL,

Line 1214: p_table_name => 'GR_ITEM_GENERAL',

1210: GMA_COMMON_LOGGING.gma_migration_central_log (
1211: p_run_id => P_migration_run_id,
1212: p_log_level => FND_LOG.LEVEL_PROCEDURE,
1213: p_message_token => 'GMA_TABLE_MIGRATION_TABLE_FAIL',
1214: p_table_name => 'GR_ITEM_GENERAL',
1215: p_context => 'REGULATORY_ITEMS',
1216: p_param1 => x_failure_count,
1217: p_param2 => NULL,
1218: p_param3 => NULL,

Line 1291: FROM gr_item_general a

1287: /* ------------------ CURSORS ---------------------- */
1288: /* Cursor used to retrieve items with formula type of standalone that have formulas saved */
1289: CURSOR c_get_items IS
1290: SELECT a.item_code
1291: FROM gr_item_general a
1292: WHERE EXISTS (SELECT 1
1293: FROM gr_item_concentrations b
1294: WHERE b.item_code = a.item_code) and
1295: a.formula_source_indicator = 'S';