DBA Data[Home] [Help]

APPS.OPI_DBI_BOUNDS_PKG dependencies on OPI_DBI_CONC_PROG_RUN_LOG

Line 59: DELETE FROM OPI_DBI_CONC_PROG_RUN_LOG

55: opi_dbi_bounds_pkg.write(g_pkg_name, l_proc_name, l_stmt_no, l_debug_msg);
56: END IF;
57:
58: l_stmt_no := 10;
59: DELETE FROM OPI_DBI_CONC_PROG_RUN_LOG
60: WHERE etl_type = p_etl_type;
61:
62: IF l_debug_mode = 'Y' AND upper(l_module_name) like 'BIS%' THEN
63: l_debug_msg := 'Deleted '||to_char(sql%rowcount)||' rows from OPI_DBI_CONC_PROG_RUN_LOG' ;

Line 63: l_debug_msg := 'Deleted '||to_char(sql%rowcount)||' rows from OPI_DBI_CONC_PROG_RUN_LOG' ;

59: DELETE FROM OPI_DBI_CONC_PROG_RUN_LOG
60: WHERE etl_type = p_etl_type;
61:
62: IF l_debug_mode = 'Y' AND upper(l_module_name) like 'BIS%' THEN
63: l_debug_msg := 'Deleted '||to_char(sql%rowcount)||' rows from OPI_DBI_CONC_PROG_RUN_LOG' ;
64: opi_dbi_bounds_pkg.write(g_pkg_name, l_proc_name, l_stmt_no, l_debug_msg);
65: END IF;
66:
67: OPI_DBI_BOUNDS_PKG.CALL_ETL_SPECIFIC_BOUND(p_etl_type,p_load_type);

Line 87: FROM OPI_DBI_CONC_PROG_RUN_LOG

83: l_completion_status := null;
84:
85: /* check whether its the first time incremental load */
86: SELECT 1,nvl(completion_status_code,'N') INTO l_count,l_completion_status
87: FROM OPI_DBI_CONC_PROG_RUN_LOG
88: WHERE etl_type = p_etl_type
89: AND load_type = p_load_type
90: AND rownum <= 1;
91: EXCEPTION

Line 113: FROM OPI_DBI_CONC_PROG_RUN_LOG

109: /* As completion_status_code is updated based on etl_type and load_type success
110: of one record implies success of all the records for that etl_type and load_type */
111:
112: SELECT 1,nvl(completion_status_code,'N') into l_init_count,l_completion_status
113: FROM OPI_DBI_CONC_PROG_RUN_LOG
114: WHERE etl_type = p_etl_type
115: AND load_type = 'INIT'
116: AND rownum <= 1;
117:

