C_EHSCompanySubstanceValueHelp

DDL: C_EHSCOMPANYSUBSTANCEVALUEHELP Type: view_entity CONSUMPTION Package: EHENV_CNS_EMISSION_INVENTORY

Company Substance

C_EHSCompanySubstanceValueHelp is a Consumption CDS View that provides data about "Company Substance" in SAP S/4HANA. It reads from 1 data source (I_Substance) and exposes 19 fields with key field SubstanceUUID. Part of development package EHENV_CNS_EMISSION_INVENTORY.

Data Sources (1)

SourceAliasJoin Type
I_Substance I_Substance from

Annotations (10)

NameValueLevelField
AccessControl.authorizationCheck #MANDATORY view
EndUserText.label Company Substance view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.dataCategory #VALUE_HELP view
ObjectModel.representativeKey SubstanceUUID view
VDM.viewType #CONSUMPTION view
Search.searchable true view
Consumption.ranked true view

Fields (19)

KeyFieldSource TableSource FieldDescription
KEY SubstanceUUID SubstanceUUID
ListedSubstanceUUID ListedSubstanceUUID
SubstanceInternalName SubstanceInternalName
CustListedSubstanceDfltName _ListedSubstance CustListedSubstanceDfltName
CntntListedSubstanceDfltName _ListedSubstance CntntListedSubstanceDfltName
CompanySubstanceName
CustListedSubstance _ListedSubstance CustListedSubstance
CntntListedSubstance _ListedSubstance CntntListedSubstance
ECNumber _ListedSubstance ECNumber
CustECNumber _ListedSubstance CustECNumber
CntntECNumber _ListedSubstance CntntECNumber
CASNumber _ListedSubstance CASNumber
CustCASNumber _ListedSubstance CustCASNumber
CntntCASNumber _ListedSubstance CntntCASNumber
CustMolecularFormula _ListedSubstance CustMolecularFormula
CntntMolecularFormula _ListedSubstance CntntMolecularFormula
ResponsibleUnit ResponsibleUnit
Specification
_SubstanceText _SubstanceText
@AccessControl.authorizationCheck: #MANDATORY
@EndUserText.label: 'Company Substance'

@ObjectModel: {
  usageType:{
    serviceQuality: #C,
     dataClass: #MIXED,
     sizeCategory: #L
  },
  dataCategory:#VALUE_HELP,
  representativeKey: 'SubstanceUUID'
}

@VDM.viewType: #CONSUMPTION

@Search.searchable: true
@Consumption.ranked: true

