// Manage Supplier Compliance For Raw Material (Monitor)
@EndUserText.label: 'Supplier Material'
@AbapCatalog:
{
sqlViewName: 'CCSUPLRMATLMNTR',
compiler.compareFilter: true,
preserveKey: true
}
@AccessControl:
{
authorizationCheck: #CHECK,
// blocking of personal data required because of link to business partner / supplier
personalData.blocking: #REQUIRED
}
@ClientHandling.algorithm: #SESSION_VARIABLE
@Metadata: {
allowExtensions: true
}
@VDM.viewType: #CONSUMPTION
@ObjectModel:
{
createEnabled: false,
updateEnabled: false,
deleteEnabled: false,
usageType:
{
dataClass: #MIXED,
sizeCategory: #L,
serviceQuality: #C
},
semanticKey: [ 'SupplierName' ]
}
//Header information
@UI:
{
presentationVariant:
{
sortOrder:
[
{
by: 'SupplierName',
direction: #ASC
}
],
requestAtLeast: [ 'ChmlSuplrMatlUUID', 'ChmlSuplrMatlNavgnLink', 'ChmlCmplncInfoNavgnLink', 'ChmlCmplncInfoUUID' ]
},
headerInfo:
{
typeName: 'Supplier of Raw Material',
typeNamePlural: 'Suppliers of Raw Materials',
title:
{
label: 'Supplier of Raw Material',
value: 'SupplierName'
}
}
}
@Search.searchable : true
define view C_ChmlSuplrMatlMntr
--Select data from basic view of supplier material
as select from I_ChmlSuplrMatl as SupplierMaterial
--Additional information
--Supplier data
association [1..1] to C_ChmlSuplrMatlSupplierContact as _SupplierContactData on $projection.BusinessPartnerSupplier = _SupplierContactData.BusinessPartnerSupplier
--Raw material data
association [1..1] to I_ChmlCmplncSuplrForRawMatl as _SuplrMatlAssignment on $projection.ActiveChmlSuplrMatlUUID = _SuplrMatlAssignment.ChmlSuplrMatlUUID
association [1..1] to P_ChmlSuplrMatlDataMntr as _MaterialData on $projection.ActiveChmlSuplrMatlUUID = _MaterialData.ChmlSuplrMatlUUID
--Status data
association [1..1] to P_ChmlSuplrMatlSuplrStsWithT as _SupplierStatusWithOD on $projection.ActiveChmlSuplrMatlUUID = _SupplierStatusWithOD.ChmlSuplrMatlUUID
association [1..1] to P_ChmlSuplrMatlDataStsSortSqnc as _DataStatusSortSqnc on $projection.ChmlSuplrMatlDataStatus = _DataStatusSortSqnc.ChmlSuplrMatlDataStatus
// association [1..1] to P_ChmlSuplrMatlDataStsCalc as _CalculatedDataStatus on $projection.ActiveChmlSuplrMatlUUID = _CalculatedDataStatus.ChmlSuplrMatlUUID
// association [1..1] to I_ChmlSuplrMatlSuplrStsCritlty as _SuplrStatusCriticality on $projection.ActiveChmlSuplrMatlUUID = _SuplrStatusCriticality.ChmlSuplrMatlUUID
--value helps
association [0..1] to I_ChmlSuplrMatlSuplrStsVH as _ChmlSuplrMatlSuplrStsVH on $projection.chmlsuplrmatlsuplrsts = _ChmlSuplrMatlSuplrStsVH.ChmlSuplrMatlSuplrSts
association [0..1] to I_ChmlSuplrMatlDataStsVH as _ChmlSuplrMatlDataStsVH on $projection.ChmlSuplrMatlDataStatus = _ChmlSuplrMatlDataStsVH.ChmlSuplrMatlDataStatus
{
--UUID of active supplier material
@ObjectModel.readOnly: true
key SupplierMaterial.ChmlSuplrMatlUUID,
--UUID of chemical compliance information
@ObjectModel.readOnly: true
SupplierMaterial.ChmlSuplrMatlUUID as ActiveChmlSuplrMatlUUID,
@ObjectModel.readOnly: true
SupplierMaterial.ChmlSuplrMatlUUID as ChmlSuplrMatlNavgnLink,
--Supplier (Name, ID)
cast(_BusinessPartner.BusinessPartnerFullName as ehfnd_bupa_supplier_name_nr ) as SupplierName,
--Supplier
@ObjectModel.readOnly: true
cast( SupplierMaterial._BusinessPartnerSupplier.Supplier as ehfnd_bupa_supplier ) as Supplier,
--Business partner ID for contact data
@ObjectModel.readOnly: true
SupplierMaterial.BusinessPartnerSupplier as BusinessPartnerSupplier,
--UUID of active or draft chemcial compliance information -> Raw material
@ObjectModel.readOnly: true
_SuplrMatlAssignment.ChmlCmplncInfoUUID as ChmlCmplncInfoUUID,
@ObjectModel.readOnly: true
_SuplrMatlAssignment.ActiveChmlCmplncInfoUUID as ChmlCmplncInfoNavgnLink,
--Raw Material Name and Number
@ObjectModel.readOnly: true
cast(_MaterialData.ChmlCmplncInfoNameAndNmbr as ehfnd_cci_raw_material_name ) as ChmlCmplncInfoNameAndNmbr,
--Raw Material Name (primary Material)
@ObjectModel.readOnly: true
cast(_MaterialData.ChmlCmplncInfoCombinedName as ehfnd_cci_raw_material_name ) as ChmlCmplncInfoCombinedName,
--Raw Material Number (primary Material)
@ObjectModel.readOnly: true
cast(_MaterialData.Product as ehfnd_cci_raw_material ) as Product,
--Data Status
@ObjectModel:
{
readOnly: true,
text.element: [ 'ChmlSuplrMatlDataStatusName' ],
foreignKey.association: '_ChmlSuplrMatlDataStsVH'
}
SupplierMaterial.ChmlSuplrMatlDataStatus,
--Description of data status
@ObjectModel.readOnly: true
_DataStatus._Text[1: Language = $session.system_language ].ChmlSuplrMatlDataStatusName,
--Criticality
@ObjectModel.readOnly: true
_DataStatus.ChmlSuplrMatlDataStsCritlty,
--Sort Sequence
@ObjectModel.readOnly: true
_DataStatusSortSqnc.SortSequence,
--Supplier Status for Raw Material
@ObjectModel:
{
readOnly: true,
text.element: [ 'ChmlSuplrMatlSuplrStsName' ],
foreignKey.association: '_ChmlSuplrMatlSuplrStsVH'
}
_SupplierStatusWithOD.ChmlSuplrMatlSuplrSts,
--Description of supplier status
@ObjectModel.readOnly: true
_SupplierStatusWithOD._Text[1: Language = $session.system_language ].ChmlSuplrMatlSuplrStsName,
--Criticality
@ObjectModel.readOnly: true
_SupplierStatusWithOD.ChmlSuplrMatlSuplrStsCritlty,
--Supplier Material Name
@ObjectModel.readOnly: true
SupplierMaterial.ChmlSuplrMatlName,
--Supplier Material
@ObjectModel.readOnly: true
SupplierMaterial.SupplierMaterialNumber,
--Responsible Unit
@ObjectModel.readOnly: true
SupplierMaterial.ResponsibleUnit,
-----------------------------------------------------------------------------------------------------------
// Additional search fields
-----------------------------------------------------------------------------------------------------------
--Supplier names
@ObjectModel.readOnly: true
_BusinessPartner.SearchTerm1,
@ObjectModel.readOnly: true
_BusinessPartner.SearchTerm2,
@ObjectModel.readOnly: true
_BusinessPartner.OrganizationBPName1,
@ObjectModel.readOnly: true
_BusinessPartner.OrganizationBPName2,
@ObjectModel.readOnly: true
_BusinessPartner.OrganizationBPName3,
@ObjectModel.readOnly: true
_BusinessPartner.OrganizationBPName4,
--Raw Material names
@ObjectModel.readOnly: true
_MaterialData.MaterialName,
@ObjectModel.readOnly: true
_MaterialData.ChmlCmplncInternalName,
@ObjectModel.readOnly: true
_MaterialData.Material,
/*Associations*/
_SupplierContactData,
_ChmlSuplrMatlSuplrStsVH,
_ChmlSuplrMatlDataStsVH,
// needed for DCL
SupplierMaterial._BusinessPartner,
SupplierMaterial._BusinessPartnerSupplier
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_BUSINESSPARTNER",
"I_BUSINESSPARTNERSUPPLIER",
"I_CHMLCMPLNCSUPLRFORRAWMATL",
"I_CHMLSUPLRMATL",
"I_CHMLSUPLRMATLDATASTS",
"I_CHMLSUPLRMATLDATASTSTEXT",
"I_CHMLSUPLRMATLSUPLRSTST",
"P_CHMLSUPLRMATLDATAMNTR",
"P_CHMLSUPLRMATLDATASTSSORTSQNC",
"P_CHMLSUPLRMATLSUPLRSTSWITHT"
],
"ASSOCIATED":
[
"C_CHMLSUPLRMATLSUPPLIERCONTACT",
"I_BUSINESSPARTNER",
"I_BUSINESSPARTNERSUPPLIER",
"I_CHMLCMPLNCSUPLRFORRAWMATL",
"I_CHMLSUPLRMATLDATASTSVH",
"I_CHMLSUPLRMATLSUPLRSTSVH",
"P_CHMLSUPLRMATLDATAMNTR",
"P_CHMLSUPLRMATLDATASTSSORTSQNC",
"P_CHMLSUPLRMATLSUPLRSTSWITHT"
],
"BASE":
[
"I_CHMLSUPLRMATL"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/