Atov_Col_Item_Conti_Join

DDL: ATOV_COL_ITEM_CONTI_JOIN SQL: ATO_V_COL_CONTI Type: view Package: S_ATO_CORE

Join Continous BOM and Collection Items

Atov_Col_Item_Conti_Join is a CDS View that provides data about "Join Continous BOM and Collection Items" in SAP S/4HANA. It reads from 3 data sources (Atov_Conti_Item_Key, ato_conti_exclud, ato_items) and exposes 5 fields with key fields item_type, item_id. Part of development package S_ATO_CORE.

Data Sources (3)

SourceAliasJoin Type
Atov_Conti_Item_Key Conti left_outer
ato_conti_exclud Exclude left_outer
ato_items Item from

Annotations (4)

NameValueLevelField
AbapCatalog.sqlViewName ATO_V_COL_CONTI view
ClientHandling.type #INHERITED view
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label Join Continous BOM and Collection Items view

Fields (5)

KeyFieldSource TableSource FieldDescription
KEY item_type ato_items item_type
KEY item_id ato_items item_id
item_status ato_items item_status
changed_at ato_items last_notification
BOM_updated_at Atov_Conti_Item_Key last_updated_at
@AbapCatalog.sqlViewName: 'ATO_V_COL_CONTI'
@ClientHandling:{ type: #INHERITED, algorithm: #SESSION_VARIABLE }
@EndUserText.label: 'Join Continous BOM and Collection Items'
define view Atov_Col_Item_Conti_Join  as

  select from ato_items as Item 
   left outer join Atov_Conti_Item_Key as Conti on
   Item.item_type = Conti.item_type and
   Item.item_id = Conti.item_id
   left outer join ato_conti_exclud as Exclude on
   Item.item_type = Exclude.item_type and
   Item.item_id = Exclude.item_id

  {
    key Item.item_type,
    key Item.item_id,
    Item.item_status,
    Item.last_notification as changed_at, // this is the last Notification Timestamp

    Conti.last_updated_at as BOM_updated_at,
    case COALESCE(Conti.last_updated_at, 0) 
      when 0 then ''
      else 'X'
    end as BOM_exists,
    case when Item.last_notification > Conti.last_updated_at    then 'X'
      else ''
    end as BOM_outdated,
    case when Item.last_notification> Exclude.excluded_at    then ''
      else case COALESCE(Exclude.excluded_at, 0)
         when 0 then ''
         else 'X'
      end   
    end as Excluded    

  }
  where Item.timestamp = 0;