@EndUserText.label: 'Substances in Aft Prod Comp of MbC'
@AbapCatalog:
{
sqlViewName: 'MBCREMCOMPSUBVH',
compiler.compareFilter: true,
preserveKey: true
}
@AccessControl:
{
authorizationCheck: #MANDATORY,
// blocking of personal data not required (no personal data fields exposed for material)
personalData.blocking: #NOT_REQUIRED
}
@VDM.viewType: #CONSUMPTION
@ObjectModel:
{
dataCategory: #VALUE_HELP,
usageType:
{
dataClass: #MIXED,
sizeCategory: #L,
serviceQuality: #C
},
representativeKey: 'ChmlCompUUID',
semanticKey: ['SubstanceName']
}
@Metadata.ignorePropagatedAnnotations: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@UI:{
presentationVariant: [{
sortOrder: [{ by: 'SubstanceName', direction: #ASC }],
requestAtLeast: ['SubstanceUUID',
'ChmlCmplncInfoCombinedName',
'Material',
'SubstanceName',
'CASNumber',
'ChmlCompQtyAsText',
'ChmlCompQtyUnit',
'ChmlCompOperatorLowerLimit',
'ChmlCompQtyLowerLimitAsText',
'ChmlCompOperatorUpperLimit',
'ChmlCompQtyUpperLimitAsText'
]
}]
}
@Search.searchable: true
/*
* This view is used in the object page of the material based composition
* to diplay all CCIs with type = 'Bulk' and role 'Produced' or 'Sourced'
* in a value help
*/
define view C_MatlBsdSubstInRmngCompVH
with parameters
P_ChmlCompositionUUID : sysuuid_x
-- select Raw Material
as select from I_ChmlComponent as ChmlComponent
inner join I_MatlBsdAfterProdnCompDraft as _AfterProdnComp on ChmlComponent.ChmlCmplncInfoUUID = _AfterProdnComp.CompChmlCmplncInfoUUID
inner join I_ChmlComposition as _ChemicalComposition on ChmlComponent.ChmlCompositionUUID = _ChemicalComposition.ChmlCompositionUUID
and _ChemicalComposition.ChmlCompositionType = 'ANALYTIC1'
and _ChemicalComposition.ChmlCompositionStatus = 'RE'
--------------------------------------------------------------------------------------------------------------------
--Nodes/Detaildata
--------------------------------------------------------------------------------------------------------------------
association [0..1] to C_ChmlCmplncPrimMatl as _PrimaryMaterial on ChmlComponent.ChmlCmplncInfoUUID = _PrimaryMaterial.ChmlCmplncInfoUUID
--Substance
association [0..1] to I_SubstanceTP as _Substance on ChmlComponent.SubstanceUUID = _Substance.SubstanceUUID
{
key ChmlComponent.ChmlCompUUID,
ChmlComponent.ChmlCompositionUUID,
ChmlComponent.ChmlCmplncInfoUUID,
-- MatlBsdComp of Root
_AfterProdnComp.ChmlCompositionUUID as MatlBsdCompUUID,
-- Preferred Material of Component
@ObjectModel.readOnly: true
@ObjectModel.text.element: ['ChmlCmplncInfoCombinedName']
@Semantics.text:true
cast( _PrimaryMaterial.Material as matnr preserving type) as Material,
-- Combined component name
@ObjectModel.readOnly: true
@Semantics.text: true
@Search: {
defaultSearchElement: true,
fuzzinessThreshold: 0.8,
ranking: #HIGH
}
cast(_PrimaryMaterial.ChmlCmplncInfoCombinedName as ehfnd_cci_component_name preserving type ) as ChmlCmplncInfoCombinedName,
ChmlComponent.SubstanceUUID,
_Substance.SubstanceName,
@UI: {
lineItem: [{
position: 20 ,
importance: #MEDIUM
}]
}
_Substance._ListedSubstance.CASNumber,
@Semantics.quantity.unitOfMeasure: 'ChmlCompQtyUnit'
ChmlComponent.ChmlCompQty,
ChmlComponent.ChmlCompQtyAsText,
ChmlComponent.ChmlCompQtyUnit,
ChmlComponent.ChmlCompOperatorLowerLimit,
@Semantics.quantity.unitOfMeasure: 'ChmlCompQtyUnit'
ChmlComponent.ChmlCompQtyLowerLimit,
ChmlComponent.ChmlCompQtyLowerLimitAsText,
ChmlComponent.ChmlCompOperatorUpperLimit,
@Semantics.quantity.unitOfMeasure: 'ChmlCompQtyUnit'
ChmlComponent.ChmlCompQtyUpperLimit,
ChmlComponent.ChmlCompQtyUpperLimitAsText,
// @ObjectModel.readOnly: true
// @ObjectModel.virtualElement
// @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHFND_MCMPS_APC_SUB_AC_EXIT'
// cast( 0 as ehfnd_cci_ccomp_qty_ch ) as ChmlCompAbsQtyAsText,
@UI.hidden: true
_Substance.ResponsibleUnit as ResponsibleUnit,
/* Associations */
_PrimaryMaterial,
_Substance
}
where
_AfterProdnComp.ChmlCompositionUUID = $parameters.P_ChmlCompositionUUID
and _AfterProdnComp.ChmlCompIsRemoved <> 'X'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"C_CHMLCMPLNCPRIMMATL",
"I_CHMLCOMPONENT",
"I_CHMLCOMPOSITION",
"I_MATLBSDAFTERPRODNCOMPDRAFT",
"I_SUBSTACTIVEDRAFTLSTDSUBST",
"I_SUBSTANCETP"
],
"ASSOCIATED":
[
"C_CHMLCMPLNCPRIMMATL",
"I_SUBSTANCETP"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/