CAC OPM WIP Account Value

Description

Categories
Enginatics, R12 only
Repository
GitHub
Report to show WIP values for process manufacturing (OPM), in summary by inventory organization and batch, with batch status, name and other details. The valuation accounts come from the cumulative WIP Valuation accounting entries, as processed by Create Accounting.

Parameters:
===========
Period Name: the inventory accounting period you wish to report (mandatory).
Include Lab Batches: enter Yes to include laboratory batches. Enter No to exclude them. Defaults to No (mandatory).
Show Batch Details: enter Yes to display the formula, routing and recipe numbers and versions. Defaults to No (mandatory).
Show Transaction Details: enter Yes to show the Event Class, Transaction Type, Transaction ID and Transaction Date. Defaults to No (mandatory).
Batch Number: enter a specific batch number to report (optional).
Category Set 1: the first item category set to report, typically the Cost or Product Line Category Set (optional).
Category Set 2: The second item category set to report, typically the Inventory Category Set (optional).
Organization Code: any inventory organization, defaults to your session's inventory organization (optional).
Operating Unit: specific operating unit (optional).
Ledger: specific ledger (optional).

/* +=============================================================================+
-- | Copyright 2014 - 2024 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])
-- |
-- | Version Modified on Modified by Description
-- | ======= =========== ============== =========================================
-- | 1.0 22-Oct-2014 Douglas Volz Initial version.
-- | 1.1 06-Jul-2024 Douglas Volz Cumulative changes plus format for Blitz Report.
-- | 1.2 31-Jul-2024 Douglas Volz Fix to get current and prior month's transactions
-- | 1.3 06-Aug-2024 Douglas Volz Add Batch and Txn Detail parameters.
-- | 1.4 08-Aug-2024 Douglas Volz Add Product and Byproduct completion quantity columns.
-- | and inventory access control security.
-- | 1.5 17-Aug-2024 Douglas Volz Fix for reporting batches closed after the reported period.
-- | Add Batch Number parameter. Display the Ledger short name.
-- | 1.6 24 Oct 2026 Andy Haack Rebuilt to the Blitz Report SQL standards.
-- +=============================================================================+*/

SQL 302 lines

Parameters 11

ParameterTypeList of values SQL
Period NameLOV
oap.period_name=:p_period_name
Include Lab BatchesLOV Oracle
nvl(gbh.laboratory_ind,0)=0
Show Batch DetailsLOV Oracle
(select ffmv.formula_no from fm_form_mst_vl ffmv where y.formula_id=ffmv.formula_id) formula_number,
(select ffmv.formula_vers from fm_form_mst_vl ffmv where y.formula_id=ffmv.formula_id) formula_version,
(select frh.routing_no from fm_rout_hdr frh where y.routing_id=frh.routing_id) routing_number,
(select frh.routing_vers from fm_rout_hdr frh where y.routing_id=frh.routing_id) routing_version,
(select gr.recipe_no from gmd_recipe_validity_rules grvr, gmd_recipes gr where y.recipe_validity_rule_id=grvr.recipe_validity_rule_id and grvr.recipe_id=gr.recipe_id) recipe_number,
(select gr.recipe_version from gmd_recipe_validity_rules grvr, gmd_recipes gr where y.recipe_validity_rule_id=grvr.recipe_validity_rule_id and grvr.recipe_id=gr.recipe_id) recipe_version,
Show Transaction DetailsLOV Oracle
(select xecv.name from xla_event_classes_vl xecv where xecv.application_id=555 and y.event_class_code=xecv.event_class_code) event_class,
(select mtt.transaction_type_name from mtl_transaction_types mtt where y.transaction_type_id=mtt.transaction_type_id) material_transaction_type,
y.transaction_id,
y.transaction_date,
Batch NumberLOV
gbh.batch_no=:p_batch_no
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
Organization CodeLOV
mp.organization_code=:p_org_code
Operating UnitLOV
haouv_ou.name=:p_operating_unit
LedgerLOV
gl.name=:p_ledger