Material Data of Supplier and Raw Material for Monitor
P_ChmlSuplrMatlDataMntr is a Consumption CDS View that provides data about "Material Data of Supplier and Raw Material for Monitor" in SAP S/4HANA. It reads from 1 data source (I_ChmlSuplrMatl) and exposes 15 fields.
Material Data of Supplier and Raw Material for Monitor
view
AbapCatalog.sqlViewName
PCSMMATLDTMNTR
view
AbapCatalog.compiler.compareFilter
true
view
AbapCatalog.preserveKey
true
view
AccessControl.authorizationCheck
#NOT_REQUIRED
view
ClientHandling.algorithm
#SESSION_VARIABLE
view
VDM.viewType
#CONSUMPTION
view
VDM.private
true
view
Fields (15)
Key
Field
Source Table
Source Field
Description
ChmlSuplrMatlUUID
ChmlCmplncInfoUUID
ChmlCmplncInfoCombinedName
Material1endasChmlCmplncInfoNameAndNmbr
ChmlCmplncInternalNameasProduct
Material
MaterialName
ChmlCmplncInternalName
Specification
ProductHierarchy
ProductHierarchyText
Division
DivisionName
ExternalProductGroup
ExternalProductGroupName
@EndUserText.label: 'Material Data of Supplier and Raw Material for Monitor'
@AbapCatalog:
{
sqlViewName: 'PCSMMATLDTMNTR',
compiler.compareFilter: true,
preserveKey: true
}@AccessControl:
{
// no authorization check needed for private view
authorizationCheck: #NOT_REQUIRED
}@ClientHandling.algorithm: #SESSION_VARIABLE@VDM.viewType: #CONSUMPTION@VDM.private: true@ObjectModel:
{
semanticKey: [ 'ChmlSuplrMatlUUID' ]
}defineview P_ChmlSuplrMatlDataMntr
--Select data from basic view of Supplier Material
asselectfrom I_ChmlSuplrMatl as SupplierMaterial
--join supplier material data
leftouter to one join I_ChmlCmplncSuplrMatlAssgmt as SuplrMatlAssignment on SupplierMaterial.ChmlSuplrMatlUUID = SuplrMatlAssignment.ChmlSuplrMatlUUID
--join data of raw material
leftouter to one join C_ChmlCmplncPrimMatl as RawMaterialData on SuplrMatlAssignment.ChmlCmplncInfoUUID = RawMaterialData.ChmlCmplncInfoUUID
{
--UUID of Supplier Material
key SupplierMaterial.ChmlSuplrMatlUUID,
--UUID of raw material
SuplrMatlAssignment.ChmlCmplncInfoUUID,
--Concatenate the name of supplier material: "Supplier - Raw Material Name"
concat_with_space(SupplierMaterial._BusinessPartner.BusinessPartnerFullName,
concat_with_space('-', RawMaterialData.ChmlCmplncInfoCombinedName, 1), 1) as SupplierMaterialCombinedName,
--Combined Name of Raw Material (Material description or Internal Name)
RawMaterialData.ChmlCmplncInfoCombinedName,
--Combined Name of Raw Material with Product Number: "Raw Material Name (Number)"
casewhen RawMaterialData.Material isnullthen RawMaterialData.ChmlCmplncInfoCombinedName
else concat_with_space( RawMaterialData.ChmlCmplncInfoCombinedName,
concat( '(',
concat(RawMaterialData.Material, ')')
),
1)
endas ChmlCmplncInfoNameAndNmbr,
--Combined Material/Product Number
coalesce( RawMaterialData.Material, RawMaterialData._ChmlCmplncInfo.ChmlCmplncInternalName ) as Product,
--Combined Material/Product Number
RawMaterialData.Material,
--Material/Product description
RawMaterialData.MaterialName,
--Raw Material Internal Name
RawMaterialData._ChmlCmplncInfo.ChmlCmplncInternalName,
--Assigned Specification of Raw Material
RawMaterialData._ChmlCmplncInfo.Specification,
--Product Hierarchy of primary material
RawMaterialData._MaterialData._ProductHierarchy.ProductHierarchy,
RawMaterialData._MaterialData._ProductHierarchy._Text[1: Language = $session.system_language ].ProductHierarchyText,
--Division of primary material
RawMaterialData._MaterialData._Division.Division,
RawMaterialData._MaterialData._Division._Text[1: Language = $session.system_language ].DivisionName,
--External Product Group of Raw material
RawMaterialData._MaterialData._ExternalProductGroup.ExternalProductGroup,
RawMaterialData._MaterialData._ExternalProductGroup._Text[1: Language = $session.system_language ].ExternalProductGroupName
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"C_CHMLCMPLNCPRIMMATL",
"I_BUSINESSPARTNER",
"I_CHMLCMPLNCINFO",
"I_CHMLCMPLNCSUPLRMATLASSGMT",
"I_CHMLSUPLRMATL",
"I_DIVISION",
"I_DIVISIONTEXT",
"I_EXTPRODGRP",
"I_EXTPRODGRPTEXT",
"I_PRODUCT",
"I_PRODUCTHIERARCHY",
"I_PRODUCTHIERARCHYTEXT"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/