C_MaterialCoverage

DDL: C_MATERIALCOVERAGE SQL: CMATCOV Type: view CONSUMPTION

MRP Material Coverage Net Segment

C_MaterialCoverage is a Consumption CDS View that provides data about "MRP Material Coverage Net Segment" in SAP S/4HANA. It reads from 2 data sources (also, I_SDMAreaOfResponsibility) and exposes 95 fields with key fields MRPPlant, MRPArea, Material, MRPPlanningSegmentType, MRPPlanningSegment. It has 21 associations to related views.

Data Sources (2)

SourceAliasJoin Type
also filter inner
I_SDMAreaOfResponsibility SDMAreaOfResponsibility inner

Associations (21)

CardinalityTargetAliasCondition
[0..*] C_CacheSupplier _Supplier $projection.MRPPlant = _Supplier.MRPPlant and $projection.Material = _Supplier.Material and $projection.MRPArea = _Supplier.MRPArea and $projection.MRPPlanningSegmentType = _Supplier.MRPPlanningSegmentType and $projection.MRPPlanningSegment = _Supplier.MRPPlanningSegment
[0..*] C_MRPAvailability _MRPAvailability $projection.MRPPlant = _MRPAvailability.MRPPlant and $projection.Material = _MRPAvailability.Material and $projection.MRPArea = _MRPAvailability.MRPArea and $projection.MRPPlanningSegmentType = _MRPAvailability.MRPPlanningSegmentType and $projection.MRPPlanningSegment = _MRPAvailability.MRPPlanningSegment and $projection.MaterialShortageProfile = _MRPAvailability.MaterialShortageProfile and $projection.MaterialShortageProfileCount = _MRPAvailability.MaterialShortageProfileCount
[0..1] I_MRPController _MRPController $projection.MRPPlant = _MRPController.Plant and $projection.MRPController = _MRPController.MRPController
[1..1] I_MRPType _MRPType $projection.MRPType = _MRPType.MRPType ---------------------------------------------------------------------------------------------------------------- -- Text Fallback Associations -- ----------------------------------------------------------------------------------------------------------------
[0..*] I_MRPTypeText _MRPTypeText $projection.MRPType = _MRPTypeText.MRPType
[0..1] I_MRPTypeText _MRPTypeTextPlant $projection.MRPType = _MRPTypeTextPlant.MRPType and $projection.PlantLanguage = _MRPTypeTextPlant.Language
[0..1] I_MatlProcurementCategoryText _ProcurementCategoryTextPlant $projection.MaterialProcurementCategory = _ProcurementCategoryTextPlant.MaterialProcurementCategory and $projection.PlantLanguage = _ProcurementCategoryTextPlant.Language
[0..1] I_MatlProcurementProfileText _ProcurementProfileTextPlant $projection.MaterialProcurementProfile = _ProcurementProfileTextPlant.MaterialProcurementProfile and $projection.MRPPlant = _ProcurementProfileTextPlant.Plant and $projection.PlantLanguage = _ProcurementProfileTextPlant.Language
[0..1] I_MRPGroup _MRPGroup $projection.MRPGroup = _MRPGroup.MRPGroup and $projection.MRPPlant = _MRPGroup.MRPPlant
[0..1] I_MRPGroupText _MRPGroupTextPlant $projection.MRPGroup = _MRPGroupTextPlant.MRPGroup and $projection.MRPPlant = _MRPGroupTextPlant.MRPPlant
[1..1] I_MatlProcurementCategory _MatlProcurementCategory $projection.MaterialProcurementCategory = _MatlProcurementCategory.MaterialProcurementCategory
[1..1] I_MatlProcurementProfile _MatlProcurementProfile $projection.MaterialProcurementProfile = _MatlProcurementProfile.MaterialProcurementProfile and $projection.MRPPlant = _MatlProcurementProfile.Plant
[1..1] C_PlantVH _PlantVH $projection.MRPPlant = _PlantVH.Plant
[0..1] C_MRPAreaValHelp _MRPAreaVH $projection.MRPArea = _MRPAreaVH.MRPArea and $projection.MRPPlant = _MRPAreaVH.Plant
[0..1] C_PurchasingGroupValueHelp _PurchasingGroupVH $projection.PurchasingGroup = _PurchasingGroupVH.PurchasingGroup
[0..1] I_ProdUniversalHierarchyText_2 _HierText $projection.ProductionProductHierarchy = _HierText.ProdUnivHierarchy and _HierText.ProdHierarchyValidityEndDate >= $session.user_date and _HierText.Language = $session.system_language
[0..1] I_ProductHierarchyNormalNodeT _HierNodeText $projection.ProductionProductHierarchyNode = _HierNodeText.ProductHierarchyNode and _HierNodeText.Language = $session.system_language
[0..1] I_MRPMaterialStatusText _MaterialStatusText $projection.MRPValidMaterialStatus = _MaterialStatusText.MRPValidMaterialStatus and _MaterialStatusText.Language = $session.system_language
[0..1] I_SafetyStockMethodVH _SafetyStockMethodVH $projection.MRPSafetyStockMethod = _SafetyStockMethodVH.SafetyStockMethod ---------------------------------------------------------------------------------------------------------------- -- Extension Associations -- ----------------------------------------------------------------------------------------------------------------
[0..1] E_Product _MatExtension $projection.Material = _MatExtension.Product
[0..1] E_Productplant _PlantExtension $projection.Material = _PlantExtension.Product and $projection.MRPPlant = _PlantExtension.Plant

