DBA Data[Home] [Help]

APPS.OPI_DBI_INV_CPCS_PKG dependencies on OPI_DBI_INV_VALUE_LOG

Line 166: UPDATE opi_dbi_inv_value_log

162: -- Since periods for different organizations can be closed
163: -- at different times, we can only update rows for orgs that
164: -- have been processed in this run i.e. ones with
165: -- uncosted_trx_id = -99.
166: UPDATE opi_dbi_inv_value_log
167: SET uncosted_trx_id = NULL,
168: from_transaction_date = transaction_date,
169: transaction_date = NULL
170: WHERE uncosted_trx_id = -99

Line 213: -- R12 Changes: Replaced opi_dbi_inv_value_log by conc_prog_run_log in outer select.

209: 'Start of Period Close Adjustments load.');
210:
211: -- For all organizations collected in Initial load of Inventory
212: -- check if lump sum processing is done by CPCS or not.
213: -- R12 Changes: Replaced opi_dbi_inv_value_log by conc_prog_run_log in outer select.
214: BEGIN
215: l_stmt_num := 5;
216: SELECT 1
217: INTO l_dbilog_rows

Line 231: FROM opi_dbi_inv_value_log inlog

227: -- this additional filter.
228: AND nvl(mp.process_enabled_flag,'-1') <> 'Y'
229: AND NOT EXISTS
230: (SELECT 'x'
231: FROM opi_dbi_inv_value_log inlog
232: WHERE inlog.TYPE = 'PCS'
233: AND inlog.source = g_opi_cpcs_source
234: AND inlog.organization_id = log.bound_level_entity_id)
235: AND rownum = 1;

Line 250: INSERT INTO opi_dbi_inv_value_log

