DBC2ABAP_CDS_VIEW_ELEMENTS

DDL: DBC2ABAP_CDS_VIEW_ELEMENTS Type: view_entity Package: SABP_DBC2ABAP_RUNTIME

CDS Entities in SQL1 Service Bindings

DBC2ABAP_CDS_VIEW_ELEMENTS is a CDS View that provides data about "CDS Entities in SQL1 Service Bindings" in SAP S/4HANA. It reads from 4 data sources (DDCDS_ENTITY_ELEMENTS_INTERN, dd02b, sql1_head, E_SRVD_RT_ENTITIES) and exposes 4 fields with key field element_name. Part of development package SABP_DBC2ABAP_RUNTIME.

Data Sources (4)

SourceAliasJoin Type
DDCDS_ENTITY_ELEMENTS_INTERN elem inner
dd02b enti inner
sql1_head sql1 from
E_SRVD_RT_ENTITIES srvd inner

Annotations (6)

NameValueLevelField
AccessControl.authorizationCheck #NOT_ALLOWED view
EndUserText.label CDS Entities in SQL1 Service Bindings view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #S view
ObjectModel.usageType.dataClass #MIXED view

Fields (4)

KeyFieldSource TableSource FieldDescription
KEY element_name DDCDS_ENTITY_ELEMENTS_INTERN element_name
is_key DDCDS_ENTITY_ELEMENTS_INTERN is_key
ddic_type DDCDS_ENTITY_ELEMENTS_INTERN data_type_d
ddic_length DDCDS_ENTITY_ELEMENTS_INTERN length
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_ALLOWED
@EndUserText.label: 'CDS Entities in SQL1 Service Bindings'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
  serviceQuality: #X,
  sizeCategory: #S,
  dataClass: #MIXED
}
define view entity DBC2ABAP_CDS_VIEW_ELEMENTS
  as select from sql1_head                    as sql1
    inner join   E_SRVD_RT_ENTITIES           as srvd on  srvd.service               = sql1.service_def_name
                                                      and srvd.exposed_artifact_type = 'E'
    inner join   DDCDS_ENTITY_ELEMENTS_INTERN as elem on  elem.entity_name  = srvd.exposed_artifact
                                                      and elem.entity_state = 'A'
    inner join   dd02b                        as enti on  enti.strucobjn     = srvd.exposed_artifact
                                                      and enti.as4local      = 'A'
                                                      and enti.strucobjclass = 'VIEWENTITY'
{
  key sql1.sql1_name                        as sql_service_name,
  key case when srvd.exposed_alias = ' '
       then srvd.exposed_artifact
       else srvd.exposed_alias end          as external_entity_name,
  key elem.element_name                     as element_name,
      srvd.exposed_artifact                 as internal_entity_name,
      sql1.sql1_name_raw                    as sql_service_name_raw,
      case when srvd.exposed_alias_raw = ' '
       then elem.entity_name_raw
       else srvd.exposed_alias_raw end      as external_entity_name_raw,
      elem.element_name_raw                 as element_name_raw,
      elem.element_position                 as element_position,
      elem.is_key                           as is_key,
      elem.data_type_d                      as ddic_type,
      elem.length                           as ddic_length,
      elem.decimals                         as ddic_decimals,
      coalesce( elem.direct_element_label,
                elem.data_element_label_m ) as ddic_label,
      cast( case
              when elem.is_key  = 'X' then 0 
              else 2 end as sql1_nullable ) as nullable
}
where
      sql1.state     =  'A'
  and sql1.sql1_name <> 'S_PRIVILEGED'