ARS_APIS_RELEASED_FOR_C2 is a CDS View that provides data about "APIs Released for C2 Contract" in SAP S/4HANA. It reads from 1 data source (ARS_RUNTIME_API_STATE) and exposes 4 fields. It has 1 association to related views.
//*************************************************
// The view returns objects that have been released for the C2 contract.
//
// Element Definition:
// - OBJECT_TYPE: type of the released object. For a complete list of possible types, check
// object type group ARS_C2_RELEASABLE_TYPES in the SOTG transaction. Example: CDS_STOB.
// - OBJECT_KEY: key of the releasd object. Together with OBJECT_TYPE, identifies a released API uniquely.
// Example: name of the CDS view// - TADIR_OBJECT: type of main object of the released object as defined in the TADIR table. Example: DDLS
// - TADIR_OBJ_NAME: name of main object of the released object as defined in the TADIR table.
// Example: name of the data definition source.
// A main object may contain multiple released objects. However, the main object of a released object
// is unique
// - STATE: can have the values RELEASED, DEPRECATED, DECOMMISSIONED
// If the state is RELEASED, then// - consumption of the object is allowed
// If the state is DEPRECATED, then// - new consumptions of the object are forbidden
// - existing consumptions are syntactically still correct
// - and the object behaves as before
// If the state is DECOMMISSIONED, then// - new consumptions are forbidden
// - existing consumptions are syntactically still correct
// - but the object does not return any data
// - DESCRIPTION: state description
// - LAST_CHANGED_AT: date of last STATE change
// Examples:
// - DDLS ARS_DEMO_CDSVIEWS_C2
//*************************************************
@AbapCatalog.sqlViewName: 'ARS_API_C2'
@AbapCatalog.compiler.compareFilter: true@AccessControl.authorizationCheck: #NOT_ALLOWED@EndUserText.label: 'APIs Released for C2 Contract'
defineview ARS_APIS_RELEASED_FOR_C2
asselectfrom ARS_RUNTIME_API_STATE as api
association [0..1] to v_ars_release_state as _text on _text.state = api.release_state
{
api.object_type as tadir_object,
api.object_name as tadir_obj_name,
api.sub_object_type as object_type,
api.sub_object_name as object_key,
cast(api.release_state asabap.char(184)) as state, //IF_ARS_API_CONSTANTS=>CS_STATE
_text.description as state_description,
api.last_changed_at as last_changed_at
}
where
api.compatibility_contract = #ARS_RELEASE_CONTRACT.'C2' //IF_ARS_API_CONSTANTS=>CS_CONTRACT-C2
and(
api.release_state = 'RELEASED' //IF_ARS_API_CONSTANTS=>CS_STATE-RELEASED
or api.release_state = 'DEPRECATED' //IF_ARS_API_CONSTANTS=>CS_STATE-DEPRECATED
)