Atov_Col_Item_ContiDep_Join

DDL: ATOV_COL_ITEM_CONTIDEP_JOIN SQL: ATO_V_COL_CONTID Type: view

Join Continous Dep and Collection Items

Atov_Col_Item_ContiDep_Join is a CDS View that provides data about "Join Continous Dep and Collection Items" in SAP S/4HANA. It reads from 4 data sources (ato_adapt_types, Atov_Contidep_Item_Key, ato_items, ATOV_CONTI_DEP_SAP_KEY) and exposes 6 fields with key fields item_type, item_id.

Data Sources (4)

SourceAliasJoin Type
ato_adapt_types Adapt_Type inner
Atov_Contidep_Item_Key Conti left_outer
ato_items Item from
ATOV_CONTI_DEP_SAP_KEY Released_References left_outer

Annotations (4)

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

Fields (6)

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
Dep_updated_at
SAP_Ref_updated_at
@AbapCatalog.sqlViewName: 'ATO_V_COL_CONTID'
@ClientHandling:{ type: #INHERITED, algorithm: #SESSION_VARIABLE }
@EndUserText.label: 'Join Continous Dep and Collection Items'
define view Atov_Col_Item_ContiDep_Join  as 
   select from ato_items as Item
    
   left outer join Atov_Contidep_Item_Key as Conti on
     Item.item_type = Conti.item_type and
     Item.item_id = Conti.item_id
        
    left outer join ATOV_CONTI_DEP_SAP_KEY as Released_References on
      Item.item_type = Released_References.item_type and   
      Item.item_id   = Released_References.item_id
    
    inner join ato_adapt_types as Adapt_Type on
       Item.item_type = Adapt_Type.adaptation_type 
      
  {
    key Item.item_type,
    key Item.item_id,
    Item.item_status,
    Item.last_notification as changed_at, // this is the last Notification Timestamp

    COALESCE(Conti.last_updated_at, 0) as Dep_updated_at,
    COALESCE(Released_References.updated_at , 0)  as SAP_Ref_updated_at,
    case 
      when Item.last_notification < COALESCE(Conti.last_updated_at, 0) then 'X'
      else case
        when Item.last_notification < COALESCE(Released_References.updated_at , 0) then 'X'
        else ''
      end    
     end as Dep_up_to_date,
    case COALESCE(Conti.last_updated_at, 0)
      when 0 then 
        case when Adapt_Type.col_empty_bom_allowed = 'X' then 'X'
        else ''
      end
      else ''
    end as empty_bom_allowed     
  }
  where  Item.timestamp = 0;     
  
  
 /*+[internal] {
"BASEINFO":
{
"FROM":
[
"ATOV_CONTIDEP_ITEM_KEY",
"ATOV_CONTI_DEP_SAP_KEY",
"ATO_ADAPT_TYPES",
"ATO_ITEMS"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/