246: l_stmt_num := 10;
247: l_status := 'First Period Close adjustment';
248: -- Insert into DBI Inventory Log the organizations
249: -- that need first lump-sum adjustment ...
250: INSERT INTO opi_dbi_inv_value_log
251: (organization_id,
252: transaction_id,
253: transaction_date,
254: uncosted_trx_id,

Line 282: FROM opi_dbi_inv_value_log inlog

278: AND oap.schedule_close_date >= g_global_start_date
279: AND oap.summarized_flag ='Y'
280: AND NOT EXISTS
281: (SELECT 'x'
282: FROM opi_dbi_inv_value_log inlog
283: WHERE inlog.organization_id = cpcs.organization_id
284: AND inlog.type = 'PCS'
285: AND inlog.source = g_opi_cpcs_source)
286: GROUP BY cpcs.organization_id;

Line 300: DELETE FROM opi_dbi_inv_value_log

296: -- Backdated transactions after to_txn_date in DBI
297: -- Inventory Log table and the backdated transaction
298: -- lies within the first period close in CPCS
299: l_stmt_num := 20;
300: DELETE FROM opi_dbi_inv_value_log
301: WHERE organization_id IN
302: (SELECT mmt.organization_id
303: FROM
304: mtl_material_transactions mmt,

Line 305: opi_dbi_inv_value_log log2

301: WHERE organization_id IN
302: (SELECT mmt.organization_id
303: FROM
304: mtl_material_transactions mmt,
305: opi_dbi_inv_value_log log2
306: WHERE log2.uncosted_trx_id = -99 -- Indicates that the organization needs lump-sum adjustment processing
307: AND log2.type = 'PCS'
308: AND log2.source = g_opi_cpcs_source
309: AND mmt.organization_id = log2.organization_id

Line 421: opi_dbi_inv_value_log invlog

417: sum(rollback_intransit_value) cpcs_intransit_value_b
418: FROM
419: cst_period_close_summary cpcs,
420: org_acct_periods oap,
421: opi_dbi_inv_value_log invlog
422: WHERE cpcs.acct_period_id = oap.acct_period_id
423: AND cpcs.organization_id = oap.organization_id
424: AND oap.summarized_flag ='Y'
425: AND cpcs.organization_id = invlog.organization_id

Line 446: opi_dbi_inv_value_log invlog

442: sum(onhand_value_b) dbi_onhand_value_b,
443: sum(intransit_value_b) dbi_intransit_value_b
444: FROM
445: opi_dbi_inv_value_f f,
446: opi_dbi_inv_value_log invlog
447: WHERE f.organization_id = invlog.organization_id
448: AND f.transaction_date < invlog.transaction_date + 1 -- include all txns on CPCSD First Period close date too
449: AND invlog.uncosted_trx_id = -99 -- Indicates that the organization needs lump-sum adjustment processing
450: AND invlog.TYPE = 'PCS'

Line 477: UPDATE opi_dbi_inv_value_log

473: -- transaction_Date, and make the transaction_Date null.
474: -- We will use the from_transaction_date as the starting
475: -- bound for all regular adjustments.
476: -- See bug 4285814.
477: UPDATE opi_dbi_inv_value_log
478: SET uncosted_trx_id = null,
479: from_transaction_date = transaction_date,
480: transaction_date = NULL
481: WHERE uncosted_trx_id = -99

Line 500: MERGE INTO OPI_DBI_INV_VALUE_LOG log

496: -- Update DBI INV log PCS rows for existing organizations
497: -- Insert new DBI Inv log PCS rows for new organizations
498: l_status := 'Regular adjustment';
499: l_stmt_num := 40;
500: MERGE INTO OPI_DBI_INV_VALUE_LOG log
501: USING
502: (
503: SELECT
504: cpcs.Organization_id,

Line 518: OPI_DBI_INV_VALUE_LOG invlog

514: g_last_update_login last_update_login
515: FROM
516: cst_period_close_summary cpcs,
517: org_acct_periods oap,
518: OPI_DBI_INV_VALUE_LOG invlog
519: WHERE
520: cpcs.acct_period_id = oap.acct_period_id
521: AND cpcs.organization_id = oap.organization_id
522: AND oap.summarized_flag ='Y'

Line 585: FROM opi_dbi_inv_value_log

581: -- an errored out run from last time that require adjustments.
582: l_dbilog_rows := 0;
583: SELECT count (*)
584: INTO l_dbilog_rows
585: FROM opi_dbi_inv_value_log
586: WHERE type = 'PCS'
587: AND source = g_opi_cpcs_source
588: AND uncosted_trx_id = -99;
589:

Line 639: opi_dbi_inv_value_log invlog

635: g_last_update_login last_update_login
636: FROM
637: cst_period_close_summary cpcs,
638: org_acct_periods oap,
639: opi_dbi_inv_value_log invlog
640: WHERE cpcs.acct_period_id = oap.acct_period_id
641: AND cpcs.organization_id = oap.organization_id
642: AND oap.summarized_flag ='Y'
643: AND cpcs.organization_id = invlog.organization_id

Line 740: INSERT INTO opi_dbi_inv_value_log

736:
737: -- Period Close Adjustment process
738: IF (Insert_Adjustments(errbuf, retcode) = g_error) THEN
739: BIS_COLLECTION_UTILITIES.put_line('Failed to collect adjustments into staging tables.');
740: INSERT INTO opi_dbi_inv_value_log
741: (organization_id, transaction_id, transaction_date, type,
742: source, creation_date, last_update_date, created_by,
743: last_updated_by, last_update_login
744: )

Line 754: FROM opi_dbi_inv_value_log

750: commit;
751: return;
752: ELSE
753: DELETE
754: FROM opi_dbi_inv_value_log
755: WHERE type = 'ERR'
756: AND source = g_opi_cpcs_source;
757: commit;
758: END IF;

Line 792: INSERT INTO opi_dbi_inv_value_log

788: END IF;
789:
790: IF (Clean_Staging_Table (errbuf, retcode) = g_error) THEN
791: BIS_COLLECTION_UTILITIES.put_line('Failed to clean staging tables.');
792: INSERT INTO opi_dbi_inv_value_log
793: (organization_id, transaction_id, transaction_date, type,
794: source, creation_date, last_update_date, created_by, last_updated_by,
795: last_update_login
796: )