@EndUserText.label: 'HSI: Items Consumption View'
@AbapCatalog:
{
sqlViewName: 'CHASSUBINVPROP',
compiler.compareFilter: true,
preserveKey: true
}
@AccessControl: { authorizationCheck: #CHECK,
personalData.blocking: #NOT_REQUIRED }
@VDM.viewType: #CONSUMPTION
@ClientHandling.algorithm: #SESSION_VARIABLE
@DataAging.noAgingRestriction:true
@ObjectModel:
{
createEnabled: true,
updateEnabled: true,
deleteEnabled: true,
representativeKey: 'HzdsSubstInventoryUUID',
semanticKey: [ 'ChemicalUUID' ],
usageType:
{
dataClass: #MIXED,
sizeCategory: #XXL,
serviceQuality: #D
}
}
@Search.searchable : true
@Metadata: { ignorePropagatedAnnotations: false,
allowExtensions:true }
define view C_HzdsSubstInvtrySubstProposal
with parameters
P_StartDate : budat,
P_EndDate : budat
as select from P_HzdsSubstInvtrySubstProposal( P_StartDate : $parameters.P_StartDate, P_EndDate : $parameters.P_EndDate ) as _HzdsSubstInvtrySubstProposal
// as select from ZJB_C_HSIUsedChemicals2 as _HzdsSubstInvtrySubstProposal
inner join I_HzdsSubstInventoryDraft as _HzdsSubstInventory on _HzdsSubstInvtrySubstProposal.HzdsSubstInventoryUUID = _HzdsSubstInventory.HzdsSubstInventoryUUID
left outer to one join I_HzdsSubstInventoryItemDraft as _HzdsSubstInventoryItem on _HzdsSubstInvtrySubstProposal.HzdsSubstInventoryUUID = _HzdsSubstInventoryItem.HzdsSubstInventoryUUID
and _HzdsSubstInvtrySubstProposal.ChemicalUUID = _HzdsSubstInventoryItem.ChemicalUUID
association [0..1] to I_Chemical as _Chemical on _HzdsSubstInvtrySubstProposal.ChemicalUUID = _Chemical.ChemicalUUID
and _Chemical.RevisionStartDate <= $session.system_date
and _Chemical.RevisionEndDate >= $session.system_date
association [1..1] to I_EHSLocation as _EHSLocation on _HzdsSubstInventory.EHSLocationUUID = _EHSLocation.EHSLocationUUID
and _EHSLocation.RevisionStartDate <= $session.system_date
and _EHSLocation.RevisionEndDate > $session.system_date
association [0..*] to I_ChemicalNameText as _ChemicalNameText on $projection.ChemicalUUID = _ChemicalNameText.ChemicalUUID
and $projection.chemicalrevisionuuid = _ChemicalNameText.ChemicalRevisionUUID
// association [0..*] to I_UnitOfMeasureText as _SubstYearlyTonnageQtyUnitText on $projection.SubstYearlyTonnageQtyUnit = _SubstYearlyTonnageQtyUnitText.UnitOfMeasure
// association [0..*] to I_UnitOfMeasureText as _SubstHoldupQtyUnitText on $projection.SubstYearlyTonnageQtyUnit = _SubstHoldupQtyUnitText.UnitOfMeasure
{
@ObjectModel: { readOnly: true,
filter.enabled: false,
sort.enabled: false }
key _HzdsSubstInvtrySubstProposal.HzdsSubstInventoryUUID,
@Consumption.valueHelpDefinition: [{
entity: { name: 'C_ChemicalSearchVH',
element: 'ChemicalUUID' },
additionalBinding: [{ element : 'NameOfChemical' ,
localElement : 'NameOfChemical' }],
label: 'Chemical UUID'
}]
@ObjectModel: { text: { association: '_ChemicalNameText',
control: #ASSOCIATED_TEXT_UI_HIDDEN },
filter.enabled: false,
sort.enabled: false }
key _HzdsSubstInvtrySubstProposal.ChemicalUUID,
@ObjectModel: { filter.enabled: false,
sort.enabled: false }
'' as HzdsSubstInventoryItemUUID,
@ObjectModel: { readOnly: true,
filter.enabled: false,
sort.enabled: false }
_Chemical.ChemicalRevisionUUID,
@ObjectModel: { readOnly: true,
filter.enabled: true,
sort.enabled: true }
@Search: { defaultSearchElement: true,
ranking: #MEDIUM,
fuzzinessThreshold: 0.7 }
_Chemical._ChemicalRoot.ChemicalID,
@ObjectModel: { readOnly: true,
filter.enabled: false,
sort.enabled: true }
@Search: { defaultSearchElement: true,
ranking: #MEDIUM,
fuzzinessThreshold: 0.7 }
@EndUserText.label: 'Created On'
_HzdsSubstInvtrySubstProposal.CreationDateTime,
@ObjectModel: { readOnly: true,
filter.enabled: false,
sort.enabled: false }
@Search: { defaultSearchElement: true,
ranking: #MEDIUM,
fuzzinessThreshold: 0.7 }
@EndUserText.label: 'Last Movement'
_HzdsSubstInvtrySubstProposal.LastGoodsMovementPostingDate,
@ObjectModel: { readOnly: true,
filter.enabled: true,
sort.enabled: true }
@Search: { defaultSearchElement: true,
ranking: #MEDIUM,
fuzzinessThreshold: 0.7 }
_Chemical._ChemicalBasicInfo.CASNumber as CASNumber,
@Search: { defaultSearchElement: true,
ranking: #HIGH,
fuzzinessThreshold: 0.7,
fulltextIndex: { required: true } }
@ObjectModel: { readOnly: true,
filter.enabled: true,
sort.enabled: true }
//_Chemical._ChemicalName[1: Language = $session.system_language ].NameOfChemical,
_Chemical._ChemicalBasicInfo._ChemicalName[1: Language = $session.system_language ].NameOfChemical,
@Search: { defaultSearchElement: true,
ranking: #MEDIUM,
fuzzinessThreshold: 0.7 }
FactoryJargonForSubstance,
@ObjectModel: { filter.enabled: false,
sort.enabled: false }
@Semantics.quantity.unitOfMeasure : 'SubstYearlyTonnageQtyUnit'
@EndUserText.label: 'Yearly Tonnage Qty'
SubstYearlyTonnageQty,
@Semantics.unitOfMeasure: true
@Consumption.valueHelpDefinition: [{
entity: { name: 'C_HzdsSubstInventoryUoMVH',
element: 'UnitOfMeasure' },
label: 'Unit Of Measure'
}]
@ObjectModel: { filter.enabled: false,
sort.enabled: false }
cast ( '' as ehhss_hsi_yearly_tonnage_unit ) as SubstYearlyTonnageQtyUnit,
@ObjectModel: { readOnly: true,
virtualElement: true,
virtualElementCalculatedBy: 'ABAP:CL_EHHSS_HSI_ITM_SADL_EXIT' }
cast( '' as ehhss_hsi_tonnage_band_name ) as SubstYearlyTonnageBandName,
@Semantics.quantity.unitOfMeasure : 'SubstHoldupQtyUnit'
@EndUserText.label: 'Holdup Qty'
@ObjectModel: { filter.enabled: false,
sort.enabled: false }
SubstHoldupQty,
@Semantics.unitOfMeasure: true
@Consumption.valueHelpDefinition: [{
entity: { name: 'C_HzdsSubstInventoryUoMVH',
element: 'UnitOfMeasure' },
label: 'Unit Of Measure'
}]
@ObjectModel: { filter.enabled: false,
sort.enabled: false }
cast ('' as ehhss_hsi_holdup_unit ) as SubstHoldupQtyUnit,
@ObjectModel: { readOnly: true,
virtualElement: true,
virtualElementCalculatedBy: 'ABAP:CL_EHHSS_HSI_ITM_SADL_EXIT' }
cast( '' as ehhss_hsi_tonnage_band_name ) as SubstHoldupTonnageBandName,
@ObjectModel: { readOnly: true,
virtualElement: true,
virtualElementCalculatedBy: 'ABAP:CL_EHHSS_HSI_ITM_SADL_EXIT' }
cast( '' as ehfnd_hazard_statement_conct_t ) as GHSHazardStatementCodes,
@ObjectModel: { readOnly: true,
virtualElement: true,
virtualElementCalculatedBy: 'ABAP:CL_EHHSS_HSI_ITM_SADL_EXIT' }
@EndUserText.label: 'GHS Classifications'
cast( '' as ehfnd_classification_conct_t ) as GHSHazardClassCategoryNames, // To DO change name of field
@ObjectModel: { filter.enabled: false,
sort.enabled: false }
HzdsSubstInvtryItemIsFinished,
@ObjectModel: { filter.enabled: false,
sort.enabled: false }
HzdsSubstInvtryItemIsPrinted,
@Consumption.hidden: true
_EHSLocation .EHSLocationType,
@Consumption.hidden: true
_EHSLocation .EHSLocationStatus,
@Consumption.hidden: true
cast(_EHSLocation.EHSLocationAuthorizationGroup as ehfnd_loc_auth_group_nc preserving type ) as EHSLocationAuthorizationGroup,
@Consumption.hidden: true
_EHSLocation .Plant,
@Consumption.hidden: true
_EHSLocation .CostCenter,
@Consumption.hidden: true
_EHSLocation .CompanyCode,
@Consumption.hidden: true
_EHSLocation.BusinessArea,
// * begin correction 3066290 11.06.2021
//* @Consumption.hidden: true
_EHSLocation.Country,
// * end correction 3066290 11.06.2021
@Consumption.hidden: true
_HzdsSubstInventory.HzdsSubstInventoryStatus,
/* Associations */
_ChemicalNameText
}
where
_HzdsSubstInventoryItem.ChemicalUUID is null