@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":""
}
}*/
Depth:
1
2
3
4
5
All
Reload
atov_cl_item_dep_latest_exp view