Annotations (12)

NameValueLevelField
AbapCatalog.sqlViewName CMATCOV view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
AbapCatalog.preserveKey true view
EndUserText.label MRP Material Coverage Net Segment view
Search.searchable true view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #CONSUMPTION view
Metadata.allowExtensions true view

Fields (95)

KeyFieldSource TableSource FieldDescription
KEY MRPPlant Material MRPPlant
KEY MRPArea Material MRPArea
KEY Material Material Material
KEY MRPPlanningSegmentType Material MRPPlanningSegmentType
KEY MRPPlanningSegment Material MRPPlanningSegment
KEY MaterialShortageProfile Material MaterialShortageProfile
KEY MaterialShortageProfileCount Material MaterialShortageProfileCount
KEY FactoryCalendar Material FactoryCalendar
MaterialSelectionIdentifier
PlantName _PlantVH PlantName
MRPAreaText _MRPAreaVH MRPAreaText
MaterialName Material MaterialName
PlantLanguage Material PlantLanguage
MaterialABCClassification Material MaterialABCClassification
MRPValidMaterialStatusName _MaterialStatusText MRPValidMaterialStatusName
MRPValidMaterialStatus Material MRPValidMaterialStatus
Supplier
SupplierName
NumberOfSupplier Material NumberOfSupplier
UnitOfMeasureDspNmbrOfDcmls Material UnitOfMeasureDspNmbrOfDcmls
AvailabilityChart
WeeklyAvailabilityChart Material WeeklyAvailabilityChart
PurchasingGroup
PurchasingGroupName _PurchasingGroupVH PurchasingGroupName
MaterialType Material MaterialType
MaterialTypeName Material MaterialTypeName
MaterialGroup Material MaterialGroup
MaterialGroupName Material MaterialGroupName
MaterialShortageDefinition
MaterialShortageDefinitionName Material MaterialShortageDefinitionName
MRPController Material MRPController
MRPControllerName _MRPController MRPControllerName
IsMarkedForDeletion Material IsMarkedForDeletion
LowLevelCode Material LowLevelCode
HasAcceptedShortage Material HasAcceptedShortage
MaterialReplnmtLeadDurnEndDate
TotalReplnmtLeadDurnEndDate Material TotalReplnmtLeadDurnEndDate
ManualPlanningHorizonEndDate Material ManualPlanningHorizonEndDate
MRPSafetyDurationEndDate Material MRPSafetyDurationEndDate
MaterialShortageStartDate Material MaterialShortageStartDate
MaterialShortageEndDate Material MaterialShortageEndDate
LastBufferUpdateDateTime Material LastBufferUpdateDateTime
MaterialPlannedDeliveryDurn
MaterialPlannedProductionDurn Material MaterialPlannedProductionDurn
MRPSafetyDuration Material MRPSafetyDuration
TotalReplenishmentLeadDuration Material TotalReplenishmentLeadDuration
MaterialGoodsReceiptDuration Material MaterialGoodsReceiptDuration
PlanningTimeFenceInDays Material PlanningTimeFenceInDays
EvaluationHorizonInDays Material EvaluationHorizonInDays
DaysOfSupplyDuration Material DaysOfSupplyDuration
IntraDaySupplyDuration Material IntraDaySupplyDuration
TimeTillShortageInCalendarDays Material TimeTillShortageInCalendarDays
MaterialShortageDuration Material MaterialShortageDuration
MaterialShortageDurnInWorkdays Material MaterialShortageDurnInWorkdays
DaysOfSupplyCriticality Material DaysOfSupplyCriticality
StockDaysSupplyDuration Material StockDaysSupplyDuration
StockDaysSupplyCriticality Material StockDaysSupplyCriticality
StockIntraDaySupplyDuration Material StockIntraDaySupplyDuration
MaterialBaseUnit
MRPAvailableStockQty Material MRPAvailableStockQty
MaterialShortageQuantity
HasMaterialShortageReplnmtLead
HasShortageTotalReplnmtLead Material HasShortageTotalReplnmtLead
HasShortageManualPlanHorizon Material HasShortageManualPlanHorizon
HasShortageMRPSafetyDuration Material HasShortageMRPSafetyDuration
MRPType
MRPTypeendasMRPTypeName
MaterialProcurementProfile Material MaterialProcurementProfile
MaterialProcurementCategory Material MaterialProcurementCategory
MRPGroup Material MRPGroup
MRPGroupendasMRPGroupName
MRPSafetyStockMethod Material MRPSafetyStockMethod
MRPSafetyStockMethodText _SafetyStockMethodVH SafetyStockMethodName
SegmentationStrategy Material SegmentationStrategy
SegmentationIsRelevant
SegmentationIsEmpty
ProductionProductHierarchy Material ProductionProductHierarchy
ProductHierarchyText _HierText ProdUnivHierarchyText
ProductionProductHierarchyNode Material ProductionProductHierarchyNode
ProductHierarchyNodeText _HierNodeText ProductHierarchyNodeText
IssueCount Material IssueCount
NmbrOfPastDueOpeningDateElmnts
NumberOfPastDueStartDateElmnts Material NumberOfPastDueStartDateElmnts
NumberOfPastDueEndDateElements Material NumberOfPastDueEndDateElements
NumberOfPastDueElements
MaterialHasMRPNote
MRPMaterialNoteText Material MRPMaterialNoteText
NumberOfRescheduleInElements
NumberOfRescheduleOutElements Material NumberOfRescheduleOutElements
NumberOfCancelProcesses Material NumberOfCancelProcesses
NumberOfRescheduleElements
Associations_MRPAvailability
_Supplier _Supplier
_MRPController _MRPController
_UnitOfMeasure Material _UnitOfMeasure
@AbapCatalog.sqlViewName: 'CMATCOV'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #('TRANSACTIONAL_DATA')
@AbapCatalog.preserveKey: true
@EndUserText.label: 'MRP Material Coverage Net Segment'
@Search.searchable: true
@AccessControl.privilegedAssociations: ['_MRPController', '_Supplier' ]
@ClientHandling.algorithm: #SESSION_VARIABLE

