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 Substance
CreationUTCDateTime
CreatedByUser
LastChangeUTCDateTime
LastChangedByUser
ListedSubstanceUUID ehfndv_sub listedsubstanceuuid Listed Substance
SubstanceInternalName ehfndv_sub substanceinternalname Internal Name
ResponsibleUnit ehfndv_sub responsibleunit Responsible Unit
Specification ehfndv_sub specification Specification
SpecificationInternalID ehfndv_sub specificationinternalid Specification
ProdStewardshipRespUnit ehfndv_sub responsibleunit Responsible Unit
DngrsGdsRespUnit
PolymerIsBsdOnOECDDef ehfndv_sub polymerisbsdonoecddef OECD Polymer
_CreatedByUser _CreatedByUser
_LastChangedByUser _LastChangedByUser
_SubstanceText _SubstanceText
_SubstanceTradeSecretText _SubstanceTradeSecretText
_ListedSubstance _ListedSubstance
_RespUnitForProductStewardship _RespUnitForProductStewardship
_RespUnitForDangerousGoods _RespUnitForDangerousGoods
_SubstNameFallbackLanguage _SubstNameFallbackLanguage

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view I_Substance.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.

CREATE VIEW I_Substance AS
SELECT
  Substance.substanceuuid AS SubstanceUUID,
  cast(Substance.creationutcdatetime as ehfnd_bo_crea_date_time preserving type ) AS CreationUTCDateTime,
  cast(Substance.createdbyuser as ehfnd_bo_crea_uname preserving type ) AS CreatedByUser,
  cast(Substance.lastchangeutcdatetime as ehfnd_bo_lchg_date_time preserving type ) AS LastChangeUTCDateTime,
  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,
  Substance.responsibleunit AS ProdStewardshipRespUnit,
  '' AS DngrsGdsRespUnit,
  Substance.polymerisbsdonoecddef AS PolymerIsBsdOnOECDDef
FROM ehfndv_sub AS Substance
LEFT OUTER JOIN I_SubstanceText AS _SubstanceText ON Substance.substanceuuid = _SubstanceText.SubstanceUUID  -- association [0..*]
LEFT OUTER JOIN I_SubstanceTradeSecretText AS _SubstanceTradeSecretText ON Substance.substanceuuid = _SubstanceTradeSecretText.SubstanceUUID  -- association [0..*]
LEFT OUTER JOIN I_SubstActiveDraftLstdSubst AS _ListedSubstance ON Substance.substanceuuid = _ListedSubstance.ActiveSubstanceUUID  -- association [0..1]
LEFT OUTER JOIN I_User AS _CreatedByUser ON CreatedByUser = _CreatedByUser.UserID  -- association [0..1]
LEFT OUTER JOIN I_User AS _LastChangedByUser ON LastChangedByUser = _LastChangedByUser.UserID  -- association [0..1]
LEFT OUTER JOIN I_ResponsibleUnit AS _RespUnitForProductStewardship ON ProdStewardshipRespUnit = _RespUnitForProductStewardship.ResponsibleUnit  -- association [1..1]
LEFT OUTER JOIN I_ResponsibleUnitDngrsGds AS _RespUnitForDangerousGoods ON DngrsGdsRespUnit = _RespUnitForDangerousGoods.ResponsibleUnit  -- association [1..1]
LEFT OUTER JOIN I_SubstNameFallbackLanguage AS _SubstNameFallbackLanguage ON SubstanceUUID = _SubstNameFallbackLanguage.SubstanceUUID  -- association [0..1]
;