atov_cl_item_dep_latest_exp

DDL: ATOV_CL_ITEM_DEP_LATEST_EXP SQL: ATO_V_CLI_DEP_LE Type: view

Latest Export of Dep Items for CL

atov_cl_item_dep_latest_exp is a CDS View that provides data about "Latest Export of Dep Items for CL" in SAP S/4HANA. It reads from 4 data sources (ato_changelists, ato_changel_dep, ato_changel_item, ato_changelists) and exposes 2 fields.

Data Sources (4)

SourceAliasJoin Type
ato_changelists cl from
ato_changel_dep cl_dep inner
ato_changel_item cl_item_of_dep inner
ato_changelists cl_of_dep inner

Annotations (5)

NameValueLevelField
AbapCatalog.sqlViewName ATO_V_CLI_DEP_LE view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_ALLOWED view
EndUserText.label Latest Export of Dep Items for CL view

Fields (2)

KeyFieldSource TableSource FieldDescription
item_type ato_changel_dep item_type
item_id ato_changel_dep item_id
@AbapCatalog.sqlViewName: 'ATO_V_CLI_DEP_LE'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_ALLOWED
@EndUserText.label: 'Latest Export of Dep Items for CL'
define view atov_cl_item_dep_latest_exp
  as select from ato_changelists  as cl
    inner join   ato_changel_dep  as cl_dep         on  cl_dep.changelist_id    = cl.changelist_id
                                                    and cl_dep.non_exp_relevant <> #ABAP_BOOLEAN.'X'
  //    left outer join ato_changel_item as cl_deps_on_same_cl on  cl_deps_on_same_cl.changelist_id = cl.changelist_id

  //                                                           and cl_deps_on_same_cl.item_type     = cl_dep.depending_on_item_type

  //                                                           and cl_deps_on_same_cl.item_id       = cl_dep.depending_on_item_id

    inner join   ato_changel_item as cl_item_of_dep on  cl_item_of_dep.item_type = cl_dep.depending_on_item_type
                                                    and cl_item_of_dep.item_id   = cl_dep.depending_on_item_id
    inner join   ato_changelists  as cl_of_dep      on  cl_of_dep.changelist_id =  cl_item_of_dep.changelist_id
                                                    and cl_of_dep.status        <> #ATO_CHANGELIST_STATUS.'I'
                                                    and cl_of_dep.exported_at   <= cl.exported_at
{
  cl.changelist_id,
  cl_dep.item_type,
  cl_dep.item_id,
  cl_dep.depending_on_item_type,
  cl_dep.depending_on_item_id,
  max( cl_of_dep.exported_at ) as latest_export_of_dep_on_items
}
//where

//        not(

//          cl_of_dep.status                 = #ATO_CHANGELIST_STATUS.'I'

//          and cl_of_dep.collection_id      = cl.collection_id

//          and cl_of_dep.collection_version = cl.collection_version

//        )

//  cl_deps_on_same_cl.changelist_id is null

group by
  cl.changelist_id,
  cl.collection_id,
  cl.collection_version,
  cl_dep.item_type,
  cl_dep.item_id,
  cl_dep.depending_on_item_type,
  cl_dep.depending_on_item_id
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"ATO_CHANGELISTS",
"ATO_CHANGEL_DEP",
"ATO_CHANGEL_ITEM"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/