@ObjectModel: {
    usageType : { serviceQuality: #C, sizeCategory: #XL, dataClass: #MIXED }
}

@VDM.viewType: #CONSUMPTION

@Metadata.allowExtensions: true
/*+[hideWarning] { "IDS" : [ "CARDINALITY_CHECK" ]  } */
define view C_MaterialCoverage
  as select distinct from I_MaterialCoverage        as Material

  ----------------------------------------------------------------------------------------------------------------
  -- inner join also as filter for area of responsibility. Is needed for every selection                        --
  ----------------------------------------------------------------------------------------------------------------
    inner join            I_SDMAreaOfResponsibility as SDMAreaOfResponsibility on  Material.MRPController         = SDMAreaOfResponsibility.MRPController
                                                                               and Material.MRPPlant              = SDMAreaOfResponsibility.Plant
                                                                               and SDMAreaOfResponsibility.UserID = $session.user

  association [0..*] to C_CacheSupplier                as _Supplier                     on  $projection.MRPPlant               = _Supplier.MRPPlant
                                                                                        and $projection.Material               = _Supplier.Material
                                                                                        and $projection.MRPArea                = _Supplier.MRPArea
                                                                                        and $projection.MRPPlanningSegmentType = _Supplier.MRPPlanningSegmentType
                                                                                        and $projection.MRPPlanningSegment     = _Supplier.MRPPlanningSegment

  association [0..*] to C_MRPAvailability              as _MRPAvailability              on  $projection.MRPPlant                     = _MRPAvailability.MRPPlant
                                                                                        and $projection.Material                     = _MRPAvailability.Material
                                                                                        and $projection.MRPArea                      = _MRPAvailability.MRPArea
                                                                                        and $projection.MRPPlanningSegmentType       = _MRPAvailability.MRPPlanningSegmentType
                                                                                        and $projection.MRPPlanningSegment           = _MRPAvailability.MRPPlanningSegment
                                                                                        and $projection.MaterialShortageProfile      = _MRPAvailability.MaterialShortageProfile
                                                                                        and $projection.MaterialShortageProfileCount = _MRPAvailability.MaterialShortageProfileCount

  association [0..1] to I_MRPController                as _MRPController                on  $projection.MRPPlant      = _MRPController.Plant
                                                                                        and $projection.MRPController = _MRPController.MRPController

  association [1..1] to I_MRPType                      as _MRPType                      on  $projection.MRPType = _MRPType.MRPType

  ----------------------------------------------------------------------------------------------------------------
  -- Text Fallback Associations                                                                                 --
  ----------------------------------------------------------------------------------------------------------------
  association [0..*] to I_MRPTypeText                  as _MRPTypeText                  on  $projection.MRPType = _MRPTypeText.MRPType
  association [0..1] to I_MRPTypeText                  as _MRPTypeTextPlant             on  $projection.MRPType       = _MRPTypeTextPlant.MRPType
                                                                                        and $projection.PlantLanguage = _MRPTypeTextPlant.Language

  association [0..1] to I_MatlProcurementCategoryText  as _ProcurementCategoryTextPlant on  $projection.MaterialProcurementCategory = _ProcurementCategoryTextPlant.MaterialProcurementCategory
                                                                                        and $projection.PlantLanguage               = _ProcurementCategoryTextPlant.Language

  association [0..1] to I_MatlProcurementProfileText   as _ProcurementProfileTextPlant  on  $projection.MaterialProcurementProfile = _ProcurementProfileTextPlant.MaterialProcurementProfile
                                                                                        and $projection.MRPPlant                   = _ProcurementProfileTextPlant.Plant
                                                                                        and $projection.PlantLanguage              = _ProcurementProfileTextPlant.Language

  association [0..1] to I_MRPGroup                     as _MRPGroup                     on  $projection.MRPGroup = _MRPGroup.MRPGroup
                                                                                        and $projection.MRPPlant = _MRPGroup.MRPPlant

  association [0..1] to I_MRPGroupText                 as _MRPGroupTextPlant            on  $projection.MRPGroup      = _MRPGroupTextPlant.MRPGroup
                                                                                        and $projection.MRPPlant      = _MRPGroupTextPlant.MRPPlant

  association [1..1] to I_MatlProcurementCategory      as _MatlProcurementCategory      on  $projection.MaterialProcurementCategory = _MatlProcurementCategory.MaterialProcurementCategory
  association [1..1] to I_MatlProcurementProfile       as _MatlProcurementProfile       on  $projection.MaterialProcurementProfile = _MatlProcurementProfile.MaterialProcurementProfile
                                                                                        and $projection.MRPPlant                   = _MatlProcurementProfile.Plant
  association [1..1] to C_PlantVH                      as _PlantVH                      on  $projection.MRPPlant = _PlantVH.Plant
  association [0..1] to C_MRPAreaValHelp               as _MRPAreaVH                    on  $projection.MRPArea  = _MRPAreaVH.MRPArea
                                                                                        and $projection.MRPPlant = _MRPAreaVH.Plant
  association [0..1] to C_PurchasingGroupValueHelp     as _PurchasingGroupVH            on  $projection.PurchasingGroup = _PurchasingGroupVH.PurchasingGroup

  association [0..1] to I_ProdUniversalHierarchyText_2 as _HierText                     on  $projection.ProductionProductHierarchy = _HierText.ProdUnivHierarchy
                                                                                        and _HierText.ProdHierarchyValidityEndDate >= $session.user_date
                                                                                        and _HierText.Language                     = $session.system_language

  association [0..1] to I_ProductHierarchyNormalNodeT  as _HierNodeText                 on  $projection.ProductionProductHierarchyNode = _HierNodeText.ProductHierarchyNode
                                                                                        and _HierNodeText.Language                     = $session.system_language

  association [0..1] to I_MRPMaterialStatusText        as _MaterialStatusText           on  $projection.MRPValidMaterialStatus = _MaterialStatusText.MRPValidMaterialStatus
                                                                                        and _MaterialStatusText.Language       = $session.system_language

  association [0..1] to I_SafetyStockMethodVH          as _SafetyStockMethodVH          on  $projection.MRPSafetyStockMethod = _SafetyStockMethodVH.SafetyStockMethod

  ----------------------------------------------------------------------------------------------------------------
  -- Extension Associations                                                                                     --
  ----------------------------------------------------------------------------------------------------------------
  association [0..1] to E_Product                      as _MatExtension                 on  $projection.Material = _MatExtension.Product
  association [0..1] to E_Productplant                 as _PlantExtension               on  $projection.Material = _PlantExtension.Product
                                                                                        and $projection.MRPPlant = _PlantExtension.Plant


{

  key  Material.MRPPlant,
  key  Material.MRPArea,
  key  Material.Material,
  key  Material.MRPPlanningSegmentType,
  key  Material.MRPPlanningSegment,
  key  Material.MaterialShortageProfile,
  key  Material.MaterialShortageProfileCount,
  key  Material.FactoryCalendar, // needed as keyfield to be sure that it is filled

       concat(Material.Material,concat(Material.MRPPlant,concat(Material.MRPArea,concat(Material.MRPPlanningSegmentType,Material.MRPPlanningSegmentExternalCode)))) as MaterialSelectionIdentifier,

       _PlantVH.PlantName,
       _MRPAreaVH.MRPAreaText,
       Material.MaterialName,
       Material.PlantLanguage,
       Material.MaterialABCClassification,
       _MaterialStatusText.MRPValidMaterialStatusName,
       Material.MRPValidMaterialStatus,

       @ObjectModel: {
        virtualElement,
        readOnly: true,
        virtualElementCalculatedBy: 'ABAP:CL_PP_MRP_MAT_COV_SUP_TRA_EXIT',
        filter.transformedBy: 'ABAP:CL_MRP_CDS_SUP_FILTER_EXIT'
       }
       cast( '' as md_supplier)                                                                                                    as Supplier,
       @ObjectModel: {
        virtualElement,
        readOnly: true,
        virtualElementCalculatedBy: 'ABAP:CL_PP_MRP_MAT_COV_SUP_TRA_EXIT',
        filter.transformedBy: 'ABAP:CL_MRP_CDS_SUP_FILTER_EXIT'
       }
       cast ('' as md_supplier_name)                                                                                               as SupplierName,

       Material.NumberOfSupplier,

       Material.UnitOfMeasureDspNmbrOfDcmls,

       ---------------------------------------------------------------------------------------------------------
       -- Availability Cart Data                                                                              --
       ---------------------------------------------------------------------------------------------------------
       Material.AvailabilityChart,
       Material.WeeklyAvailabilityChart,

       ---------------------------------------------------------------------------------------------------------
       -- Text Fields                                                                                         --
       ---------------------------------------------------------------------------------------------------------
       Material.PurchasingGroup,
       _PurchasingGroupVH.PurchasingGroupName,


       Material.MaterialType,
       Material.MaterialTypeName,
       Material.MaterialGroup,
       Material.MaterialGroupName,

       cast(concat(Material.MaterialShortageProfile, Material.MaterialShortageProfileCount) as materialshortagedefinition)         as MaterialShortageDefinition,
       Material.MaterialShortageDefinitionName,

       Material.MRPController,
       _MRPController.MRPControllerName,
       Material.IsMarkedForDeletion,
       Material.LowLevelCode,
       Material.HasAcceptedShortage,

       ---------------------------------------------------------------------------------------------------------
       -- Dates                                                                                               --
       ---------------------------------------------------------------------------------------------------------
       @Semantics.businessDate.to: true
       Material.MaterialReplnmtLeadDurnEndDate,
       @Semantics.businessDate.to: true
       Material.TotalReplnmtLeadDurnEndDate,
       @Semantics.businessDate.to: true
       Material.ManualPlanningHorizonEndDate,
       @Semantics.businessDate.to: true
       Material.MRPSafetyDurationEndDate,
       Material.MaterialShortageStartDate,
       Material.MaterialShortageEndDate,
       Material.LastBufferUpdateDateTime,

       ---------------------------------------------------------------------------------------------------------
       -- Durations                                                                                           --
       ---------------------------------------------------------------------------------------------------------
       Material.MaterialPlannedDeliveryDurn,
       Material.MaterialPlannedProductionDurn,
       Material.MRPSafetyDuration,
       Material.TotalReplenishmentLeadDuration,
       Material.MaterialGoodsReceiptDuration,
       Material.PlanningTimeFenceInDays,
       Material.EvaluationHorizonInDays,
       Material.DaysOfSupplyDuration,
       Material.IntraDaySupplyDuration,
       Material.TimeTillShortageInCalendarDays,
       Material.MaterialShortageDuration,
       Material.MaterialShortageDurnInWorkdays,
       Material.DaysOfSupplyCriticality,
       Material.StockDaysSupplyDuration,
       Material.StockDaysSupplyCriticality,
       Material.StockIntraDaySupplyDuration,

       ---------------------------------------------------------------------------------------------------------
       -- Quantities                                                                                          --
       ---------------------------------------------------------------------------------------------------------
       @Semantics.unitOfMeasure: true
       @ObjectModel.foreignKey.association: '_UnitOfMeasure'
       Material.MaterialBaseUnit,
       @Semantics.quantity.unitOfMeasure: 'MaterialBaseUnit'
       case
        when Material.MaterialSafetyStockQty is null
          then cast ( 0 as materialsafetystockqty ) else Material.MaterialSafetyStockQty
       end                                                                                                                         as MaterialSafetyStockQty,
       @Semantics.quantity.unitOfMeasure: 'MaterialBaseUnit'
       Material.MRPAvailableStockQty,
       @Semantics.quantity.unitOfMeasure: 'MaterialBaseUnit'
       @UI.dataPoint.valueFormat.numberOfFractionalDigits: '_UnitOfMeasure.UnitOfMeasureDspNmbrOfDcmls'
       cast (Material.MaterialShortageQuantity as materialshortageqty)                                                             as MaterialShortageQuantity,
       @Semantics.quantity.unitOfMeasure: 'MaterialBaseUnit'
       case
        when  Material.MaterialReorderPointQty is null
          then cast( 0 as materialreorderpointqty ) else  Material.MaterialReorderPointQty
       end                                                                                                                         as MaterialReorderPointQty,
       ---------------------------------------------------------------------------------------------------------
       -- Time Till Shortage Filter Values                                                                    --
       ---------------------------------------------------------------------------------------------------------
       Material.HasMaterialShortageReplnmtLead,
       Material.HasShortageTotalReplnmtLead,
       Material.HasShortageManualPlanHorizon,
       Material.HasShortageMRPSafetyDuration,

       ---------------------------------------------------------------------------------------------------------
       -- Language Fallbacks                                                                                  --
       ---------------------------------------------------------------------------------------------------------
       //@ObjectModel.text.element:  [ 'MRPTypeName' ]

       Material.MRPType,
       case
         when _MRPTypeText[1: Language = $session.system_language ].MRPTypeName != ''
             then _MRPTypeText[1: Language = $session.system_language ].MRPTypeName
         when _MRPTypeTextPlant.MRPTypeName != ''
             then _MRPTypeTextPlant.MRPTypeName
         when _MRPTypeText[1: Language = 'E' ].MRPTypeName != ''
             then _MRPTypeText[1: Language = 'E' ].MRPTypeName
         else Material.MRPType
       end                                                                                                                         as MRPTypeName,

       Material.MaterialProcurementProfile,
       case
         when _MatlProcurementProfile._Text[1: Language = $session.system_language ].MaterialProcurementProfileName != ''
             then _MatlProcurementProfile._Text[1: Language = $session.system_language ].MaterialProcurementProfileName
         when _ProcurementProfileTextPlant.MaterialProcurementProfileName != ''
             then _ProcurementProfileTextPlant.MaterialProcurementProfileName
         when _MatlProcurementProfile._Text[1: Language = 'E' ].MaterialProcurementProfileName != ''
             then _MatlProcurementProfile._Text[1: Language = 'E' ].MaterialProcurementProfileName
         else Material.MaterialProcurementProfile
       end                                                                                                                         as MaterialProcurementProfileName,

       Material.MaterialProcurementCategory,
       case
         when _MatlProcurementCategory._Text[1: Language = $session.system_language ].MaterialProcurementCatName != ''
             then _MatlProcurementCategory._Text[1: Language = $session.system_language ].MaterialProcurementCatName
         when _ProcurementCategoryTextPlant.MaterialProcurementCatName != ''
             then _ProcurementCategoryTextPlant.MaterialProcurementCatName
         when _MatlProcurementCategory._Text[1: Language = 'E' ].MaterialProcurementCatName != ''
             then _MatlProcurementCategory._Text[1: Language = 'E' ].MaterialProcurementCatName
         else Material.MaterialProcurementCategory
       end                                                                                                                         as MaterialProcurementCatName,

       Material.MRPGroup,
       case
         when _MRPGroup._Text[1: Language = $session.system_language ].MRPGroupName != ''
             then _MRPGroup._Text[1: Language = $session.system_language ].MRPGroupName
         when _MRPGroupTextPlant.MRPGroupName != ''
             then _MRPGroupTextPlant.MRPGroupName
         when _MRPGroup._Text[1: Language = 'E' ].MRPGroupName != ''
             then _MRPGroup._Text[1: Language = 'E' ].MRPGroupName
         else Material.MRPGroup
       end                                                                                                                         as MRPGroupName,

       @ObjectModel.text.element:  [ 'MRPSafetyStockMethodText' ]
       Material.MRPSafetyStockMethod,
       @Semantics.text:true
       _SafetyStockMethodVH.SafetyStockMethodName                                                                                  as MRPSafetyStockMethodText,

       --------------------------------------------------------------------------------------------------------
       -- Additions for Fashion-Department
       --------------------------------------------------------------------------------------------------------

       cast ( Material.CrossPlantConfigurableProduct as satnr2 preserving type )                                                   as CrossPlantConfigurableProduct,

       Material.SegmentationStrategy, //segmentation strategy field

       cast ( Material.SegmentationIsRelevant as sgt_rel1 preserving type )                                                        as SegmentationIsRelevant, //segmentation relevant field


       cast('' as boolean preserving type)                                                                                         as SegmentationIsEmpty, // flag to check segmentation status for hiding in UI


       @Feature: 'BF:API_ESSENTIALSCOPE' //to hide column for onPremise, API is only active for cloud

       Material.ProductionProductHierarchy,
       @Feature: 'BF:API_ESSENTIALSCOPE' //to hide column for onPremise, API is only active for cloud

       _HierText.ProdUnivHierarchyText                                                                                             as ProductHierarchyText,
       @Feature: 'BF:API_ESSENTIALSCOPE' //to hide column for onPremise, API is only active for cloud

       Material.ProductionProductHierarchyNode,
       @Feature: 'BF:API_ESSENTIALSCOPE' //to hide column for onPremise, API is only active for cloud

       _HierNodeText.ProductHierarchyNodeText,

       Material.IssueCount,

       ---------------------------------------------------------------------------------------------------------
       -- Number of past due elements                                                                         --
       ---------------------------------------------------------------------------------------------------------
       Material.NmbrOfPastDueOpeningDateElmnts,
       Material.NumberOfPastDueStartDateElmnts,
       Material.NumberOfPastDueEndDateElements,
       Material.NmbrOfPastDueOpeningDateElmnts + Material.NumberOfPastDueStartDateElmnts + Material.NumberOfPastDueEndDateElements as NumberOfPastDueElements,

       ---------------------------------------------------------------------------------------------------------
       -- MRP Notes for Material                                                                              --
       ---------------------------------------------------------------------------------------------------------
       Material.MaterialHasMRPNote,
       Material.MRPMaterialNoteText,

       ---------------------------------------------------------------------------------------------------------
       -- Number of Rescheduling                                                                       --
       ---------------------------------------------------------------------------------------------------------
       Material.NumberOfRescheduleInElements,
       Material.NumberOfRescheduleOutElements,
       Material.NumberOfCancelProcesses,
       Material.NumberOfRescheduleInElements + Material.NumberOfRescheduleOutElements + Material.NumberOfCancelProcesses as NumberOfRescheduleElements,

       ----- Multi Adress Handling -----
       @ObjectModel.readOnly:true
       @ObjectModel.virtualElement
       @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_BP_MULTI_ADDR_BF_CALC_EXIT'
       cast(' ' as abap_boolean preserving type) as BPCustMultiAddrIsActive,

       ---------------------------------------------------------------------------------------------------------
       -- Associations                                                                                        --
       ---------------------------------------------------------------------------------------------------------
       _MRPAvailability, // association for avilibility chart popover

       _Supplier, // association for supplier popover

       _MRPController,
       Material._UnitOfMeasure
}
where _MRPType.MRPProcedure <> 'C' // exclude DDMRP materials

and
  (    Material.MRPPlanningSegmentType = '02'
    or Material.MRPPlanningSegmentType = '00'
  )
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"C_MRPAREAVALHELP",
"C_PLANTVH",
"C_PURCHASINGGROUPVALUEHELP",
"I_MATERIALCOVERAGE",
"I_MATLPROCUREMENTCATEGORY",
"I_MATLPROCUREMENTCATEGORYTEXT",
"I_MATLPROCUREMENTPROFILE",
"I_MATLPROCUREMENTPROFILETEXT",
"I_MRPCONTROLLER",
"I_MRPGROUP",
"I_MRPGROUPTEXT",
"I_MRPMATERIALSTATUSTEXT",
"I_MRPTYPE",
"I_MRPTYPETEXT",
"I_PRODUCTHIERARCHYNORMALNODET",
"I_PRODUNIVERSALHIERARCHYTEXT_2",
"I_SAFETYSTOCKMETHODVH",
"I_SDMAREAOFRESPONSIBILITY"
],
"ASSOCIATED":
[
"C_CACHESUPPLIER",
"C_MRPAREAVALHELP",
"C_MRPAVAILABILITY",
"C_PLANTVH",
"C_PURCHASINGGROUPVALUEHELP",
"E_PRODUCT",
"E_PRODUCTPLANT",
"I_MATLPROCUREMENTCATEGORY",
"I_MATLPROCUREMENTCATEGORYTEXT",
"I_MATLPROCUREMENTPROFILE",
"I_MATLPROCUREMENTPROFILETEXT",
"I_MRPCONTROLLER",
"I_MRPGROUP",
"I_MRPGROUPTEXT",
"I_MRPMATERIALSTATUSTEXT",
"I_MRPTYPE",
"I_MRPTYPETEXT",
"I_PRODUCTHIERARCHYNORMALNODET",
"I_PRODUNIVERSALHIERARCHYTEXT_2",
"I_SAFETYSTOCKMETHODVH",
"I_UNITOFMEASURE"
],
"BASE":
[
"I_MATERIALCOVERAGE"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/