I_Substance

DDL: I_SUBSTANCE Type: view BASIC

Substance

I_Substance is a Basic CDS View that provides data about "Substance" in SAP S/4HANA. It reads from 1 data source (ehfndv_sub) and exposes 21 fields with key field SubstanceUUID. It has 8 associations to related views.

Data Sources (1)

SourceAliasJoin Type
ehfndv_sub Substance from

Associations (8)

CardinalityTargetAliasCondition
[0..*] I_SubstanceText _SubstanceText Substance.substanceuuid = _SubstanceText.SubstanceUUID
[0..*] I_SubstanceTradeSecretText _SubstanceTradeSecretText Substance.substanceuuid = _SubstanceTradeSecretText.SubstanceUUID -- Listed substance information -- Remark: Substance.substanceuuid is the active UUID => use _ListedSubstance.ActiveSubstanceUUID. If not no listed substance information is shown for draft
[0..1] I_SubstActiveDraftLstdSubst _ListedSubstance Substance.substanceuuid = _ListedSubstance.ActiveSubstanceUUID -- Admin data - Created by
[0..1] I_User _CreatedByUser $projection.CreatedByUser = _CreatedByUser.UserID -- Admin data - Last changed by
[0..1] I_User _LastChangedByUser $projection.LastChangedByUser = _LastChangedByUser.UserID
[1..1] I_ResponsibleUnit _RespUnitForProductStewardship $projection.ProdStewardshipRespUnit = _RespUnitForProductStewardship.ResponsibleUnit
[1..1] I_ResponsibleUnitDngrsGds _RespUnitForDangerousGoods $projection.DngrsGdsRespUnit = _RespUnitForDangerousGoods.ResponsibleUnit
[0..1] I_SubstNameFallbackLanguage _SubstNameFallbackLanguage $projection.SubstanceUUID = _SubstNameFallbackLanguage.SubstanceUUID

Annotations (11)

NameValueLevelField
EndUserText.label Substance view
VDM.viewType #BASIC view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.sqlViewName ISUB view
AbapCatalog.compiler.compareFilter true view
ObjectModel.representativeKey SubstanceUUID view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.dataClass #MASTER view
ObjectModel.usageType.sizeCategory #M view

Fields (21)

KeyFieldSource TableSource FieldDescription
KEY SubstanceUUID ehfndv_sub substanceuuid
CreationUTCDateTime
CreatedByUser
LastChangeUTCDateTime
LastChangedByUser
ListedSubstanceUUID ehfndv_sub listedsubstanceuuid
SubstanceInternalName ehfndv_sub substanceinternalname
ResponsibleUnit ehfndv_sub responsibleunit
Specification ehfndv_sub specification
SpecificationInternalID ehfndv_sub specificationinternalid
ProdStewardshipRespUnit ehfndv_sub responsibleunit
DngrsGdsRespUnit
PolymerIsBsdOnOECDDef ehfndv_sub polymerisbsdonoecddef
_CreatedByUser _CreatedByUser
_LastChangedByUser _LastChangedByUser
_SubstanceText _SubstanceText
_SubstanceTradeSecretText _SubstanceTradeSecretText
_ListedSubstance _ListedSubstance
_RespUnitForProductStewardship _RespUnitForProductStewardship
_RespUnitForDangerousGoods _RespUnitForDangerousGoods
_SubstNameFallbackLanguage _SubstNameFallbackLanguage
@EndUserText.label: 'Substance'
@VDM.viewType: #BASIC
@AbapCatalog.preserveKey:true

@AccessControl:
{
  authorizationCheck: #CHECK,
  privilegedAssociations:  [ '_CreatedByUser', '_LastChangedByUser' ]
}

