CAC Intransit Value (Real-Time)

Description

Categories
Enginatics
Repository
GitHub
Report to show intransit values across all ledgers for current onhand balances and current costing method costs. This is a "real-time" report, showing the quantities and values at the time you run this report. (Used the cst_intransit_value_view to simplify the design.)

/* +=============================================================================+
-- | Copyright 2009-20 Douglas Volz Consulting, Inc. |
-- | All rights reserved. |
-- | Permission to use this code is granted provided the original author is |
-- | acknowledged. No warranties, express or otherwise is included in this |
-- | permission. |
-- +=============================================================================+
-- |
-- | Original Author: Douglas Volz ([email protected])
-- |
-- | Program Name: xxx_intransit_value_report.sql
-- |
-- | Parameters:
-- | p_org_code -- Specific inventory organization you wish to report (optional)
-- | p_operating_unit -- Operating Unit you wish to report, leave blank for all
-- | operating units (optional)
-- | p_ledger -- general ledger you wish to report, leave blank for all
-- | ledgers (optional)
-- | p_category_set1 -- The first item category set to report, typically the
-- | Cost or Product Line Category Set
-- | p_category_set2 -- The second item category set to report, typically the
-- | Inventory Category Set
-- |
-- | Description:
-- | Report to show intransit values across all ledgers, for current onhand
-- | balances and current costing method costs. This is a "real-time" report,
-- | showing the quantities and values at the time you run this report.
-- | (Note: Used the cst_intransit_value_view to simplify the design.)
-- |
-- | Version Modified on Modified by Description
-- | ======= =========== ============== =========================================
-- | 1.0 18 Nov 2008 Douglas Volz Initial Coding
-- | 1.1 10 Dec 2009 Douglas Volz Modified for Celgene
-- | 1.2 04 Jan 2010 Douglas Volz Added intransit value accounts
-- | 1.3 03 Mar 2010 Douglas Volz Set the company account number based on
-- | the item's cost of goods sold account
-- | 1.4 04 Mar 2010 Douglas Volz Screen out invalid Intransit balances from
-- | Dec 2009 transactions for Ledger CHE_EUR_PL.
-- | These intransit balances were written-off
-- | in the G/L in December 2009. Was not able
-- | to get these entries fixed in Oracle.
-- | 1.10 23 Apr 2020 Douglas Volz Changed to multi-language views for the item
-- | master, item categories and operating units.
-- | 1.11 23 Aug 2020 Douglas Volz Modified to get intransit_owning_org_id directly
-- | from mtl_supply; if you change the shipping
-- | network FOB Point and you can no longer get
-- | the FOB Point from cst_intransit_value_view.
-- | 1.12 27 Nov 2024 Eric Clegg. Added Minimum Absolute Intransit Quantity parameter
-- | 1.13 23 Oct 2026 Andy Haack Rebuilt to the Blitz Report SQL standards.
-- +=============================================================================+*/

SQL 120 lines

Parameters 8

ParameterTypeList of values SQL
Category Set 1LOV
select xxen_util.item_category_columns(p_category_set_name=>'<parameter_value>') sql_text from dual
Category Set 2LOV
select xxen_util.item_category_columns(p_category_set_name=>'<parameter_value>') sql_text from dual
Category Set 3LOV
select xxen_util.item_category_columns(p_category_set_name=>'<parameter_value>') sql_text from dual
Item NumberLOV
msiv.concatenated_segments=:p_item_number
Organization CodeLOV
mp.organization_code=:p_org_code
Operating UnitLOV
haouv_ou.name=:p_operating_unit
LedgerLOV
gl.name=:p_ledger
Minimum Absolute Intransit QtyNumber
having abs(sum(x.to_org_primary_quantity))>=abs(:p_abs_min_qty)