Line 133: INSERT INTO OPI_DBI_CONC_PROG_RUN_LOG(

129: opi_dbi_bounds_pkg.write(g_pkg_name, l_proc_name, l_stmt_no, l_debug_msg);
130: END IF;
131:
132: l_stmt_no := 30;
133: INSERT INTO OPI_DBI_CONC_PROG_RUN_LOG(
134: driving_table_code ,
135: etl_type ,
136: load_type ,
137: bound_type ,

Line 180: FROM OPI_DBI_CONC_PROG_RUN_LOG

176: l_program_id ,
177: l_program_login_id ,
178: l_program_application_id ,
179: l_request_id
180: FROM OPI_DBI_CONC_PROG_RUN_LOG
181: WHERE etl_type = p_etl_type
182: AND load_type = 'INIT';
183:
184: IF l_debug_mode = 'Y' AND upper(l_module_name) like 'BIS%' THEN

Line 185: l_debug_msg := 'Inserted '||to_char(sql%rowcount)||' rows into OPI_DBI_CONC_PROG_RUN_LOG' ;

181: WHERE etl_type = p_etl_type
182: AND load_type = 'INIT';
183:
184: IF l_debug_mode = 'Y' AND upper(l_module_name) like 'BIS%' THEN
185: l_debug_msg := 'Inserted '||to_char(sql%rowcount)||' rows into OPI_DBI_CONC_PROG_RUN_LOG' ;
186: opi_dbi_bounds_pkg.write(g_pkg_name, l_proc_name, l_stmt_no, l_debug_msg);
187: END IF;
188:
189: -- set to bounds by calling call etl specific bound

Line 218: UPDATE OPI_DBI_CONC_PROG_RUN_LOG prlout

214:
215: /* update from_bound_id and from_bound_date as previous to_bound_id and
216: to_bound_date */
217: l_stmt_no :=40;
218: UPDATE OPI_DBI_CONC_PROG_RUN_LOG prlout
219: SET ( from_bound_id ,
220: from_bound_date ,
221: to_bound_date ,
222: to_bound_id ,

Line 249: FROM OPI_DBI_CONC_PROG_RUN_LOG prlin

245: l_program_id ,
246: l_program_login_id ,
247: l_program_application_id,
248: l_request_id
249: FROM OPI_DBI_CONC_PROG_RUN_LOG prlin
250: WHERE prlin.etl_type = prlout.etl_type
251: AND prlin.load_type = prlout.load_type
252: AND prlin.driving_table_code = prlout.driving_table_code
253: AND nvl(prlin.bound_level_entity_id,-1) = nvl(prlout.bound_level_entity_id,-1))

Line 258: l_debug_msg := 'Updated '||to_char(sql%rowcount)||' rows in OPI_DBI_CONC_PROG_RUN_LOG' ;

254: WHERE prlout.etl_type = p_etl_type
255: AND prlout.load_type = p_load_type;
256:
257: IF l_debug_mode = 'Y' AND upper(l_module_name) like 'BIS%' THEN
258: l_debug_msg := 'Updated '||to_char(sql%rowcount)||' rows in OPI_DBI_CONC_PROG_RUN_LOG' ;
259: opi_dbi_bounds_pkg.write(g_pkg_name, l_proc_name, l_stmt_no, l_debug_msg);
260: END IF;
261:
262: else

Line 271: UPDATE OPI_DBI_CONC_PROG_RUN_LOG

267: opi_dbi_bounds_pkg.write(g_pkg_name, l_proc_name, l_stmt_no, l_debug_msg);
268: END IF;
269:
270: l_stmt_no := 50;
271: UPDATE OPI_DBI_CONC_PROG_RUN_LOG
272: SET to_bound_id = null,
273: to_bound_date = null,
274: completion_status_code = null,
275: stop_reason_code = null,

Line 288: l_debug_msg := 'Updated '||to_char(sql%rowcount)||' rows in OPI_DBI_CONC_PROG_RUN_LOG' ;

284: WHERE etl_type = p_etl_type
285: AND load_type = p_load_type;
286:
287: IF l_debug_mode = 'Y' AND upper(l_module_name) like 'BIS%' THEN
288: l_debug_msg := 'Updated '||to_char(sql%rowcount)||' rows in OPI_DBI_CONC_PROG_RUN_LOG' ;
289: opi_dbi_bounds_pkg.write(g_pkg_name, l_proc_name, l_stmt_no, l_debug_msg);
290: END IF;
291:
292: end if; /* end INCR load updation*/

Line 590: SELECT count(1) INTO l_inv_count FROM OPI_DBI_CONC_PROG_RUN_LOG

586: BEGIN
587:
588: l_inv_count := -1;
589:
590: SELECT count(1) INTO l_inv_count FROM OPI_DBI_CONC_PROG_RUN_LOG
591: WHERE etl_type = 'INVENTORY'
592: AND load_type = 'INIT'
593: AND rownum <=1 ;
594:

Line 616: INSERT INTO OPI_DBI_CONC_PROG_RUN_LOG(

612: -- it is not possible that cycle count incr is being run without running incr
613: -- or inventory.
614: if (l_inv_count = 1 and p_etl_type = 'CYCLE_COUNT') then
615: l_stmt_no :=20;
616: INSERT INTO OPI_DBI_CONC_PROG_RUN_LOG(
617: driving_table_code ,
618: etl_type ,
619: load_type ,
620: bound_type ,

Line 662: FROM OPI_DBI_CONC_PROG_RUN_LOG

658: l_program_id ,
659: l_program_login_id ,
660: l_program_application_id,
661: l_request_id
662: FROM OPI_DBI_CONC_PROG_RUN_LOG
663: WHERE etl_type = 'INVENTORY'
664: AND driving_table_code = 'MMT'
665: AND load_type = 'INIT';
666:

Line 668: l_debug_msg := 'Inserted '||to_char(sql%rowcount)||' rows into OPI_DBI_CONC_PROG_RUN_LOG' ;

664: AND driving_table_code = 'MMT'
665: AND load_type = 'INIT';
666:
667: IF l_debug_mode = 'Y' AND upper(l_module_name) like 'BIS%' THEN
668: l_debug_msg := 'Inserted '||to_char(sql%rowcount)||' rows into OPI_DBI_CONC_PROG_RUN_LOG' ;
669: opi_dbi_bounds_pkg.write(g_pkg_name, l_proc_name, l_stmt_no, l_debug_msg);
670: END IF;
671:
672: -- for COGS we only copy the from bounds from inventory. to bounds are recalculated.

Line 677: INSERT INTO OPI_DBI_CONC_PROG_RUN_LOG(

673: -- in case GSD is modified Inventory load should be run prior to COGS else change of GSD
674: -- will not take effect in COGS etl
675: elsif(l_inv_count = 1 and p_etl_type = 'COGS' ) then
676: l_stmt_no :=30;
677: INSERT INTO OPI_DBI_CONC_PROG_RUN_LOG(
678: driving_table_code ,
679: etl_type ,
680: load_type ,
681: bound_type ,

Line 724: FROM OPI_DBI_CONC_PROG_RUN_LOG

720: l_program_id ,
721: l_program_login_id ,
722: l_program_application_id,
723: l_request_id
724: FROM OPI_DBI_CONC_PROG_RUN_LOG
725: WHERE etl_type = 'INVENTORY'
726: AND driving_table_code = 'MMT'
727: AND load_type = 'INIT';
728:

Line 730: l_debug_msg := 'Inserted '||to_char(sql%rowcount)||' rows into OPI_DBI_CONC_PROG_RUN_LOG' ;

726: AND driving_table_code = 'MMT'
727: AND load_type = 'INIT';
728:
729: IF l_debug_mode = 'Y' AND upper(l_module_name) like 'BIS%' THEN
730: l_debug_msg := 'Inserted '||to_char(sql%rowcount)||' rows into OPI_DBI_CONC_PROG_RUN_LOG' ;
731: opi_dbi_bounds_pkg.write(g_pkg_name, l_proc_name, l_stmt_no, l_debug_msg);
732: END IF;
733:
734: IF l_debug_mode = 'Y' AND upper(l_module_name) like 'BIS%' THEN

Line 765: INSERT INTO OPI_DBI_CONC_PROG_RUN_LOG(

761: END IF;
762:
763: l_stmt_no :=50;
764:
765: INSERT INTO OPI_DBI_CONC_PROG_RUN_LOG(
766: driving_table_code ,
767: etl_type ,
768: load_type ,
769: bound_type ,

Line 835: l_debug_msg := 'Inserted '||to_char(sql%rowcount)||' rows into OPI_DBI_CONC_PROG_RUN_LOG' ;

831: AND min_trx.organization_id = uncosted_trx.organization_id(+)
832: AND mp.process_enabled_flag <> 'Y';
833:
834: IF l_debug_mode = 'Y' AND upper(l_module_name) like 'BIS%' THEN
835: l_debug_msg := 'Inserted '||to_char(sql%rowcount)||' rows into OPI_DBI_CONC_PROG_RUN_LOG' ;
836: opi_dbi_bounds_pkg.write(g_pkg_name, l_proc_name, l_stmt_no, l_debug_msg);
837: END IF;
838: end if;
839:

Line 889: FROM OPI_DBI_CONC_PROG_RUN_LOG

885: FROM mtl_parameters
886: WHERE process_enabled_flag <> 'Y'
887: MINUS
888: SELECT DISTINCT bound_level_entity_id
889: FROM OPI_DBI_CONC_PROG_RUN_LOG
890: WHERE etl_type = p_etl_type
891: AND driving_table_code = 'MMT';
892:
893: BEGIN

Line 911: INSERT INTO OPI_DBI_CONC_PROG_RUN_LOG(

907: if (p_load_type = 'INCR') then
908:
909: l_stmt_no := 10;
910: FOR c_new_org IN csr_get_new_org LOOP
911: INSERT INTO OPI_DBI_CONC_PROG_RUN_LOG(
912: driving_table_code ,
913: etl_type ,
914: load_type ,
915: bound_type ,

Line 958: FROM OPI_DBI_CONC_PROG_RUN_LOG

954: l_program_id ,
955: l_program_login_id ,
956: l_program_application_id,
957: l_request_id
958: FROM OPI_DBI_CONC_PROG_RUN_LOG
959: WHERE etl_type = p_etl_type
960: AND driving_table_code = 'MMT';
961: END LOOP;
962:

Line 964: l_debug_msg := 'Inserted '||to_char(sql%rowcount)||' rows into OPI_DBI_CONC_PROG_RUN_LOG' ;

960: AND driving_table_code = 'MMT';
961: END LOOP;
962:
963: IF l_debug_mode = 'Y' AND upper(l_module_name) like 'BIS%' THEN
964: l_debug_msg := 'Inserted '||to_char(sql%rowcount)||' rows into OPI_DBI_CONC_PROG_RUN_LOG' ;
965: opi_dbi_bounds_pkg.write(g_pkg_name, l_proc_name, l_stmt_no, l_debug_msg);
966: END IF;
967:
968: end if; /* end insert new org */

Line 982: UPDATE OPI_DBI_CONC_PROG_RUN_LOG prlout

978: END IF;
979:
980: l_stmt_no := 30;
981: /* update to bounds for all records as first uncosted transaction */
982: UPDATE OPI_DBI_CONC_PROG_RUN_LOG prlout
983: SET ( to_bound_id ,
984: stop_reason_code ,
985: completion_status_code ,
986: last_run_date ,

Line 1014: AND transaction_id >= (SELECT from_bound_id FROM opi_dbi_conc_prog_run_log plog

1010: from
1011: (SELECT /*+ no_merge parallel(mmt) */ organization_id,min(transaction_id) transaction_id
1012: FROM mtl_material_transactions mmt
1013: WHERE costed_flag in('N','E')
1014: AND transaction_id >= (SELECT from_bound_id FROM opi_dbi_conc_prog_run_log plog
1015: WHERE plog.etl_type = p_etl_type
1016: AND plog.load_type = p_load_type
1017: AND plog.driving_table_code = 'MMT'
1018: AND plog.bound_level_entity_code = 'ORGANIZATION'

Line 1031: l_debug_msg := 'Updated '||to_char(sql%rowcount)||' rows in OPI_DBI_CONC_PROG_RUN_LOG' ;

1027: AND prlout.load_type = p_load_type
1028: AND prlout.bound_level_entity_code = 'ORGANIZATION';
1029:
1030: IF l_debug_mode = 'Y' AND upper(l_module_name) like 'BIS%' THEN
1031: l_debug_msg := 'Updated '||to_char(sql%rowcount)||' rows in OPI_DBI_CONC_PROG_RUN_LOG' ;
1032: opi_dbi_bounds_pkg.write(g_pkg_name, l_proc_name, l_stmt_no, l_debug_msg);
1033: END IF;
1034:
1035: EXCEPTION

Line 1083: INSERT into OPI_DBI_CONC_PROG_RUN_LOG(

1079: /* insert records with from_bound_id as first transaction after GSD and to_bound_id as max of
1080: transaction_id as of setting bounds from WTA */
1081:
1082: l_stmt_no := 20;
1083: INSERT into OPI_DBI_CONC_PROG_RUN_LOG(
1084: driving_table_code ,
1085: etl_type ,
1086: load_type ,
1087: bound_type ,

Line 1134: l_debug_msg := 'Inserted '||to_char(sql%rowcount)||' rows into OPI_DBI_CONC_PROG_RUN_LOG' ;

1130: FROM wip_transaction_accounts
1131: WHERE transaction_date >= l_global_start_date;
1132:
1133: IF l_debug_mode = 'Y' AND upper(l_module_name) like 'BIS%' THEN
1134: l_debug_msg := 'Inserted '||to_char(sql%rowcount)||' rows into OPI_DBI_CONC_PROG_RUN_LOG' ;
1135: opi_dbi_bounds_pkg.write(g_pkg_name, l_proc_name, l_stmt_no, l_debug_msg);
1136: END IF;
1137:
1138: ELSIF (p_load_type = 'INCR') then

Line 1141: UPDATE OPI_DBI_CONC_PROG_RUN_LOG

1137:
1138: ELSIF (p_load_type = 'INCR') then
1139: /* Update to_bound as max of transaction_id as of setting the bounds */
1140: l_stmt_no := 30;
1141: UPDATE OPI_DBI_CONC_PROG_RUN_LOG
1142: SET (to_bound_id ,
1143: completion_status_code ,
1144: last_update_date ,
1145: last_updated_by ,

Line 1166: l_debug_msg := 'Updated '||to_char(sql%rowcount)||' rows in OPI_DBI_CONC_PROG_RUN_LOG' ;

1162: AND etl_type = 'INVENTORY'
1163: AND load_type = p_load_type;
1164:
1165: IF l_debug_mode = 'Y' AND upper(l_module_name) like 'BIS%' THEN
1166: l_debug_msg := 'Updated '||to_char(sql%rowcount)||' rows in OPI_DBI_CONC_PROG_RUN_LOG' ;
1167: opi_dbi_bounds_pkg.write(g_pkg_name, l_proc_name, l_stmt_no, l_debug_msg);
1168: END IF;
1169:
1170: END IF;

Line 1225: INSERT into OPI_DBI_CONC_PROG_RUN_LOG(

1221: end if;
1222:
1223: if (p_load_type = 'INIT') then
1224: l_stmt_no := 20;
1225: INSERT into OPI_DBI_CONC_PROG_RUN_LOG(
1226: driving_table_code ,
1227: etl_type ,
1228: load_type ,
1229: bound_type ,

Line 1273: l_debug_msg := 'Inserted '||to_char(sql%rowcount)||' rows into OPI_DBI_CONC_PROG_RUN_LOG' ;

1269: l_program_application_id,
1270: l_request_id
1271: FROM DUAL ;
1272: IF l_debug_mode = 'Y' AND upper(l_module_name) like 'BIS%' THEN
1273: l_debug_msg := 'Inserted '||to_char(sql%rowcount)||' rows into OPI_DBI_CONC_PROG_RUN_LOG' ;
1274: opi_dbi_bounds_pkg.write(g_pkg_name, l_proc_name, l_stmt_no, l_debug_msg);
1275: END IF;
1276:
1277: elsif (p_load_type = 'INCR') then

Line 1279: UPDATE OPI_DBI_CONC_PROG_RUN_LOG

1275: END IF;
1276:
1277: elsif (p_load_type = 'INCR') then
1278: l_stmt_no := 30;
1279: UPDATE OPI_DBI_CONC_PROG_RUN_LOG
1280: SET TO_BOUND_DATE = sysdate ,
1281: completion_status_code = null ,
1282: LAST_RUN_DATE = sysdate ,
1283: LAST_UPDATE_DATE = sysdate ,

Line 1294: l_debug_msg := 'Updated '||to_char(sql%rowcount)||' rows in OPI_DBI_CONC_PROG_RUN_LOG' ;

1290: WHERE DRIVING_TABLE_CODE = p_driving_table_code
1291: AND ETL_TYPE = p_etl_type
1292: AND LOAD_TYPE = 'INCR';
1293: IF l_debug_mode = 'Y' AND upper(l_module_name) like 'BIS%' THEN
1294: l_debug_msg := 'Updated '||to_char(sql%rowcount)||' rows in OPI_DBI_CONC_PROG_RUN_LOG' ;
1295: opi_dbi_bounds_pkg.write(g_pkg_name, l_proc_name, l_stmt_no, l_debug_msg);
1296: END IF;
1297: end if;
1298:

Line 1329: UPDATE OPI_DBI_CONC_PROG_RUN_LOG

1325: l_debug_mode := NVL(FND_PROFILE.value('AFLOG_ENABLED'), 'N');
1326: l_proc_name := 'set_load_successful';
1327:
1328: l_stmt_no := 10;
1329: UPDATE OPI_DBI_CONC_PROG_RUN_LOG
1330: SET completion_status_code = 'S'
1331: WHERE etl_type = p_etl_type
1332: AND load_type = p_load_type; /*update log table with status success */
1333:

Line 1405: FROM opi_dbi_conc_prog_run_log log,

1401: STOP_ALL_COSTED, 'All Costed',
1402: STOP_UNCOSTED, 'Uncosted',
1403: 'Data Issue?') stop_reason,
1404: nvl (mmt.transaction_date, sysdate) data_until
1405: FROM opi_dbi_conc_prog_run_log log,
1406: mtl_parameters mp,
1407: mtl_material_transactions mmt
1408: WHERE log.driving_table_code = 'MMT'
1409: AND log.to_bound_id = mmt.transaction_id (+)

Line 1513: FROM OPI_DBI_CONC_PROG_RUN_LOG

1509: l_stmt_id := 10;
1510: BEGIN
1511: SELECT g_warning
1512: INTO l_warning
1513: FROM OPI_DBI_CONC_PROG_RUN_LOG
1514: WHERE stop_reason_code = STOP_UNCOSTED
1515: AND etl_type = p_etl_type
1516: AND load_type = p_load_type
1517: AND rownum = 1;