PlndIndepRqmtPlanIndSum
Read PIR Keyfigures
PlndIndepRqmtPlanIndSum is a CDS View that provides data about "Read PIR Keyfigures" in SAP S/4HANA. It reads from 3 data sources (mara, marc, P_PlndIndepRqmtAllAttrib) and exposes 36 fields with key fields matnr, werks, berid, bedae, versb. It has 5 associations to related views. Part of development package PPH_FORECAST_DEMAND_MASS.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| mara | mara | inner |
| marc | marc | inner |
| P_PlndIndepRqmtAllAttrib | pir | from |
Associations (5)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_Plant | _Plant | pir.Plant = _Plant.Plant |
| [1..1] | I_MRPArea | _MRPArea | pir.MRPArea = _MRPArea.MRPArea |
| [1..1] | I_MRPController | _MRPController | marc.dispo = _MRPController.MRPController and pir.Plant = _MRPController.Plant |
| [1..1] | I_PlndIndepRqmtTypeText | _RqmtType | pir.PlndIndepRqmtType = _RqmtType.PlndIndepRqmtType and _RqmtType.Language = $session.system_language |
| [1..1] | I_PlndIndepRqmtMRPVersionText | _RqmtVersion | pir.PlndIndepRqmtVersion = _RqmtVersion.Version and _RqmtVersion.Language = $session.system_language |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PIRSUM | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.serviceQuality | #X | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| AbapCatalog.compiler.compareFilter | true | view |
Fields (36)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | matnr | P_PlndIndepRqmtAllAttrib | Product | Product Sold |
| KEY | werks | P_PlndIndepRqmtAllAttrib | Plant | Valuation Area |
| KEY | berid | P_PlndIndepRqmtAllAttrib | MRPArea | MRP Area |
| KEY | bedae | P_PlndIndepRqmtAllAttrib | PlndIndepRqmtType | |
| KEY | versb | P_PlndIndepRqmtAllAttrib | PlndIndepRqmtVersion | |
| KEY | per_sdat | |||
| PlndIndepRqmtInternalID | ||||
| perkz_master | marc | perkz | Period Type | |
| perkz_item | ||||
| per_edat | ||||
| DmndFcstIsDeleted | P_PlndIndepRqmtAllAttrib | DmndFcstIsDeleted | ||
| DmndFcstInPastIsAccepted | P_PlndIndepRqmtAllAttrib | DmndFcstInPastIsAccepted | ||
| plan_qty | P_PlndIndepRqmtAllAttrib | plan_qty | Planned Qty | |
| withdr_qty | P_PlndIndepRqmtAllAttrib | withdr_qty | Withdrawal Qty | |
| open_qty | P_PlndIndepRqmtAllAttrib | open_qty | Open Qty | |
| item_meins | P_PlndIndepRqmtAllAttrib | UnitOfMeasure | Unit Protected Qty | |
| pdatu | P_PlndIndepRqmtAllAttrib | pdatu | Settlement Date | |
| marc_lvorm | marc | lvorm | Stock del. flag | |
| mara_lvorm | mara | lvorm | Stock del. flag | |
| mara_meins | mara | meins | Valuation Unit | |
| marc_dpbed | t141_marc | dpbed | Ind. reqmt msg. | |
| mara_dpbed | t141_mara | dpbed | Ind. reqmt msg. | |
| lastchange | P_PlndIndepRqmtAllAttrib | lastchange | Time Stamp | |
| LastChangeDateendaslast_change_dats | ||||
| LastChangedByUser | P_PlndIndepRqmtAllAttrib | LastChangedByUser | User Name | |
| dispo | marc | dispo | MRP Controller | |
| RequirementPlan | P_PlndIndepRqmtAllAttrib | RequirementPlan | Requirements Plan | |
| RequirementSegment | P_PlndIndepRqmtAllAttrib | RequirementSegment | Req. Segment | |
| RequirementPlanIsExternal | P_PlndIndepRqmtAllAttrib | RequirementPlanIsExternal | ||
| PlndIndepRqmtIsActive | P_PlndIndepRqmtAllAttrib | PlndIndepRqmtIsActive | ||
| ProductName | P_PlndIndepRqmtAllAttrib | ProductName | Description | |
| PlantName | _Plant | PlantName | Plant Name | |
| MRPAreaText | _MRPArea | MRPAreaText | ||
| DmndFcstVersionText | _RqmtVersion | DmndFcstVersionText | ||
| MRPControllerName | _MRPController | MRPControllerName | Controller name | |
| RequirementTypeName | _RqmtType | PlndIndepRqmtTypeName |
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 PlndIndepRqmtPlanIndSum.
-- 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: PIRSUM
CREATE VIEW PlndIndepRqmtPlanIndSum AS
SELECT
pir.Product AS matnr,
pir.Plant AS werks,
pir.MRPArea AS berid,
pir.PlndIndepRqmtType AS bedae,
pir.PlndIndepRqmtVersion AS versb,
coalesce(cast(pir.per_sdat as pph_per_sdat preserving type),'00010101') AS per_sdat,
marc.perkz AS perkz_master,
coalesce(pir.perkz_item,'') AS perkz_item,
cast(pir.per_edat as pph_per_edat preserving type) AS per_edat,
pir.DmndFcstIsDeleted AS DmndFcstIsDeleted,
pir.DmndFcstInPastIsAccepted AS DmndFcstInPastIsAccepted,
pir.plan_qty AS plan_qty,
pir.withdr_qty AS withdr_qty,
pir.open_qty AS open_qty,
pir.UnitOfMeasure AS item_meins,
pir.pdatu AS pdatu,
marc.lvorm AS marc_lvorm,
mara.lvorm AS mara_lvorm,
mara.meins AS mara_meins,
t141_marc.dpbed AS marc_dpbed,
t141_mara.dpbed AS mara_dpbed,
pir.lastchange AS lastchange,
case when pir.LastChangeDate = fltp_to_dec( 0.0 as timestampl ) then fltp_to_dec( 99990101000000.0 as timestampl ) when pir.LastChangeDate is null then fltp_to_dec( 99990101000000.0 as timestampl ) else pir.LastChangeDate end as last_change_dats AS LastChangeDateendaslast_change_dats,
pir.LastChangedByUser AS LastChangedByUser,
marc.dispo AS dispo,
pir.RequirementPlan AS RequirementPlan,
pir.RequirementSegment AS RequirementSegment,
pir.RequirementPlanIsExternal AS RequirementPlanIsExternal,
pir.PlndIndepRqmtIsActive AS PlndIndepRqmtIsActive,
pir.ProductName AS ProductName,
_Plant.PlantName AS PlantName,
_MRPArea.MRPAreaText AS MRPAreaText,
_RqmtVersion.DmndFcstVersionText AS DmndFcstVersionText,
_MRPController.MRPControllerName AS MRPControllerName,
_RqmtType.PlndIndepRqmtTypeName AS RequirementTypeName
FROM P_PlndIndepRqmtAllAttrib AS pir
INNER JOIN marc ON /* join condition not captured in parsed metadata */
INNER JOIN mara ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_Plant AS _Plant ON pir.Plant = _Plant.Plant -- association [1..1]
LEFT OUTER JOIN I_MRPArea AS _MRPArea ON pir.MRPArea = _MRPArea.MRPArea -- association [1..1]
LEFT OUTER JOIN I_MRPController AS _MRPController ON marc.dispo = _MRPController.MRPController AND pir.Plant = _MRPController.Plant -- association [1..1]
LEFT OUTER JOIN I_PlndIndepRqmtTypeText AS _RqmtType ON pir.PlndIndepRqmtType = _RqmtType.PlndIndepRqmtType AND _RqmtType.Language = $session.system_language -- association [1..1]
LEFT OUTER JOIN I_PlndIndepRqmtMRPVersionText AS _RqmtVersion ON pir.PlndIndepRqmtVersion = _RqmtVersion.Version AND _RqmtVersion.Language = $session.system_language -- association [1..1]
;
Learn More
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- 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