CST Supply Chain Indented Bills of Material Cost

Description
Categories: BI Publisher, Financials, Manufacturing
Columns: Comp Rollup Id, Comp Top Inventory Item Id, Comp Top Organization Id, Comp Sort Order, Comp Cost Type, Comp Level Code, Comp Op Seq Num, Comp Name, Comp Desc, Comp Org ...
Application: Bills of Material
Source: Supply Chain Indented Bills of Material Cost Report (XML)
Short Name: CSTRSCCRI_XML
DB package: BOM_CSTRSCCR_XMLP_PKG
select
  abs(CSBS.rollup_id)                   comp_rollup_id,
  CSBS.top_inventory_item_id       comp_top_inventory_item_id,
  CSBS.top_organization_id         comp_top_organization_id,
  CSBS.sort_order                  comp_sort_order,
  CIC.cost_type_id                  comp_cost_type,
  decode(:p_report_type_type, 1, lpad('.',CSBS.bom_level-1,'.')||to_char(CSBS.bom_level-1), null) comp_level_code,
  BIC.operation_seq_num            comp_op_seq_num,
  MSI.concatenated_segments        comp_name,
  MSI.description                  comp_desc,
  MP.organization_code            comp_org,
  CSBS.component_revision                     revision,
  LU1.meaning                      make_buy,
  LU2.meaning                      include_in_rollup,
  LU3.meaning                      based_on_rollup,
  LU4.meaning                      inventory_asset,
  LU5.meaning                      phantom,
  BIC.component_yield_factor       component_yield_factor,
  BIC.planning_factor                     component_planning_factor,
  MSI.primary_uom_code             component_uom,
  decode(:p_report_type_type, 1, CSBS.component_quantity, null)          component_quantity,
  CIC.shrinkage_rate               shrinkage_rate,
  CSBS.extended_quantity           extended_quantity,
  nvl( CIC.item_cost, 0 )                    item_cost,
  decode( CSBS.extend_cost_flag, 2, 0, 
    (
      decode( :P_MATERIAL_DTL_FLAG, 1, 0, 
        decode( CSBS.bom_level, :LP_REPORT_LEVEL, nvl( CIC.pl_material, 0 ), 0 ) +
         decode( 
            decode( :p_phantom_mat, 1, 0, 1 )