--Label of view
@EndUserText.label: 'Chemical Supplier Material'
@AbapCatalog:
{
-- SQL view name (16 characters)
sqlViewName: 'ICSUPLRMATL',
--If it's true, the filter conditions are compared and, if they match, the associated join expression is evaluated only once
compiler.compareFilter: true
}
--Access Control: Authorizations Checks
@AccessControl:
{
authorizationCheck: #CHECK,
// blocking of personal data required because of link to business partner / supplier
personalData.blocking: #REQUIRED,
privilegedAssociations: [ '_CreatedByUser', '_LastChangedByUser' ]
}
--Client Handling of the view
@ClientHandling.algorithm: #SESSION_VARIABLE
--VDM view type
@VDM.viewType: #BASIC
@ObjectModel:
{
--Performance Annotations
usageType:
{
dataClass: #MASTER,
sizeCategory: #M,
serviceQuality: #B
},
representativeKey: 'ChmlSuplrMatlUUID'
}
define view I_ChmlSuplrMatl
--Select data from master table 'Chemical Supplier Material'
as select from ehfndv_csm as ChemicalSupplierMaterial
--Link to Business Partner Data
association [0..1] to I_BusinessPartner as _BusinessPartner on $projection.BusinessPartnerSupplier = _BusinessPartner.BusinessPartner
--Link to Supplier Data Data - Needed for DCL (Supplier Authorization Group) and to have the Supplier ID
association [0..1] to I_BusinessPartnerSupplier as _BusinessPartnerSupplier on $projection.BusinessPartnerSupplier = _BusinessPartnerSupplier.BusinessPartner
--Link to user data
association [0..1] to I_User as _CreatedByUser on $projection.CreatedByUser = _CreatedByUser.UserID
association [0..1] to I_User as _LastChangedByUser on $projection.LastChangedByUser = _LastChangedByUser.UserID
--Link to customizing tables
association [1..1] to I_ResponsibleUnit as _ResponsibleUnit on $projection.ResponsibleUnit = _ResponsibleUnit.ResponsibleUnit
association [1..*] to I_ChmlSuplrMatlImprtRespy as _ImportResponsibility on $projection.ChmlSuplrMatlUUID = _ImportResponsibility.ChmlSuplrMatlUUID
--Link to domain values
association [0..1] to I_ChmlSuplrMatlDataSts as _DataStatus on $projection.ChmlSuplrMatlDataStatus = _DataStatus.ChmlSuplrMatlDataStatus
{
--UUID of Chemical Supplier Material
key ChemicalSupplierMaterial.chmlsuplrmatluuid as ChmlSuplrMatlUUID,
--Create date/time
@Semantics.systemDateTime.createdAt: true
cast(ChemicalSupplierMaterial.creationutcdatetime as ehfnd_bo_crea_date_time preserving type )
as CreationUTCDateTime,
--Created by user
@Semantics.user.createdBy: true
@ObjectModel.readOnly: true
cast(ChemicalSupplierMaterial.createdbyuser as ehfnd_bo_crea_uname preserving type )
as CreatedByUser,
--Change date/time
@Semantics.systemDateTime.lastChangedAt: true
cast(ChemicalSupplierMaterial.lastchangeutcdatetime as ehfnd_bo_lchg_date_time preserving type )
as LastChangeUTCDateTime,
--Changed by user
@Semantics.user.lastChangedBy: true
@ObjectModel.readOnly: true
cast(ChemicalSupplierMaterial.lastchangedbyuser as ehfnd_bo_lchg_uname preserving type )
as LastChangedByUser,
--Supplier (saved as business partner)
//--[ GENERATED:012:GlBfhyFV7jY4i}8L6{LzUW
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_BusinessPartnerVH',
element: 'BusinessPartner' }
}]
// ]--GENERATED
@ObjectModel.foreignKey.association: '_BusinessPartner'
ChemicalSupplierMaterial.businesspartnersupplier as BusinessPartnerSupplier,
--Supplier Material Number
ChemicalSupplierMaterial.suppliermaterialnumber as SupplierMaterialNumber,
--Supplier Material Name
ChemicalSupplierMaterial.chmlsuplrmatlname as ChmlSuplrMatlName,
--Data Status
@ObjectModel.foreignKey.association: '_DataStatus'
ChemicalSupplierMaterial.chmlsuplrmatldatastatus as ChmlSuplrMatlDataStatus,
--Indicator: supplier material is outdated
ChemicalSupplierMaterial.chmlsuplrmatlisoutdated as ChmlSuplrMatlIsOutdated,
--Responsible Unit
@ObjectModel.foreignKey.association: '_ResponsibleUnit'
ChemicalSupplierMaterial.responsibleunit as ResponsibleUnit,
--Change date of data status
ChemicalSupplierMaterial.chmlsuplrmatldatastschgdtetme as ChmlSuplrMatlDataStsChgDteTme,
/*Associations*/
_BusinessPartner,
_BusinessPartnerSupplier,
_CreatedByUser,
_LastChangedByUser,
_DataStatus,
_ResponsibleUnit,
_ImportResponsibility
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"EHFNDV_CSM"
],
"ASSOCIATED":
[
"I_BUSINESSPARTNER",
"I_BUSINESSPARTNERSUPPLIER",
"I_CHMLSUPLRMATLDATASTS",
"I_CHMLSUPLRMATLIMPRTRESPY",
"I_RESPONSIBLEUNIT",
"I_USER"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/