CAC Resource Costs
Description
Categories: Enginatics
Repository: Github
Repository: Github
Report to show the resource and outside processing costs by organization and cost type.
Parameters:
Cost Type: enter the cost type you wish to report, defaults to your Costing Method (mandatory).
Include Non-Costed Resources: choose No to exclude non-costed resources, choose Yes to include them. You normally use non-costed resources for scheduling purposes (mandatory).
Organizat ... more
Parameters:
Cost Type: enter the cost type you wish to report, defaults to your Costing Method (mandatory).
Include Non-Costed Resources: choose No to exclude non-costed resources, choose Yes to include them. You normally use non-costed resources for scheduling purposes (mandatory).
Organizat ... more
select nvl(gl.short_name, gl.name) Ledger, -- ================================================= -- Get the costed bom resources -- ================================================= haou2.name Operating_Unit, mp.organization_code Org_Code, br.resource_code Resource_Code, -- Revision for version 1.7 br.description Resource_Description, cec.cost_element Cost_Element, cct.cost_type Cost_Type, gl.currency_code Currency_Code, nvl(crc.resource_rate,0) Resource_Rate, ml1.meaning Resource_Type, ml2.meaning Charge_Type, -- Revision for version 1.10 ml3.meaning Allow_Costs, br.unit_of_measure UOM_Code, ml4.meaning Standard_Rate, -- End revision for version 1.10 msiv.concatenated_segments OSP_Item_Number, msiv.description OSP_Item_Description, -- Revision for version 1.4 -- Revision for version 1.5 -- br.attribute1 Res Type, (select ca.activity from cst_activities ca where ca.activity_id = br.default_activity_id) Activity, -- End revision for version 1.5 -- Revision for version 1.4 &segment_columns -- Revision for version 1.11 gcc2.concatenated_segments Absorption_Account, gcc1.concatenated_segments Variance_Account, -- End revision for version 1.11 br.disable_date Disable_Date, -- Revision for version 1.6 br.creation_date Creation_Date, fu.user_name Created_By, -- Revision for version 1.8 br.last_update_date Last_Update_Date, fu2.user_name Last_Updated_By from cst_resource_costs crc, bom_resources br, mtl_system_items_vl msiv, mtl_parameters mp, cst_cost_elements cec, cst_cost_types cct, hr_organization_information hoi, hr_all_organization_units_vl haou, hr_all_organization_units_vl haou2, gl_ledgers gl, mfg_lookups ml1, -- Resource Type mfg_lookups ml2, -- Charge Type -- Revision for version 1.10 mfg_lookups ml3, -- Allow Costs mfg_lookups ml4, -- Standard Rate Flag -- End revision for version 1.10 -- Revision for version 1.4 gl_code_combinations_kfv gcc1, gl_code_combinations_kfv gcc2, -- Revision for version 1.6 fnd_user fu, -- Revision for version 1.8 fnd_user fu2 -- ================================================= -- Joins for the items, costs and resources -- ================================================= where gl.ledger_id in (select nvl(glsnav.ledger_id,gasna.ledger_id) from gl_access_set_norm_assign gasna, gl_ledger_set_norm_assign_v glsnav where gasna.access_set_id=fnd_profile.value('GL_ACCESS_SET_ID') and gasna.ledger_id=glsnav.ledger_set_id(+)) and haou2.organization_id in (select mgoat.organization_id from mo_glob_org_access_tmp mgoat union select fnd_global.org_id from dual where fnd_release.major_version=11) and crc.resource_id = br.resource_id and crc.organization_id = mp.organization_id and crc.cost_type_id = cct.cost_type_id and 1=1 and br.purchase_item_id = msiv.inventory_item_id (+) and br.organization_id = msiv.organization_id (+) and mp.organization_id = br.organization_id and br.cost_element_id = cec.cost_element_id and br.allow_costs_flag = 1 -- Yes -- ================================================= -- Eliminate orgs no longer in use and mp.organization_id <> mp.master_organization_id -- ================================================= -- Joins for the lookup codes -- ================================================= and ml1.lookup_type = 'BOM_RESOURCE_TYPE' and ml1.lookup_code = br.resource_type and ml2.lookup_type = 'BOM_AUTOCHARGE_TYPE' and ml2.lookup_code = br.autocharge_type -- Revision for version 1.10 and ml3.lookup_type = 'SYS_YES_NO' and ml3.lookup_code = br.allow_costs_flag and ml4.lookup_type = 'SYS_YES_NO' and ml4.lookup_code = br.standard_rate_flag -- End revision for version 1.10 -- ================================================= -- Organization joins to the HR org model -- ================================================= and hoi.org_information_context = 'Accounting Information' and hoi.organization_id = mp.organization_id and hoi.organization_id = haou.organization_id -- this gets the organization name and haou2.organization_id = to_number(hoi.org_information3) -- this gets the operating unit id and gl.ledger_id = to_number(hoi.org_information1) -- get the ledger_id -- avoid selecting disabled inventory organizations and sysdate < nvl(haou.date_to, sysdate + 1) and 2=2 -- ================================================= -- Joins for the account numbers -- ================================================= -- Revision for version 1.11, add outer joins and br.rate_variance_account = gcc1.code_combination_id (+) and br.absorption_account = gcc2.code_combination_id (+) -- ================================================= -- Find the Created_By, revision 1.6 and 1.8 -- ================================================= and fu.user_id (+) = br.created_by and fu2.user_id (+) = br.last_updated_by and mp.organization_id in (select oav.organization_id from org_access_view oav where oav.resp_application_id=fnd_global.resp_appl_id and oav.responsibility_id=fnd_global.resp_id) -- End revision for version 1.11 union all -- ================================================= -- Get the non-costed bom resources -- ================================================= select nvl(gl.short_name, gl.name) Ledger, haou2.name Operating_Unit, mp.organization_code Org_Code, br.resource_code Resource_Code, -- Revision for version 1.7 br.description Resource_Description, null Cost_Element, null Cost_Type, null Currency_Code, null Resource_Rate, ml1.meaning Resource_Type, ml2.meaning Charge_Type, -- Revision for version 1.10 ml3.meaning Allow_Costs, br.unit_of_measure UOM_Code, ml4.meaning Standard_Rate, -- End revision for version 1.10 msiv.concatenated_segments OSP_Item_Number, msiv.description OSP_Item_Description, -- Revision for version 1.5 -- br.attribute1 Res Type, (select ca.activity from cst_activities ca where ca.activity_id = br.default_activity_id) Activity, -- End revision for version 1.5 -- Revision for version 1.4 &segment_columns2 -- Revision for version 1.11 null Absorption_Account, null Variance_Account, -- End revision for version 1.11 br.disable_date Disable_Date, -- Revision for version 1.6 br.creation_date Creation_Date, fu.user_name Created_By, -- Revision for version 1.8 br.last_update_date Last_Update_Date, fu2.user_name Last_Updated_By from bom_resources br, mtl_system_items_vl msiv, mtl_parameters mp, hr_organization_information hoi, hr_all_organization_units_vl haou, hr_all_organization_units_vl haou2, gl_ledgers gl, mfg_lookups ml1, mfg_lookups ml2, -- Revision for version 1.10 mfg_lookups ml3, -- Allow Costs mfg_lookups ml4, -- Standard Rate Flag -- End revision for version 1.10 -- Revision for version 1.6 fnd_user fu, -- Revision for version 1.8 fnd_user fu2 -- ================================================= -- Joins for the items, costs and resources -- ================================================= where gl.ledger_id in (select nvl(glsnav.ledger_id,gasna.ledger_id) from gl_access_set_norm_assign gasna, gl_ledger_set_norm_assign_v glsnav where gasna.access_set_id=fnd_profile.value('GL_ACCESS_SET_ID') and gasna.ledger_id=glsnav.ledger_set_id(+)) and haou2.organization_id in (select mgoat.organization_id from mo_glob_org_access_tmp mgoat union select fnd_global.org_id from dual where fnd_release.major_version=11) and br.purchase_item_id = msiv.inventory_item_id (+) and br.organization_id = msiv.organization_id (+) and mp.organization_id = br.organization_id and br.allow_costs_flag = 2 -- No -- ================================================= -- Include or exclude non-costed resources -- ================================================= and 3=3 -- ================================================= -- Eliminate orgs no longer in use and mp.organization_id <> mp.master_organization_id -- ================================================= -- Joins for the lookup codes -- ================================================= and ml1.lookup_type = 'BOM_RESOURCE_TYPE' and ml1.lookup_code = br.resource_type and ml2.lookup_type = 'BOM_AUTOCHARGE_TYPE' and ml2.lookup_code = br.autocharge_type -- Revision for version 1.10 and ml3.lookup_type = 'SYS_YES_NO' and ml3.lookup_code = br.allow_costs_flag and ml4.lookup_type = 'SYS_YES_NO' and ml4.lookup_code = br.standard_rate_flag -- End revision for version 1.10 -- ================================================= -- Organization joins to the HR org model -- ================================================= and hoi.org_information_context = 'Accounting Information' and hoi.organization_id = mp.organization_id and hoi.organization_id = haou.organization_id -- this gets the organization name and haou2.organization_id = to_number(hoi.org_information3) -- this gets the operating unit id and gl.ledger_id = to_number(hoi.org_information1) -- get the ledger_id -- avoid selecting disabled inventory organizations and sysdate < nvl(haou.date_to, sysdate + 1) and 2=2 -- ================================================= -- Find the Created_By, revision 1.6 and 1.8 -- ================================================= -- Revision for version 1.11 and fu.user_id (+) = br.created_by and fu2.user_id (+) = br.last_updated_by and mp.organization_id in (select oav.organization_id from org_access_view oav where oav.resp_application_id=fnd_global.resp_appl_id and oav.responsibility_id=fnd_global.resp_id) -- End revision for version 1.11 -- Order by Ledger, Operating_Unit, Org_Code, Resource and Cost_Element order by 1,2,3,4,6 |
Parameter Name | SQL text | Validation | |
---|---|---|---|
Cost Type |
|
LOV | |
Include Non-Costed Resources |
|
LOV Oracle | |
Organization Code |
|
LOV | |
Operating Unit |
|
LOV | |
Ledger |
|
LOV |