define view entity C_EHSCompanySubstanceValueHelp
  as select from I_Substance
{
      @UI.hidden: true
      @UI.selectionField: [{ exclude: true }]
      @UI.textArrangement: #TEXT_ONLY
      @ObjectModel.text.element: [ 'SubstanceName' ]
      @Consumption.semanticObject: 'SubstanceUUID'
  key SubstanceUUID,

      @UI.hidden: true
      @UI.selectionField: [{ exclude: true }]
      ListedSubstanceUUID,

      @UI: {
        lineItem : [{
           position:   20,
           importance: #HIGH
        }],
        identification : [{
           position:   20,
           importance: #HIGH
        }],
        selectionField: [{position: 20}]
      }
      cast(
           case
              when _SubstanceText[1:Language = $session.system_language].SubstanceUUID is not null
                   then _SubstanceText[1:Language = $session.system_language].SubstanceName
              when _SubstanceText[1:Language = $session.system_language].SubstanceUUID is null and _ListedSubstance.ListedSubstanceDefaultName is not null
                   then _ListedSubstance.ListedSubstanceDefaultName
              else SubstanceInternalName
      end as ehfnd_sub_substance_name_ltd )                               as SubstanceName,

      @UI: {
        lineItem : [{
           position:   30,
           importance: #HIGH
        }],
        identification : [{
           position:   30,
           importance: #HIGH
        }],
        selectionField: [{ position: 30 }]
      }
      @Search: {
        defaultSearchElement: true,
        fuzzinessThreshold:   0.8,
        ranking: #LOW
      }
      SubstanceInternalName,

      // used to search within listed substance names

      // Remark: Do not search on ListedSubstanceDefaultName because it is a calculated field

      @UI.hidden:true
      @Search:
      {
        defaultSearchElement: true,
        fuzzinessThreshold:   0.8,
        ranking: #MEDIUM
      }
      _ListedSubstance.CustListedSubstanceDfltName,

      // used to search within listed substance names

      // Remark: Do not search on ListedSubstanceDefaultName because it is a calculated field

      @UI.hidden:true
      @Search:
      {
        defaultSearchElement: true,
        fuzzinessThreshold:   0.8,
        ranking: #MEDIUM
      }
      _ListedSubstance.CntntListedSubstanceDfltName,

      //used to search within company substance names

      @UI.hidden:true
      @Search:
      {
        defaultSearchElement: true,
        fuzzinessThreshold:   0.8,
        ranking: #HIGH
      }
      _SubstanceText[1:Language = $session.system_language].SubstanceName as CompanySubstanceName,

      // used to search within listed substance names

      // Remark: Do not search on ListedSubstance because it is a calculated field

      @UI.hidden:true
      @Search:
      {
        defaultSearchElement: true,
        fuzzinessThreshold:   0.8,
        ranking: #MEDIUM
      }
      _ListedSubstance.CustListedSubstance,

      // used to search within listed substance names

      // Remark: Do not search on ListedSubstance because it is a calculated field

      @UI.hidden:true
      @Search:
      {
        defaultSearchElement: true,
        fuzzinessThreshold:   0.8,
        ranking: #MEDIUM
      }
      _ListedSubstance.CntntListedSubstance,

      @UI: {
        lineItem: [{
          position:   40,
          importance: #MEDIUM
        }],
        selectionField: [{ position: 40 }]
      }
      _ListedSubstance.ECNumber,

      // used to search for EC number

      // Remark: Do not search on EC Number because it is a calculated field

      @UI.hidden:true
      @Search: {
        defaultSearchElement: true,
        fuzzinessThreshold:   0.9,
        ranking: #MEDIUM
      }
      _ListedSubstance.CustECNumber,

      // used to search for EC number

      // Remark: Do not search on EC Number because it is a calculated field

      @UI.hidden:true
      @Search: {
        defaultSearchElement: true,
        fuzzinessThreshold:   0.9,
        ranking: #MEDIUM
      }
      _ListedSubstance.CntntECNumber,

      @UI: {
        lineItem: [{
          position:   50,
          importance: #MEDIUM
        }],
        selectionField: [{ position: 50 }]
      }
      _ListedSubstance.CASNumber,

      // used to search for EC number

      // Remark: Do not search on CAS Number because it is a calculated field

      @UI.hidden:true
      @Search: {
        defaultSearchElement: true,
        fuzzinessThreshold:   0.9,
        ranking: #MEDIUM
      }
      _ListedSubstance.CustCASNumber,

      // used to search for EC number

      // Remark: Do not search on CAS Number because it is a calculated field

      @UI.hidden:true
      @Search: {
        defaultSearchElement: true,
        fuzzinessThreshold:   0.9,
        ranking: #MEDIUM
      }
      _ListedSubstance.CntntCASNumber,

      // used to search for EC number

      // Remark: Do not search on MolecularFormula because it is a calculated field

      @UI.hidden:true
      @Search: {
        defaultSearchElement: true,
        fuzzinessThreshold:   0.7,
        ranking: #LOW
      }
      _ListedSubstance.CustMolecularFormula,

      // used to search for EC number

      // Remark: Do not search on MolecularFormula because it is a calculated field

      @UI.hidden:true
      @Search: {
        defaultSearchElement: true,
        fuzzinessThreshold:   0.7,
        ranking: #LOW
      }
      _ListedSubstance.CntntMolecularFormula,

      @UI: {
        lineItem: [{
          position:   60,
          importance: #MEDIUM
        }],
        selectionField: [{ position: 60 }]
      }
      @Consumption.valueHelpDefinition: [{
        entity: {
          name: 'I_ResponsibleUnit',
          element: 'ResponsibleUnit'
        }
      }]
      ResponsibleUnit,

      @Search: {
        defaultSearchElement: true,
        fuzzinessThreshold:   0.7,
        ranking: #MEDIUM
      }
      @UI: {
        lineItem : [{
           position:   10,
           importance: #HIGH
        }],
        identification : [{
           position:   10,
           importance: #HIGH
        }],
        selectionField: [{ position: 10 }]
      }
      cast( Specification as ehfnd_internal_nr_nc preserving type )       as Specification,

      _SubstanceText
}