@EndUserText.label: 'Substance Indicated as CBI Registration'
@AbapCatalog.sqlViewName: 'CCRRTSRSUBVH'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #MANDATORY
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.viewType: #CONSUMPTION
@ObjectModel.usageType: {
serviceQuality: #C,
dataClass: #MIXED,
sizeCategory: #L
}
@ObjectModel.semanticKey: [ 'SubstanceName' ]
@ObjectModel.representativeKey: 'SubstanceUUID'
@ObjectModel.dataCategory: #VALUE_HELP
@Metadata.ignorePropagatedAnnotations: true
@UI:
{
presentationVariant:
{
requestAtLeast: [ 'SubstanceUUID', 'SubstanceName', 'ChmlCompReldQtyAsText', 'ChmlCompReldQtyUnitText', 'ChmlCompReldLowrLimitQtyOptr',
'ChmlCompReldLowrLimitQtyAsText', 'ChmlCompReldUprLimitQtyOptr', 'ChmlCompReldUprLimitQtyAsText' ]
}
}
@Search.searchable: true
/*----------------------------------------------------------------------------------------------------------------------
Value Help view to find and assign produced substances that are not already used in the (draft) composition
------------------------------------------------------------------------------------------------------------------------*/
define view C_CmplRqRsltTradeSecretSubstVH
with parameters
P_CmplRqRsltUUID : sysuuid_x
as select from I_ChmlComponent as _ChmlComponent
inner join I_CmplRqRsltTrdScrtRegnDraft as _CmplRqRsltTrdScrtRegnDraft on _CmplRqRsltTrdScrtRegnDraft.CmplRqRsltUUID = $parameters.P_CmplRqRsltUUID
inner join I_ChmlComposition as _ChmlComposition on _ChmlComposition.ChmlCompositionType = _CmplRqRsltTrdScrtRegnDraft.ChmlCompositionType
and _ChmlComposition.ChmlCompositionUUID = _ChmlComponent.ChmlCompositionUUID
and _ChmlComposition.ChmlCompositionStatus = 'RE'
and _CmplRqRsltTrdScrtRegnDraft.ChmlCmplncInfoUUID = _ChmlComposition.ChmlCmplncInfoUUID
--Join data of draft components of substance-based composition that are already assigned
left outer to one join I_CmplRqRsltTrdScrtSubstDraft as _CmplRqRsltTrdScrtRegnSubstD on _CmplRqRsltTrdScrtRegnSubstD.SubstanceUUID = _ChmlComponent.SubstanceUUID
and _CmplRqRsltTrdScrtRegnSubstD.CmplRqRsltUUID = _CmplRqRsltTrdScrtRegnDraft.CmplRqRsltUUID
association [0..1] to I_SubstanceTP as _Substance on _ChmlComponent.SubstanceUUID = _Substance.SubstanceUUID
-- Unit Of Measure Value Help
association [0..*] to I_UnitOfMeasureText as _UnitOfMeasureText on $projection.ChmlCompReldQtyUnit = _UnitOfMeasureText.UnitOfMeasure
--Link to 'Chemcial Compliance Info' as root
association [1..1] to I_ChmlCmplncInfo as _ChmlCmplncInfo on $projection.ChmlCmplncInfoUUID = _ChmlCmplncInfo.ChmlCmplncInfoUUID
{
@UI.hidden: true
key $parameters.P_CmplRqRsltUUID as CmplRqRsltUUID,
@UI.hidden: true
@UI.selectionField.exclude: true
@Consumption.semanticObject: 'SubstanceUUID'
key _ChmlComponent.SubstanceUUID as SubstanceUUID,
@UI: {
lineItem : {
position: 10,
importance: #HIGH
}
}
_Substance.SubstanceName as SubstanceName,
@Search: {
defaultSearchElement: true,
fuzzinessThreshold: 0.8,
ranking: #LOW
}
_Substance.SubstanceInternalName as SubstanceInternalName,
//used to search within company substance names
@UI.hidden:true
@Search:
{
defaultSearchElement: true,
fuzzinessThreshold: 0.8,
ranking: #HIGH
}
_Substance.CompanySubstanceName as CompanySubstanceName,
-- ECNumber
_Substance._ListedSubstance.ECNumber as ECNumber,
@UI: {
lineItem: {
position: 20,
importance: #MEDIUM
}
}
_Substance._ListedSubstance.CASNumber as CASNumber,
@UI.hidden: true
_Substance.ResponsibleUnit as ResponsibleUnit,
--Role of Ingredient
@ObjectModel.text.element: [ 'ChmlCompTypeName' ]
@UI.lineItem: [{ position: 30, importance: #MEDIUM }]
@UI.textArrangement: #TEXT_ONLY
_ChmlComponent.ChmlCompType as ChmlCompType,
--Description of Component Type
@Semantics.text: true
_ChmlComponent._ComponentType._Text[1: Language = $session.system_language ].ChmlCompTypeName as ChmlCompTypeName,
--Concentration
_ChmlComponent.ChmlCompQtyAsText as ChmlCompReldQtyAsText,
--Concentration Range
_ChmlComponent.ChmlCompOperatorLowerLimit as ChmlCompReldLowrLimitQtyOptr,
_ChmlComponent.ChmlCompQtyLowerLimitAsText as ChmlCompReldLowrLimitQtyAsText,
_ChmlComponent.ChmlCompOperatorUpperLimit as ChmlCompReldUprLimitQtyOptr,
_ChmlComponent.ChmlCompQtyUpperLimitAsText as ChmlCompReldUprLimitQtyAsText,
-- UoM Code (e.g. PPM)
@ObjectModel.text.element: ['ChmlCompReldQtyUnitText']
@ObjectModel.mandatory: true
_ChmlComponent.ChmlCompQtyUnit as ChmlCompReldQtyUnit,
-- UoM Short Text (e.g. ppm)
@Semantics.text: true
@ObjectModel.readOnly: true
_UnitOfMeasureText[1: Language = $session.system_language ].UnitOfMeasureName as ChmlCompReldQtyUnitText,
@UI.hidden: true
_ChmlComposition.ChmlCmplncInfoUUID,
_Substance,
_ChmlCmplncInfo
}
where --Select components which are not already assigned
_CmplRqRsltTrdScrtRegnSubstD.CmplRqRsltUUID is null
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CHMLCOMPONENT",
"I_CHMLCOMPOSITION",
"I_CHMLCOMPTYPE",
"I_CHMLCOMPTYPETEXT",
"I_CMPLRQRSLTTRDSCRTREGNDRAFT",
"I_CMPLRQRSLTTRDSCRTSUBSTDRAFT",
"I_SUBSTACTIVEDRAFTLSTDSUBST",
"I_SUBSTANCETP",
"I_UNITOFMEASURETEXT"
],
"ASSOCIATED":
[
"I_CHMLCMPLNCINFO",
"I_SUBSTANCETP",
"I_UNITOFMEASURETEXT"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/