ATOV_CMN_GET_ALL_IMPORTABLE

DDL: ATOV_CMN_GET_ALL_IMPORTABLE SQL: ATO_V_IMPORTABLE Type: view

Common Import: Get all auto. rel. SWCs

ATOV_CMN_GET_ALL_IMPORTABLE is a CDS View that provides data about "Common Import: Get all auto. rel. SWCs" in SAP S/4HANA. It reads from 3 data sources (ato_col_versions, ato_col_versions, ato_cols) and exposes 1 field with key field version.

Data Sources (3)

SourceAliasJoin Type
ato_col_versions all_importable from
ato_col_versions col_versions left_outer
ato_cols collections inner

Annotations (5)

NameValueLevelField
AbapCatalog.sqlViewName ATO_V_IMPORTABLE view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label Common Import: Get all auto. rel. SWCs view

Fields (1)

KeyFieldSource TableSource FieldDescription
KEY version ato_col_versions version
@AbapCatalog.sqlViewName: 'ATO_V_IMPORTABLE'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Common Import: Get all auto. rel. SWCs'

define view ATOV_CMN_GET_ALL_IMPORTABLE
  as select from    ato_col_versions              as all_importable
    inner join ato_cols as collections on collections.collection_id = all_importable.collection_id
  // first ready for import timestamp necessary, unique entry for each collection

    left outer join ato_col_versions              as col_versions     on  col_versions.collection_id = all_importable.collection_id
                                                                      and col_versions.version       = all_importable.version
                                                                      and col_versions.resource_id   is initial
                                                                      and col_versions.action        is initial
                                                                      and col_versions.status        = #ATO_COLLECTION_STATUS.'R'
                                                                      and col_versions.timestamp     <> 0 // prevents duplicate key during prevalidation


{
  key all_importable.collection_id,
  key all_importable.version,
      cast( tstmp_seconds_between( col_versions.timestamp, tstmp_current_utctimestamp(), 'NULL') as abap.curr( 15, 1 ) ) as ts_seconds_between_as_curr

}
where
          collections.client  = $session.client
  and
          all_importable.timestamp     = 0
  and(
          all_importable.status        = #ATO_COLLECTION_STATUS.'R' // Ready for Import

    or(
          all_importable.action        = #ATO_COLLECTION_ACTION.'I' // Imported

      and all_importable.action_status = #ATO_ACTION_STATUS.'F'     // Failed

    )
    or(
          all_importable.action        = #ATO_COLLECTION_ACTION.'F' // Forwarded

      and all_importable.action_status = #ATO_ACTION_STATUS.'F'     // Failed

    )
  )
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"ATO_COLS",
"ATO_COL_VERSIONS"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/