Loading

CDS标准视图:设备描述 I_EquipmentText

  • 视图名称: I_EquipmentText
  • 视图类型:基础视图
  • 视图代码:
点击查看代码
@EndUserText.label: 'Equipment - Text'
@ObjectModel.dataCategory: #TEXT
@VDM.viewType: #BASIC
@AbapCatalog: { sqlViewName: 'IEQUIPMENTTEXT', compiler.compareFilter, preserveKey }
@AccessControl.authorizationCheck:#CHECK
@ObjectModel.representativeKey: 'Equipment'

@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.dataClass: #MASTER
@ObjectModel.usageType.serviceQuality: #A
@ObjectModel.usageType.sizeCategory: #L
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.supportedCapabilities: [#LANGUAGE_DEPENDENT_TEXT, #SQL_DATA_SOURCE, #CDS_MODELING_DATA_SOURCE, #CDS_MODELING_ASSOCIATION_TARGET]
@Analytics: {
    dataExtraction: {
        enabled: true,
        delta.changeDataCapture.automatic
    }
}

define view I_EquipmentText
  as select from eqkt // EQKT = Equipment Short Texts
  association [0..1] to I_Equipment as _Equipment on _Equipment.Equipment = $projection.Equipment
  association [0..1] to I_Language  as _Language  on _Language.Language = $projection.Language
  -- Extensions, do not expose as association:
  association [0..1] to E_Equipment as _EquipmentExtension on _EquipmentExtension.Equipment = $projection.Equipment
{
      @ObjectModel.foreignKey.association: '_Equipment'
  key eqkt.equnr as Equipment,

      @ObjectModel.foreignKey.association: '_Language'
      @Semantics.language: true
  key eqkt.spras as Language,

      @Semantics.text: true
      @EndUserText.label: 'Description'
      eqkt.eqktx as EquipmentName,

      eqkt.txasp as IsPrimaryLanguage,

      eqkt.kzltx as EquipmentHasLongText,

      @Semantics.systemDateTime.lastChangedAt: true
      eqkt.textchangeddatetime as LastChangeDateTime,

      @Semantics.businessDate.from: true
      _Equipment.CreationDate as ValidityStartDate,

      @Semantics.businessDate.to: true
       cast( '99991231' as datbi ) as ValidityEndDate,


      // Propagate association
      _Equipment,
      _Language
}
  • 事务代码:IE03/IH08

  • 视图结构:

字段名称 设备名称
设备 EQUIPMENT
语言 LANGUAGE
描述 EQUIPMENTNAME
主要语言 ISPRIMARYLANGUAGE
长文本 EQUIPMENTHASLONGTEXT
时戳 LASTCHANGEDATETIME
创建日期 VALIDITYSTARTDATE
有效期至 VALIDITYENDDATE

posted @ 2024-12-27 14:06  观兴  阅读(1)  评论(0编辑  收藏  举报