P_MRPMATERIALSTATUS is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_ProductPlantBasic) and exposes 5 fields with key fields Material, MRPPlant. It has 4 associations to related views.
$projection.MRPMaterialStatus = _MRPMaterialStatusCodeText.MRPMaterialStatus and _MRPMaterialStatusCodeText.Language = $session.system_language
Annotations (13)
Name
Value
Level
Field
ClientHandling.algorithm
#SESSION_VARIABLE
view
Search.searchable
false
view
VDM.private
true
view
VDM.viewType
#COMPOSITE
view
ObjectModel.usageType.serviceQuality
#C
view
ObjectModel.usageType.sizeCategory
#M
view
ObjectModel.usageType.dataClass
#MIXED
view
AccessControl.authorizationCheck
#NOT_REQUIRED
view
AccessControl.personalData.blocking
#NOT_REQUIRED
view
AbapCatalog.sqlViewName
PMRPMATERIALSTAT
view
AbapCatalog.compiler.compareFilter
true
view
AbapCatalog.preserveKey
true
view
AbapCatalog.dataMaintenance
#RESTRICTED
view
Fields (5)
Key
Field
Source Table
Source Field
Description
KEY
Material
Product
KEY
MRPPlant
Plant
CrossPlantStatusendasMRPMaterialStatus
_MaterialStatusText
_MaterialStatusText
_MRPMaterialStatusCodeText
_MRPMaterialStatusCodeText
@ClientHandling.algorithm: #SESSION_VARIABLE@Search.searchable: false@VDM.private: true@VDM.viewType: #COMPOSITE@ObjectModel: {
usageType: {
serviceQuality: #C,
sizeCategory: #M,
dataClass: #MIXED
}
}
@AccessControl: {
authorizationCheck: #NOT_REQUIRED,
personalData.blocking: #NOT_REQUIRED
}@AbapCatalog: {
sqlViewName: 'PMRPMATERIALSTAT',
compiler.compareFilter: true,
preserveKey:true,
dataMaintenance: #RESTRICTED
}defineview P_MRPMATERIALSTATUS
asselectfrom I_ProductPlantBasic as ProductPlant //dummy call to get results to be able to run the associations, because one or both material status profils could be not assigned
association [0..1] to P_MRPMaterialPlantStatus as _MaterialPlant on $projection.Material = _MaterialPlant.Material //MARC material status
and $projection.MRPPlant = _MaterialPlant.MRPPlant
association [0..1] to P_MRPMaterialCrossPlantStatus as _Material on $projection.Material = _Material.Material //MARA material status
association [0..1] to I_MRPMaterialStatusText as _MaterialStatusText on $projection.MRPValidMaterialStatus = _MaterialStatusText.MRPValidMaterialStatus
and _MaterialStatusText.Language = $session.system_language
association [0..1] to I_MRPMaterialStatusCodeText as _MRPMaterialStatusCodeText on $projection.MRPMaterialStatus = _MRPMaterialStatusCodeText.MRPMaterialStatus
and _MRPMaterialStatusCodeText.Language = $session.system_language
{
key Product as Material,
key Plant as MRPPlant,
@ObjectModel.text.element: [ 'MRPValidMaterialStatusName' ]cast(
casewhen _MaterialPlant.ShiftStatusCode isnotnulland _MaterialPlant.ShiftStatusCode = 'B' //plant specific material status first incase of B
then _MaterialPlant.ShiftStatusCode
when _Material.ShiftStatusCode isnotnulland _Material.ShiftStatusCode <> '' // cross plant material status A or B when plant specific status isnot B
then _Material.ShiftStatusCode
when _MaterialPlant.ShiftStatusCode isnotnull// plant specific material status A or empty and has a material status profil assigned
then _MaterialPlant.ShiftStatusCode
when _Material.ShiftStatusCode isnotnull// cross plant material status is empty but has a material status profil assigned
then _Material.ShiftStatusCode
endas mrpmaterialstatus ) as MRPValidMaterialStatus,
@ObjectModel.text.element: [ 'MRPMaterialStatusName' ]casewhen _MaterialPlant.ShiftStatusCode isnotnulland _MaterialPlant.ShiftStatusCode = 'B' //plant specific material status first incase of B
then _MaterialPlant.ProfileCode
when _Material.ShiftStatusCode isnotnulland _Material.ShiftStatusCode <> '' // cross plant material status A or B when plant specific status isnot B
then _Material.CrossPlantStatus
when _MaterialPlant.ShiftStatusCode isnotnull// plant specific material status is A or empty and has a material status profil assigned
then _MaterialPlant.ProfileCode
when _Material.ShiftStatusCode isnotnull// cross plant material status is empty but has a material status profil assigned
then _Material.CrossPlantStatus
endas MRPMaterialStatus,
@ObjectModel.text.element: [ 'ManufacturingOrderHeaderStatusName' ]casewhen _MaterialPlant.ShiftStatusCode isnotnulland _MaterialPlant.ShiftStatusCode = 'B' //plant specific material status first incase of B
then _MaterialPlant.ManufacturingOrderHeaderStatus
when _Material.ShiftStatusCode isnotnulland _Material.ShiftStatusCode <> '' // cross plant material status A or B when plant specific status isnot B
then _Material.ManufacturingOrderHeaderStatus
when _MaterialPlant.ShiftStatusCode isnotnull// plant specific material status is A or empty and has a material status profil assigned
then _MaterialPlant.ManufacturingOrderHeaderStatus
when _Material.ShiftStatusCode isnotnull// cross plant material status is empty but has a material status profil assigned
then _Material.ManufacturingOrderHeaderStatus
endas ManufacturingOrderHeaderStatus,
_MaterialStatusText,
_MRPMaterialStatusCodeText
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_PRODUCTPLANTBASIC",
"P_MRPMATERIALCROSSPLANTSTATUS",
"P_MRPMATERIALPLANTSTATUS"
],
"ASSOCIATED":
[
"I_MRPMATERIALSTATUSCODETEXT",
"I_MRPMATERIALSTATUSTEXT",
"P_MRPMATERIALCROSSPLANTSTATUS",
"P_MRPMATERIALPLANTSTATUS"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/