DDCDS_ENTITY_HEADER

DDL: DDCDS_ENTITY_HEADER SQL: DDCDS_E_HEADER_V Type: view_entity

CDS Entities: Header Information

DDCDS_ENTITY_HEADER is a CDS View that provides data about "CDS Entities: Header Information" in SAP S/4HANA. It reads from 6 data sources and exposes 9 fields with key fields entity_name, state. It has 17 associations to related views.

Data Sources (6)

SourceAliasJoin Type
ddldependency dep inner
dd02bnd node_info inner
DDCDS_USED_SESSION_VARIABLE session_var inner
ddddlsrc src inner
dd02b stob from
tadir tadir inner

Associations (17)

CardinalityTargetAliasCondition
[0..1] ddddlsrc02bt _label_text_active _label_text_active.ddlname = src.ddlname and _label_text_active.strucobjn = stob.strucobjn and _label_text_active.as4local = stob.as4local and _label_text_active.ddlanguage = $session.system_language -- Label text English
[0..1] ddddlsrc02bt _label_text_english _label_text_english.ddlname = src.ddlname and _label_text_english.strucobjn = stob.strucobjn and _label_text_english.as4local = stob.as4local and _label_text_english.ddlanguage = 'E' -- Label text Original
[0..1] ddddlsrc02bt _label_text_original _label_text_original.ddlname = src.ddlname and _label_text_original.strucobjn = stob.strucobjn and _label_text_original.as4local = stob.as4local and _label_text_original.ddlanguage = tadir.masterlang -- Source type text
[0..1] dd07t _source_type_text_active _source_type_text_active.domvalue_l = src.source_type and _source_type_text_active.as4local = stob.as4local and _source_type_text_active.domname = 'DDDDLSRCTYPE' and _source_type_text_active.ddlanguage = $session.system_language -- ABAP Language Version text
[0..1] dd07t _abap_lang_vers_text_active _abap_lang_vers_text_active.domvalue_l = src.abap_language_version and _abap_lang_vers_text_active.as4local = src.as4local and _abap_lang_vers_text_active.domname = 'ABAP_LANGUAGE_VERSION' and _abap_lang_vers_text_active.ddlanguage = $session.system_language -- iUser Name
[0..1] I_User _iuser _iuser.UserID = stob.chguser -- Annotation value 'ODATA.PUBLISH'
[0..1] ddheadanno _odata _odata.strucobjn = stob.strucobjn and _odata.name = 'ODATA.PUBLISH' -- Annotation value 'ANALYTICS.DATACATEGORY'
[0..1] ddheadanno _analytics_category _analytics_category.strucobjn = stob.strucobjn and _analytics_category.name = 'ANALYTICS.DATACATEGORY' -- Annotation value 'ANALYTICS.QUERY'
[0..1] ddheadanno _analytics_query _analytics_query.strucobjn = stob.strucobjn and _analytics_query.name = 'ANALYTICS.QUERY' -- Annotation value 'ACCESSCONTROL.AUTHORIZATIONCHECK'
[0..1] ddheadanno _access_control _access_control.strucobjn = stob.strucobjn and _access_control.name = 'ACCESSCONTROL.AUTHORIZATIONCHECK' -- Annotation value 'OBJECTMODEL.USAGETYPE.DATACLASS'
[0..1] ddheadanno _usage_type_data_class _usage_type_data_class.strucobjn = stob.strucobjn and _usage_type_data_class.name = 'OBJECTMODEL.USAGETYPE.DATACLASS' -- Annotation value 'OBJECTMODEL.USAGETYPE.SERVICEQUALITY'
[0..1] ddheadanno _usage_type_service_qual _usage_type_service_qual.strucobjn = stob.strucobjn and _usage_type_service_qual.name = 'OBJECTMODEL.USAGETYPE.SERVICEQUALITY' -- Annotation value 'OBJECTMODEL.USAGETYPE.SIZECATEGORY'
[0..1] ddheadanno _usage_type_size_category _usage_type_size_category.strucobjn = stob.strucobjn and _usage_type_size_category.name = 'OBJECTMODEL.USAGETYPE.SIZECATEGORY' -- Released objects for key Users (Language Version 2)
[0..1] ARS_APIS_RELEASED_FOR_C0 _released_for_c0 _released_for_c0.object_key = stob.strucobjn -- Add Custom Fields via Key User App (Contract C0) and _released_for_c0.object_type = 'CDS_STOB'
[0..1] ARS_APIS_RELEASED_FOR_C1 _released_for_c1 _released_for_c1.object_key = stob.strucobjn -- Use System-Internally (Contract C1) and _released_for_c1.object_type = 'CDS_STOB'
[0..1] ARS_APIS_RELEASED_FOR_C2 _released_for_c2 _released_for_c2.object_key = stob.strucobjn -- Use as Remote API (Contract C2) and _released_for_c2.object_type = 'CDS_STOB' -- Released objects for SAP ABAP Cloud Platform (Language Version 5)
[0..1] ARS_APIS_RELEASED_FOR_C1_SCP _released_for_c1_scp _released_for_c1_scp.object_key = stob.strucobjn -- Use System-Internally (Contract C1) and _released_for_c1_scp.object_type = 'CDS_STOB'

