C_MaterialShortageDefinition

DDL: C_MATERIALSHORTAGEDEFINITION SQL: CMATSHORTDEF Type: view CONSUMPTION

MRP Material Shortage Definition

C_MaterialShortageDefinition is a Consumption CDS View that provides data about "MRP Material Shortage Definition" in SAP S/4HANA. It reads from 1 data source (I_MaterialShortageDefinition) and exposes 7 fields with key fields MaterialShortageProfile, MaterialShortageProfileCount. It has 1 association to related views.

SAP Help Documentation

CategoryCDS Views for Material Requirements Planning
Purpose
This CDS view retrieves the material shortage definitions that are assigned to a user. Material shortage definitions are used in Material Requirements Planning to determine how shortages and uncovered requirements are calculated. This CDS view provides the data to answer the following business questions: Which material shortage definitions are assigned to a user? To help you decide which CDS view to use for your purposes, SAP has introduced the annotation ObjectModel.supportedCapabilities that indicates the most appropriate use cases for each CDS view. To find out what use cases are best supported by this CDS view, access the entry of the CDS view in the View Browser app and find the values for this annotation under the Annotation tab. For more information, see Supported Capabilities for CDS Views .

Prerequisites
Authorizations Users who want to use this CDS view must have a role with the following restriction types set to read access: PP_MRP_CTRLR ( MRP Controller ) These restriction types are edited in the Maintain Business Roles app. Configuration The CDS view retrieves the material shortage definitions based on the material shortage profile that is assigned to a user in your configuration settings. The following configuration activities are available to configure and assign material shortage profiles: Define Material Shortage Profiles Assign Material Shortage Profile to Users If no material shortage profile is assigned to a user, the CDS view retrieves the material shortage definitions from the default profile.

Structure
Important Fields Important fields in this view include the following: Field Name Description MATERIALSHORTAGEDEFINITIONNAME Shortage Def. Name RECEIPTCATEGORYGROUP Supply Groups UNCOVEREDDEMANDISCALCULATED Calc. Uncovered Dmnd DEMANDCATEGORYGROUP Demand Groups MATERIALSHORTAGEDEFINITION Shortage Definition EVALUATIONHORIZONINDAYS Evaluation Horizon MATERIALSHORTAGEPROFILECOUNT Profile Counter MATERIALSHORTAGEPROFILE Shortage Profile

View on SAP Help Portal →

Data Sources (1)

SourceAliasJoin Type
I_MaterialShortageDefinition I_MaterialShortageDefinition from

Associations (1)

CardinalityTargetAliasCondition
[0..1] P_MaterialShortageProfileUser _ProfileUser _ProfileUser.UserID = $session.user and _ProfileUser.MaterialShortageProfile = $projection.MaterialShortageProfile

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName CMATSHORTDEF view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
EndUserText.label MRP Material Shortage Definition view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #M view
ObjectModel.usageType.dataClass #CUSTOMIZING view
ObjectModel.alternativeKey.uniqueness #UNIQUE view
VDM.viewType #CONSUMPTION view
Search.searchable true view

Fields (7)

KeyFieldSource TableSource FieldDescription
KEY MaterialShortageProfile MaterialShortageProfile Shortage Prf.
KEY MaterialShortageProfileCount MaterialShortageProfileCount Counter
MaterialShortageDefinition
DemandCategoryGroup DemandCategoryGroup Demand Groups
ReceiptCategoryGroup ReceiptCategoryGroup Supply Groups
EvaluationHorizonInDays EvaluationHorizonInDays Eval. Horizon
MaterialShortageDefinitionName MaterialShortageDefinitionName

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view C_MaterialShortageDefinition.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: CMATSHORTDEF

CREATE VIEW C_MaterialShortageDefinition AS
SELECT
  MaterialShortageProfile,
  MaterialShortageProfileCount,
  concat(MaterialShortageProfile, MaterialShortageProfileCount) AS MaterialShortageDefinition,
  DemandCategoryGroup,
  ReceiptCategoryGroup,
  EvaluationHorizonInDays,
  MaterialShortageDefinitionName
FROM I_MaterialShortageDefinition
LEFT OUTER JOIN P_MaterialShortageProfileUser AS _ProfileUser ON _ProfileUser.UserID = $session.user AND _ProfileUser.MaterialShortageProfile = MaterialShortageProfile  -- association [0..1]
;