@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog: {
  sqlViewName:            'ISUB',
  compiler.compareFilter: true
}
@ObjectModel: {
  representativeKey: 'SubstanceUUID',
  usageType: {
    serviceQuality: #C,
    dataClass:      #MASTER,
    sizeCategory:   #M
  }
}
define view I_Substance
  as select from ehfndv_sub as Substance

  -- Company-specific names
  association [0..*] to I_SubstanceText             as _SubstanceText                 on Substance.substanceuuid = _SubstanceText.SubstanceUUID

  association [0..*] to I_SubstanceTradeSecretText  as _SubstanceTradeSecretText      on Substance.substanceuuid = _SubstanceTradeSecretText.SubstanceUUID

  -- Listed substance information
  -- Remark: Substance.substanceuuid is the active UUID => use _ListedSubstance.ActiveSubstanceUUID. If not no listed substance information is shown for draft
  association [0..1] to I_SubstActiveDraftLstdSubst as _ListedSubstance               on Substance.substanceuuid = _ListedSubstance.ActiveSubstanceUUID

  -- Admin data - Created by
  association [0..1] to I_User                      as _CreatedByUser                 on $projection.CreatedByUser = _CreatedByUser.UserID

  -- Admin data - Last changed by
  association [0..1] to I_User                      as _LastChangedByUser             on $projection.LastChangedByUser = _LastChangedByUser.UserID

  // Due to performance reasons for Tox, Ecotox, etc.

  association [1..1] to I_ResponsibleUnit           as _RespUnitForProductStewardship on $projection.ProdStewardshipRespUnit = _RespUnitForProductStewardship.ResponsibleUnit
  association [1..1] to I_ResponsibleUnitDngrsGds   as _RespUnitForDangerousGoods     on $projection.DngrsGdsRespUnit = _RespUnitForDangerousGoods.ResponsibleUnit
  association [0..1] to I_SubstNameFallbackLanguage as _SubstNameFallbackLanguage     on $projection.SubstanceUUID = _SubstNameFallbackLanguage.SubstanceUUID

{
  key Substance.substanceuuid                                                           as SubstanceUUID,

      @Semantics.systemDateTime.createdAt: true
      cast(Substance.creationutcdatetime as ehfnd_bo_crea_date_time preserving type )   as CreationUTCDateTime,
      @Semantics.user.createdBy: true
      cast(Substance.createdbyuser as ehfnd_bo_crea_uname preserving type )             as CreatedByUser,
      @Semantics.systemDateTime.lastChangedAt: true
      cast(Substance.lastchangeutcdatetime as ehfnd_bo_lchg_date_time preserving type ) as LastChangeUTCDateTime,
      @Semantics.user.lastChangedBy: true
      cast(Substance.lastchangedbyuser as ehfnd_bo_lchg_uname preserving type )         as LastChangedByUser,

      Substance.listedsubstanceuuid                                                     as ListedSubstanceUUID,
      Substance.substanceinternalname                                                   as SubstanceInternalName,

      Substance.responsibleunit                                                         as ResponsibleUnit,

      Substance.specification                                                           as Specification,
      Substance.specificationinternalid                                                 as SpecificationInternalID,

      @ObjectModel.foreignKey.association: '_RespUnitForProductStewardship'
      Substance.responsibleunit                                                         as ProdStewardshipRespUnit,

      @ObjectModel.foreignKey.association: '_RespUnitForDangerousGoods'
      ''                                                                                as DngrsGdsRespUnit,
      Substance.polymerisbsdonoecddef                                                   as PolymerIsBsdOnOECDDef,

      //exposed associations

      _CreatedByUser,
      _LastChangedByUser,
      _SubstanceText,
      _SubstanceTradeSecretText,
      _ListedSubstance,
      _RespUnitForProductStewardship,
      _RespUnitForDangerousGoods,
      _SubstNameFallbackLanguage
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"EHFNDV_SUB"
],
"ASSOCIATED":
[
"I_RESPONSIBLEUNIT",
"I_RESPONSIBLEUNITDNGRSGDS",
"I_SUBSTACTIVEDRAFTLSTDSUBST",
"I_SUBSTANCETEXT",
"I_SUBSTANCETRADESECRETTEXT",
"I_SUBSTNAMEFALLBACKLANGUAGE",
"I_USER"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/