Annotations (2)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label CDS Entities: Header Information view

Fields (9)

KeyFieldSource TableSource FieldDescription
KEY entity_name Entity Name Upper Case
KEY state Entity State
ddl_name DDL Name
source_type Source Type
changed_by Changed By
changed_on Changed On
changed_at Changed At
changed_utc Changed UTC
label_text Label Text
//@AbapCatalog.sqlViewName: 'DDCDS_E_HEADER_V'

@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'CDS Entities: Header Information'
define view entity DDCDS_ENTITY_HEADER
  as select from dd02b                       as stob

    inner join   ddldependency               as dep         on  dep.objectname = stob.strucobjn
                                                            and dep.state      = stob.as4local
                                                            and dep.objecttype = 'STOB'
    inner join   ddddlsrc                    as src         on  src.ddlname  = dep.ddlname
                                                            and src.as4local = dep.state
  -- Has parameters
    inner join   dd02bnd                     as node_info   on  node_info.strucobjn = stob.strucobjn
                                                            and node_info.nodename  = '.NODE1'
                                                            and node_info.as4local  = stob.as4local
  -- Session variables
    inner join   DDCDS_USED_SESSION_VARIABLE as session_var on  session_var.strucobjn = stob.strucobjn
                                                            and session_var.nodename  = '.NODE1'
                                                            and session_var.as4local  = stob.as4local

  --tadir
    inner join   tadir                       as tadir       on  tadir.pgmid    = 'R3TR'
                                                            and tadir.object   = 'STOB'
                                                            and tadir.obj_name = stob.strucobjn

  -- Label text
  association [0..1] to ddddlsrc02bt                 as _label_text_active          on  _label_text_active.ddlname    = src.ddlname
                                                                                    and _label_text_active.strucobjn  = stob.strucobjn
                                                                                    and _label_text_active.as4local   = stob.as4local
                                                                                    and _label_text_active.ddlanguage = $session.system_language
  -- Label text English
  association [0..1] to ddddlsrc02bt                 as _label_text_english         on  _label_text_english.ddlname    = src.ddlname
                                                                                    and _label_text_english.strucobjn  = stob.strucobjn
                                                                                    and _label_text_english.as4local   = stob.as4local
                                                                                    and _label_text_english.ddlanguage = 'E'
  -- Label text Original
  association [0..1] to ddddlsrc02bt                 as _label_text_original        on  _label_text_original.ddlname    = src.ddlname
                                                                                    and _label_text_original.strucobjn  = stob.strucobjn
                                                                                    and _label_text_original.as4local   = stob.as4local
                                                                                    and _label_text_original.ddlanguage = tadir.masterlang

  -- Source type text
  /*+[hideWarning] { "IDS" : [ "CARDINALITY_CHECK" ] }*/
  association [0..1] to dd07t                        as _source_type_text_active    on  _source_type_text_active.domvalue_l = src.source_type
                                                                                    and _source_type_text_active.as4local   = stob.as4local
                                                                                    and _source_type_text_active.domname    = 'DDDDLSRCTYPE'
                                                                                    and _source_type_text_active.ddlanguage = $session.system_language
  -- ABAP Language Version text
  /*+[hideWarning] { "IDS" : [ "CARDINALITY_CHECK" ] }*/
  association [0..1] to dd07t                        as _abap_lang_vers_text_active on  _abap_lang_vers_text_active.domvalue_l = src.abap_language_version
                                                                                    and _abap_lang_vers_text_active.as4local   = src.as4local
                                                                                    and _abap_lang_vers_text_active.domname    = 'ABAP_LANGUAGE_VERSION'
                                                                                    and _abap_lang_vers_text_active.ddlanguage = $session.system_language
  -- iUser Name
  /*+[hideWarning] { "IDS" : [ "CARDINALITY_CHECK" ] }*/
  association [0..1] to I_User                       as _iuser                      on  _iuser.UserID = stob.chguser

  -- Annotation value 'ODATA.PUBLISH'
  /*+[hideWarning] { "IDS" : [ "CARDINALITY_CHECK" ] }*/
  association [0..1] to ddheadanno                   as _odata                      on  _odata.strucobjn = stob.strucobjn
                                                                                    and _odata.name      = 'ODATA.PUBLISH'
  -- Annotation value 'ANALYTICS.DATACATEGORY'
  /*+[hideWarning] { "IDS" : [ "CARDINALITY_CHECK" ] }*/
  association [0..1] to ddheadanno                   as _analytics_category         on  _analytics_category.strucobjn = stob.strucobjn
                                                                                    and _analytics_category.name      = 'ANALYTICS.DATACATEGORY'
  -- Annotation value 'ANALYTICS.QUERY'
  /*+[hideWarning] { "IDS" : [ "CARDINALITY_CHECK" ] }*/
  association [0..1] to ddheadanno                   as _analytics_query            on  _analytics_query.strucobjn = stob.strucobjn
                                                                                    and _analytics_query.name      = 'ANALYTICS.QUERY'
  -- Annotation value 'ACCESSCONTROL.AUTHORIZATIONCHECK'
  /*+[hideWarning] { "IDS" : [ "CARDINALITY_CHECK" ] }*/
  association [0..1] to ddheadanno                   as _access_control             on  _access_control.strucobjn = stob.strucobjn
                                                                                    and _access_control.name      = 'ACCESSCONTROL.AUTHORIZATIONCHECK'
  -- Annotation value 'OBJECTMODEL.USAGETYPE.DATACLASS'
  /*+[hideWarning] { "IDS" : [ "CARDINALITY_CHECK" ] }*/
  association [0..1] to ddheadanno                   as _usage_type_data_class      on  _usage_type_data_class.strucobjn = stob.strucobjn
                                                                                    and _usage_type_data_class.name      = 'OBJECTMODEL.USAGETYPE.DATACLASS'
  -- Annotation value 'OBJECTMODEL.USAGETYPE.SERVICEQUALITY'
  /*+[hideWarning] { "IDS" : [ "CARDINALITY_CHECK" ] }*/
  association [0..1] to ddheadanno                   as _usage_type_service_qual    on  _usage_type_service_qual.strucobjn = stob.strucobjn
                                                                                    and _usage_type_service_qual.name      = 'OBJECTMODEL.USAGETYPE.SERVICEQUALITY'
  -- Annotation value 'OBJECTMODEL.USAGETYPE.SIZECATEGORY'
  /*+[hideWarning] { "IDS" : [ "CARDINALITY_CHECK" ] }*/
  association [0..1] to ddheadanno                   as _usage_type_size_category   on  _usage_type_size_category.strucobjn = stob.strucobjn
                                                                                    and _usage_type_size_category.name      = 'OBJECTMODEL.USAGETYPE.SIZECATEGORY'
  -- Released objects for key Users (Language Version 2)
  association [0..1] to ARS_APIS_RELEASED_FOR_C0     as _released_for_c0            on  _released_for_c0.object_key  = stob.strucobjn -- Add Custom Fields via Key User App (Contract C0)
                                                                                    and _released_for_c0.object_type = 'CDS_STOB'
  association [0..1] to ARS_APIS_RELEASED_FOR_C1     as _released_for_c1            on  _released_for_c1.object_key  = stob.strucobjn -- Use System-Internally (Contract C1)
                                                                                    and _released_for_c1.object_type = 'CDS_STOB'
  association [0..1] to ARS_APIS_RELEASED_FOR_C2     as _released_for_c2            on  _released_for_c2.object_key  = stob.strucobjn -- Use as Remote API (Contract C2)
                                                                                    and _released_for_c2.object_type = 'CDS_STOB'
  -- Released objects for SAP ABAP Cloud Platform (Language Version 5)
  association [0..1] to ARS_APIS_RELEASED_FOR_C1_SCP as _released_for_c1_scp        on  _released_for_c1_scp.object_key  = stob.strucobjn -- Use System-Internally (Contract C1)
                                                                                    and _released_for_c1_scp.object_type = 'CDS_STOB'
{
      @EndUserText.label: 'Entity Name Upper Case'
  key cast(stob.strucobjn                     as abap.char(30))                                                                                                         as entity_name,
      @EndUserText.label: 'Entity State'
  key cast(stob.as4local                      as abap.char(1))                                                                                                          as state,
      @EndUserText.label: 'Entity Namee Raw'
      cast(stob.strucobjn_raw                 as abap.char(30))                                                                                                         as entity_name_raw,
      @EndUserText.label: 'DDL Name'
      cast(src.ddlname                        as abap.char(40))                                                                                                         as ddl_name,
      @EndUserText.label: 'Source Type'
      cast(src.source_type                    as abap.char(1))                                                                                                          as source_type,
      @EndUserText.label: 'Source Type Text'
      cast(_source_type_text_active.ddtext    as abap.char(60))                                                                                                         as source_type_text,
      @EndUserText.label: 'Language of Source Type Text'
      _source_type_text_active.ddlanguage                                                                                                                               as source_type_text_language,
      @EndUserText.label: 'Source Origin'
      cast(src.source_origin                  as abap.int1)                                                                                                             as source_origin,
      @EndUserText.label: 'ABAP Language Version'
      cast(src.abap_language_version          as abap.char(1))                                                                                                          as abap_langu_version,
      @EndUserText.label: 'ABAP Language Version Text'
      cast(_abap_lang_vers_text_active.ddtext as abap.char(60))                                                                                                         as abap_langu_version_text,
      @EndUserText.label: 'Language of ABAP Language Version Text'
      _abap_lang_vers_text_active.ddlanguage                                                                                                                            as abap_langu_version_text_langu,
      @EndUserText.label: 'Changed By'
      cast(src.as4user                       as abap.char(12))                                                                                                          as changed_by,
      @EndUserText.label: 'Changed On'
      cast(src.as4date                       as abap.dats)                                                                                                              as changed_on,
      @EndUserText.label: 'Changed At'
      cast(src.as4time                       as abap.tims)                                                                                                              as changed_at,
      @EndUserText.label: 'Changed UTC'
      cast(dats_tims_to_tstmp( src.as4date, src.as4time, abap_system_timezone( $session.client,'NULL' ), $session.client, 'NULL' ) as timestamp)                        as changed_utc,
      @EndUserText.label: 'User Description'
      ''                                                                                                                                                                as user_description, --this is temorarily disabled beacsue of bug in client handling
      //      _iuser.UserDescription                                                                                                                     as user_description,

      
      @EndUserText.label: 'Provider Contract'
      cast( case node_info.provider_contract
        when 'TQ' then 'TRANSACTIONAL_QUERY'
        when 'TI' then 'TRANSACTIONAL_INTERFACE'
        when 'AQ' then 'ANALYTICAL_QUERY'
                  else ''
      end as abap.char(30) )                                                                                                                                            as provider_contract,
      
      @EndUserText.label: 'ODATA Published'
      case lower(_odata.value)               when 'true' then 'X' when 'false' then ' ' else '-' end                                                                    as odata_published,
      @EndUserText.label: 'Analytical Query'
      //      case lower(_analytics_query.value)     when 'true' then 'X' when 'false' then ' ' else '-' end                                             as analytical_query,

      //      case when lower(_analytics_query.value) = 'true'  or node_info.provider_contract = 'AQ' then 'X' when lower(_analytics_query.value) = 'false' then ' ' else '-' end as analytical_query,

      case when ( _analytics_query.name  = 'ANALYTICS.QUERY' and lower(_analytics_query.value) <> 'false' ) or node_info.provider_contract = 'AQ' then 'X' else ' ' end as analytical_query,
      @EndUserText.label: 'Analytical Category'
      cast( _analytics_category.value         as abap.char(20) )                                                                                                        as analytical_category,
      @EndUserText.label: 'Access Control Authorization Check'
      cast( _access_control.value             as abap.char(20) )                                                                                                        as access_control_auth_check,
      @EndUserText.label: 'Label Text'
      cast(coalesce( coalesce( _label_text_active.ddtext, _label_text_english.ddtext ), _label_text_original.ddtext ) as abap.char(60))                                 as label_text,
      @EndUserText.label: 'Language of Label Text'
      coalesce( coalesce( _label_text_active.ddlanguage, _label_text_english.ddlanguage ), _label_text_original.ddlanguage )                                            as label_text_language,
      @EndUserText.label: 'Usage Type Data Class'
      cast( _usage_type_data_class.value      as abap.char(30) )                                                                                                        as usage_type_data_class,
      @EndUserText.label: 'Usage Type Service Quality'
      cast( _usage_type_service_qual.value    as abap.char(30) )                                                                                                        as usage_type_service_quality,
      @EndUserText.label: 'Usage Type Size Category'
      cast( _usage_type_size_category.value   as abap.char(30) )                                                                                                        as usage_type_size_category,
      @EndUserText.label: 'C0 Released State'
      _released_for_c0.state                                                                                                                                            as c0_released_state,
      @EndUserText.label: 'C1 Released State'
      _released_for_c1.state                                                                                                                                            as c1_released_state,
      @EndUserText.label: 'C2 Released State'
      _released_for_c2.state                                                                                                                                            as c2_released_state,
      @EndUserText.label: 'C1 Released State(ABAP Cloud Platform)'
      _released_for_c1_scp.state                                                                                                                                        as c1_released_state_scp,
      @EndUserText.label: 'Has Parameters'
      cast( case when node_info.with_parameters = 'X' then 'X' else ' ' end as abap.char(1) )                                                                           as entity_has_parameters,
      @EndUserText.label: 'Client Dependent'
      cast( stob.clidep as abap.char(1) )                                                                                                                               as client_dependent,
      @EndUserText.label: 'Name of Client Element'
      cast( stob.clientfield as abap.char(30) )                                                                                                                         as client_element_name,
      @EndUserText.label: 'Original Language'
      tadir.masterlang                                                                                                                                                  as original_language,
      cast(case when session_var.used_session_vars_1 = 'C' then 'X'
                when session_var.used_session_vars_2 = 'C' then 'X'
                when session_var.used_session_vars_3 = 'C' then 'X'
                when session_var.used_session_vars_4 = 'C' then 'X'
                when session_var.used_session_vars_5 = 'C' then 'X'
                when session_var.used_session_vars_6 = 'C' then 'X'
                else ' '
      end  as abap.char(1) )                                                                                                                                            as session_client_used,
      cast(case when session_var.used_session_vars_1 = 'D' then 'X'
                when session_var.used_session_vars_2 = 'D' then 'X'
                when session_var.used_session_vars_3 = 'D' then 'X'
                when session_var.used_session_vars_4 = 'D' then 'X'
                when session_var.used_session_vars_5 = 'D' then 'X'
                when session_var.used_session_vars_6 = 'D' then 'X'
                else ' '
      end  as abap.char(1) )                                                                                                                                            as session_system_date_used,
      cast(case when session_var.used_session_vars_1 = 'L' then 'X'
                when session_var.used_session_vars_2 = 'L' then 'X'
                when session_var.used_session_vars_3 = 'L' then 'X'
                when session_var.used_session_vars_4 = 'L' then 'X'
                when session_var.used_session_vars_5 = 'L' then 'X'
                when session_var.used_session_vars_6 = 'L' then 'X'
                else ' '
      end  as abap.char(1) )                                                                                                                                            as session_system_language_used,
      cast(case when session_var.used_session_vars_1 = 'U' then 'X'
                when session_var.used_session_vars_2 = 'U' then 'X'
                when session_var.used_session_vars_3 = 'U' then 'X'
                when session_var.used_session_vars_4 = 'U' then 'X'
                when session_var.used_session_vars_5 = 'U' then 'X'
                when session_var.used_session_vars_6 = 'U' then 'X'
                else ' '
      end  as abap.char(1) )                                                                                                                                            as session_user_used,
      cast(case when session_var.used_session_vars_1 = 'A' then 'X'
                when session_var.used_session_vars_2 = 'A' then 'X'
                when session_var.used_session_vars_3 = 'A' then 'X'
                when session_var.used_session_vars_4 = 'A' then 'X'
                when session_var.used_session_vars_5 = 'A' then 'X'
                when session_var.used_session_vars_6 = 'A' then 'X'
                else ' '
      end  as abap.char(1) )                                                                                                                                            as session_user_date_used,
      cast(case when session_var.used_session_vars_1 = 'Z' then 'X'
                when session_var.used_session_vars_2 = 'Z' then 'X'
                when session_var.used_session_vars_3 = 'Z' then 'X'
                when session_var.used_session_vars_4 = 'Z' then 'X'
                when session_var.used_session_vars_5 = 'Z' then 'X'
                when session_var.used_session_vars_6 = 'Z' then 'X'
                else ' '
      end  as abap.char(1) )                                                                                                                                            as session_user_timezone_used,
      cast( node_info.has_select_asterisk as abap.char(1) )                                                                                                             as has_select_asterisk
}
where
  stob.as4local = 'A'