C_MaterialShortageDefinition
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
| Category | CDS 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
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
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_MaterialShortageDefinition | I_MaterialShortageDefinition | from |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | P_MaterialShortageProfileUser | _ProfileUser | _ProfileUser.UserID = $session.user and _ProfileUser.MaterialShortageProfile = $projection.MaterialShortageProfile |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| 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)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| 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]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA