//*************************************************
// The view returns objects that have been released for the C0 contract.
//
// Element Definition:
// - OBJECT_TYPE: type of the released object. For a complete list of possible types, check
// object type group ARS_C0_RELEASABLE_TYPES in the SOTG transaction.
// - OBJECT_KEY: key of the releasd object. Together with OBJECT_TYPE, identifies a released object uniquely.
// - TADIR_OBJECT: type of main object of the released object as defined in the TADIR table.
// - TADIR_OBJ_NAME: name of main object of the released object as defined in the TADIR table.
// A main object may contain multiple released objects. However, the main object of a released object
// is unique
// - STATE_DESCRIPTION: state description
// - DECOMMISSIONING_DATE: For objects with release state *DEPRECATED*, this value defines the earliest point in time when a planned release state change to *DECOMMISSIONED*
// will take effect in customer systems. The value is given as the first day of a month of a year. If no date is given, decommissiong is not planned for the time being.
// Examples:
// - DDLS ARS_DEMO_BADIS_C0
//*************************************************
@AbapCatalog.sqlViewName: 'ARS_API_C0'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_ALLOWED
@EndUserText.label: 'APIs Released for C0 Contract and more'
define view ARS_APIS_RELEASED_FOR_C0
as select from ARS_RUNTIME_API_STATE as api
association [0..1] to ARS_RELEASE_STATE_DESCRIPTIONS 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 as abap.char(184)) as state, //IF_ARS_API_CONSTANTS=>CS_STATE
_text.description as state_description,
api.decommissioning_date
}
where
api.compatibility_contract = #ARS_RELEASE_CONTRACT.'C0' //IF_ARS_API_CONSTANTS=>CS_CONTRACT-C0
and api.use_in_key_user_apps = #ABAP_BOOLEAN.'X' //Use in Key User Apps only
and(
api.release_state = 'RELEASED' //IF_ARS_API_CONSTANTS=>CS_STATE-RELEASED
or api.release_state = 'DEPRECATED' //IF_ARS_API_CONSTANTS=>CS_STATE-DEPRECATED
)
union select from ars_custom_field_registry_apis as cfd
association [0..1] to ARS_RELEASE_STATE_DESCRIPTIONS as _text on _text.state = cfd.value
{
cfd.tadir_object,
cfd.tadir_obj_name,
cfd.object_type,
cfd.object_key,
cast(cfd.value as abap.char(184)) as state,
_text.description as state_description,
'' as decommissioning_date
}