P_SubstanceNameText

DDL: P_SUBSTANCENAMETEXT Type: view COMPOSITE Package: EHFND_CNS_SUBSTANCE

Substance Names with Listed Substance Names

P_SubstanceNameText is a Composite CDS View that provides data about "Substance Names with Listed Substance Names" in SAP S/4HANA. It reads from 1 data source (I_Substance) and exposes 7 fields. Part of development package EHFND_CNS_SUBSTANCE.

Data Sources (1)

SourceAliasJoin Type
I_Substance Substance from

Annotations (8)

NameValueLevelField
EndUserText.label Substance Names with Listed Substance Names view
AbapCatalog.sqlViewName PSUBNAMTXT view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #COMPOSITE view
VDM.private true view

Fields (7)

KeyFieldSource TableSource FieldDescription
SubstanceUUID
ResponsibleUnit ResponsibleUnit
ListedSubstanceUUID
SubstanceInternalName
CASNumber
ECNumber
ListedSubstanceasListedSubstance
@EndUserText.label: 'Substance Names with Listed Substance Names'

@AbapCatalog:
{
  sqlViewName: 'PSUBNAMTXT',
  compiler.compareFilter: true,
  preserveKey: true
}

@AccessControl:
{
  authorizationCheck: #NOT_REQUIRED
}

@ClientHandling.algorithm: #SESSION_VARIABLE

@VDM.viewType: #COMPOSITE
@VDM.private: true

define view P_SubstanceNameText
  --Select data from substance
  as select from I_Substance as Substance

{

      --UUID of substance
      @Consumption.semanticObject: 'CompanySubstance'
  key Substance.SubstanceUUID,

      ResponsibleUnit,

      --UUID of listed substance
      Substance.ListedSubstanceUUID,

      --Internal Name of substance (language-independent)
      Substance.SubstanceInternalName,

      --Specification
      --CAS Number
      cast( Substance.Specification as ehfnd_internal_nr_nc ) as Specification,

      --CAS Number
      Substance._ListedSubstance.CASNumber,

      --EC Number
      Substance._ListedSubstance.ECNumber,

      --ListedSubstanceDefaultName
      Substance._ListedSubstance.ListedSubstance              as ListedSubstance,

      //1. specific substance name

      //2. listed substance name

      //3. internal name

      cast (
              coalesce( coalesce( Substance._SubstanceText[1:Language = $session.system_language].SubstanceName,
                                  Substance._ListedSubstance.ListedSubstanceDefaultName ),
                        Substance.SubstanceInternalName )
           as ehfnd_sub_substance_name_ltd )                  as SubstanceName

}