P_ChmlSuplrMatlDataMntr

DDL: P_CHMLSUPLRMATLDATAMNTR Type: view CONSUMPTION

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.

Data Sources (1)

SourceAliasJoin Type
I_ChmlSuplrMatl SupplierMaterial from

Annotations (8)

NameValueLevelField
EndUserText.label 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)

KeyFieldSource TableSource FieldDescription
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' ]
}

define view P_ChmlSuplrMatlDataMntr
  --Select data from basic view of Supplier Material
  as select from           I_ChmlSuplrMatl             as SupplierMaterial

  --join supplier material data
    left outer to one join I_ChmlCmplncSuplrMatlAssgmt as SuplrMatlAssignment on SupplierMaterial.ChmlSuplrMatlUUID = SuplrMatlAssignment.ChmlSuplrMatlUUID

  --join data of raw material
    left outer 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)"
      case
        when RawMaterialData.Material is null then RawMaterialData.ChmlCmplncInfoCombinedName
        else concat_with_space( RawMaterialData.ChmlCmplncInfoCombinedName,
                                concat( '(',
                                        concat(RawMaterialData.Material, ')')
                                      ),
                              1)
      end                                                                                          as 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
}