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.
@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: truedefineviewentity C_EHSCompanySubstanceValueHelp
asselectfrom 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(
casewhen _SubstanceText[1:Language = $session.system_language].SubstanceUUID isnotnullthen _SubstanceText[1:Language = $session.system_language].SubstanceName
when _SubstanceText[1:Language = $session.system_language].SubstanceUUID isnulland _ListedSubstance.ListedSubstanceDefaultName isnotnullthen _ListedSubstance.ListedSubstanceDefaultName
else SubstanceInternalName
endas 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
}