I_SubstanceLstdSubst

DDL: I_SUBSTANCELSTDSUBST Type: view COMPOSITE

Company Substance and related listed sub

I_SubstanceLstdSubst is a Composite CDS View that provides data about "Company Substance and related listed sub" in SAP S/4HANA. It reads from 1 data source (I_Substance) and exposes 14 fields. It has 4 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_Substance Substance from

Associations (4)

CardinalityTargetAliasCondition
[0..1] I_ListedSubstanceCust _LisuCustRoot Substance.ListedSubstanceUUID = _LisuCustRoot.ListedSubstanceUUID
[0..1] I_ListedSubstanceSAP _LisuContRoot Substance.ListedSubstanceUUID = _LisuContRoot.ListedSubstanceUUID
[0..1] I_ListedSubstanceDefNameCust _LisuCustName Substance.ListedSubstanceUUID = _LisuCustName.ListedSubstanceUUID and _LisuCustName.Language = $session.system_language
[0..1] I_ListedSubstanceDefNameSAP _LisuContName Substance.ListedSubstanceUUID = _LisuContName.ListedSubstanceUUID and _LisuContName.Language = $session.system_language

Annotations (11)

NameValueLevelField
EndUserText.label Company Substance and related listed sub view
VDM.viewType #COMPOSITE view
ObjectModel.representativeKey SubstanceUUID view
AccessControl.authorizationCheck #CHECK view
AbapCatalog.sqlViewName ILISULSTDSUB view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #MIXED view

Fields (14)

KeyFieldSource TableSource FieldDescription
SubstanceUUIDasSubstanceUUID
ActiveSubstanceUUID I_Substance ListedSubstanceUUID
ListedSubstanceUUID I_Substance ListedSubstanceUUID
ResponsibleUnit I_Substance ResponsibleUnit
CustListedSubstanceDfltName _LisuCustName ListedSubstanceName
CntntListedSubstanceDfltName _LisuContName ListedSubstanceName
CustListedSubstance _LisuCustRoot ListedSubstance
CntntListedSubstance _LisuContRoot ListedSubstance
CustCASNumber _LisuCustRoot CASNumber
CntntCASNumber _LisuContRoot CASNumber
CustECNumber _LisuCustRoot ECNumber
CntntECNumber _LisuContRoot ECNumber
CustMolecularFormula _LisuCustRoot MolecularFormula
CntntMolecularFormula _LisuContRoot MolecularFormula
@EndUserText.label: 'Company Substance and related listed sub'
@VDM.viewType: #COMPOSITE
@ObjectModel.representativeKey: 'SubstanceUUID'
@AccessControl:
{
  authorizationCheck: #CHECK
}
@AbapCatalog:
{
  sqlViewName: 'ILISULSTDSUB',
  compiler.compareFilter: true,
  preserveKey: true
}

// Client handling by session

@ClientHandling.algorithm: #SESSION_VARIABLE

// used for BOBF Master Data Object

@ObjectModel.usageType:{ serviceQuality: #C,        // < 15 msec

                         sizeCategory:  #L,         // < 10.000.000

                         dataClass: #MIXED }

// Performance-optimized view for listed substance root and name data for a company substance

// The stub for the company substance is needed as as otherwise the filter pushdown to the listed substance views would not work


define view I_SubstanceLstdSubst
  as select from I_Substance as Substance
  association [0..1] to I_ListedSubstanceCust        as _LisuCustRoot on  Substance.ListedSubstanceUUID = _LisuCustRoot.ListedSubstanceUUID
  association [0..1] to I_ListedSubstanceSAP         as _LisuContRoot on  Substance.ListedSubstanceUUID = _LisuContRoot.ListedSubstanceUUID
  association [0..1] to I_ListedSubstanceDefNameCust as _LisuCustName on  Substance.ListedSubstanceUUID = _LisuCustName.ListedSubstanceUUID
                                                                      and _LisuCustName.Language        = $session.system_language
  association [0..1] to I_ListedSubstanceDefNameSAP  as _LisuContName on  Substance.ListedSubstanceUUID = _LisuContName.ListedSubstanceUUID
                                                                      and _LisuContName.Language        = $session.system_language
{
      ----UUID of active or draft substance
  key Substance.SubstanceUUID                                     as SubstanceUUID,
      Substance.ListedSubstanceUUID                               as ActiveSubstanceUUID, // due to compatibility reasons this attribute must be kept

      Substance.ListedSubstanceUUID                               as ListedSubstanceUUID,
      Substance.ResponsibleUnit                                   as ResponsibleUnit, //needed for DCL


      _LisuCustName.ListedSubstanceName                           as CustListedSubstanceDfltName,
      _LisuContName.ListedSubstanceName                           as CntntListedSubstanceDfltName,
      coalesce(
                _LisuCustName.ListedSubstanceName,
                _LisuContName.ListedSubstanceName
              )                                                   as ListedSubstanceDefaultName,

      _LisuCustRoot.ListedSubstance                               as CustListedSubstance,
      _LisuContRoot.ListedSubstance                               as CntntListedSubstance,
      cast( coalesce(
                      _LisuCustRoot.ListedSubstance,
                      _LisuContRoot.ListedSubstance
                    ) as ehfnd_regbaslst_sub preserving type )    as ListedSubstance,

      _LisuCustRoot.CASNumber                                     as CustCASNumber,
      _LisuContRoot.CASNumber                                     as CntntCASNumber,
      cast( coalesce(
                      _LisuCustRoot.CASNumber,
                      _LisuContRoot.CASNumber
                    ) as ehfnd_chm_cas_no preserving type )       as CASNumber,

      _LisuCustRoot.ECNumber                                      as CustECNumber,
      _LisuContRoot.ECNumber                                      as CntntECNumber,
      cast( coalesce(
                      _LisuCustRoot.ECNumber,
                      _LisuContRoot.ECNumber
                    )  as ehfnd_chm_lisu_ec_number preserving type )  as ECNumber,

      _LisuCustRoot.MolecularFormula                              as CustMolecularFormula,
      _LisuContRoot.MolecularFormula                              as CntntMolecularFormula,
      cast( coalesce(
                      _LisuCustRoot.MolecularFormula,
                      _LisuContRoot.MolecularFormula
                    ) as ehfnd_lisu_mol_formula preserving type ) as MolecularFormula

//      cast( coalesce(

//                      _LisuCustRoot.CreationDateTime,

//                      _LisuContRoot.CreationDateTime

//                    ) as timestamp preserving type )              as CreationDateTime


}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_LISTEDSUBSTANCECUST",
"I_LISTEDSUBSTANCEDEFNAMECUST",
"I_LISTEDSUBSTANCEDEFNAMESAP",
"I_LISTEDSUBSTANCESAP",
"I_SUBSTANCE"
],
"ASSOCIATED":
[
"I_LISTEDSUBSTANCECUST",
"I_LISTEDSUBSTANCEDEFNAMECUST",
"I_LISTEDSUBSTANCEDEFNAMESAP",
"I_LISTEDSUBSTANCESAP"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/