[Home] [Help]
198: -- Intransit Tables:
199: -- OPI_DBI_INTR_SUP_TMP
200: -- OPI_DBI_INTR_MMT_TMP
201: -- OPI_DBI_INTR_MIP_TMP
202: -- OPI_DBI_INTRANSIT_STG
203: -- WIP Tables
204: -- OPI_DBI_WIP_STG
205: -- Onhand WIP Tables
206: -- OPI_DBI_ONH_QTY_STG
292: OPI_DBI_BOUNDS_PKG.write (g_pkg_name,l_proc_name,l_stmt_num, l_debug_msg );
293: END IF;
294:
295: l_stmt_num := 90;
296: execute immediate 'truncate table ' || g_opi_schema || '.OPI_DBI_INTRANSIT_STG';
297:
298: IF l_debug_mode = 'Y' and upper(l_module_name) like 'BIS%' then
299: l_debug_msg := 'OPI_DBI_INTRANSIT_STG table truncated.';
300: OPI_DBI_BOUNDS_PKG.write (g_pkg_name,l_proc_name,l_stmt_num, l_debug_msg );
295: l_stmt_num := 90;
296: execute immediate 'truncate table ' || g_opi_schema || '.OPI_DBI_INTRANSIT_STG';
297:
298: IF l_debug_mode = 'Y' and upper(l_module_name) like 'BIS%' then
299: l_debug_msg := 'OPI_DBI_INTRANSIT_STG table truncated.';
300: OPI_DBI_BOUNDS_PKG.write (g_pkg_name,l_proc_name,l_stmt_num, l_debug_msg );
301: END IF;
302:
303: l_stmt_num := 100;
1188: END IF;
1189:
1190: OPI_DBI_RPT_UTIL_PKG.g_pk_uom_conversion := 1;
1191:
1192: INSERT /*+ append parallel(opi_dbi_intransit_stg) */
1193: INTO OPI_DBI_INV_BEG_STG
1194: ( organization_id ,
1195: inventory_item_id,
1196: subinventory_code,
1534: Intransit_setup('INIT'); --R12 moved here
1535:
1536: l_stmt_num :=20;
1537: IF l_debug_mode = 'Y' and upper(l_module_name) like 'BIS%' then
1538: l_debug_msg := 'Inserting data Into opi_dbi_intransit_stg for ODM ';
1539: OPI_DBI_BOUNDS_PKG.write (g_pkg_name,l_proc_name,l_stmt_num, l_debug_msg );
1540: END IF;
1541:
1542: -- The extract below gets data from mmt staging table populated in INTRANSIT_SETUP.
1574: -- both these logical txns always has txn_organization same as owning organization.
1575: -- refer to detail use cases in DLD for this.
1576: -- The quantity on these txns is also the +ve intransit quantity.
1577: OPI_DBI_RPT_UTIL_PKG.g_pk_uom_conversion := 1;
1578: INSERT /*+ append */ INTO OPI_DBI_INTRANSIT_STG(
1579: organization_id,
1580: inventory_item_id,
1581: transaction_date,
1582: intransit_qty,
1718: if OPI_DBI_RPT_UTIL_PKG.g_pk_uom_conversion <> 1 then
1719: Raise UOM_CONV_ERROR;
1720: end if ;
1721:
1722: l_debug_msg := 'Inserted into staging table opi_dbi_intransit_stg - ' || SQL%ROWCOUNT || ' rows. ';
1723: OPI_DBI_BOUNDS_PKG.write(g_pkg_name, l_proc_name,l_stmt_num, l_debug_msg);
1724:
1725: commit;
1726:
1725: commit;
1726:
1727: l_stmt_num :=30;
1728: IF l_debug_mode = 'Y' and upper(l_module_name) like 'BIS%' then
1729: l_debug_msg := 'Inserting data Into opi_dbi_intransit_stg for OPM Post R12 ';
1730: OPI_DBI_BOUNDS_PKG.write (g_pkg_name,l_proc_name,l_stmt_num, l_debug_msg );
1731: END IF;
1732:
1733: -- extract to collect process orgs intransit data
1734: -- process does not support cost updates for intransit data hence
1735: -- no separate extract to get cost update data.
1736: OPI_DBI_RPT_UTIL_PKG.g_pk_uom_conversion := 1;
1737:
1738: INSERT /*+ APPEND */ INTO OPI_DBI_INTRANSIT_STG(
1739: organization_id,
1740: inventory_item_id,
1741: transaction_date,
1742: intransit_qty,
1874: Raise UOM_CONV_ERROR;
1875: end if;
1876: commit;
1877:
1878: l_debug_msg := 'Inserted into staging table opi_dbi_intransit_stg for OPM Post R12 - ' || SQL%ROWCOUNT || ' rows. ';
1879: OPI_DBI_BOUNDS_PKG.write (g_pkg_name,l_proc_name,l_stmt_num,l_debug_msg);
1880:
1881: l_debug_msg := 'End of collecting intransit ODM initial load. ';
1882: OPI_DBI_BOUNDS_PKG.write (g_pkg_name,l_proc_name,l_stmt_num,l_debug_msg);
2566: source
2567: FROM OPI_DBI_ONH_QTY_STG fact
2568: WHERE push_to_fact_flag = 'Y'
2569: UNION All
2570: select /*+ parallel(opi_dbi_intransit_stg) */
2571: organization_id,
2572: NULL,
2573: inventory_item_id,
2574: transaction_date,
2583: 0 onhand_value_b_draft,
2584: intransit_value_draft_b intransit_value_b_draft,
2585: 0 wip_value_b_draft,
2586: source
2587: from OPI_DBI_INTRANSIT_STG
2588: union all
2589: select /*+ parallel(OPI_DBI_INV_BEG_STG) */
2590: fact.organization_id,
2591: fact.subinventory_code,
2969: -- This procedure merges data from various
2970: -- staging tables populated in initial load.
2971: -- 1. OPI_DBI_ONH_QTY_STG -- onhand quantity
2972: -- 2. opi_dbi_opm_inv_stg -- Pre r12 OPM DATA
2973: -- 3. OPI_DBI_INTRANSIT_STG -- Intransit Qty and Value
2974: -- 4. OPI_DBI_INV_BEG_STG -- Inception qty and value
2975: -- 5. OPI_DBI_ONHAND_STG -- On hand value
2976: -- 6. OPI_DBI_CONVERSION_RATES -- currency conversion rates
2977: OPI_DBI_INV_VALUE_INIT_PKG.merge_initial_load;