I_PeggingAssignmentSum

DDL: I_PEGGINGASSIGNMENTSUM Type: view_entity COMPOSITE

Aggregated Pegging Assignments

I_PeggingAssignmentSum is a Composite CDS View that provides data about "Aggregated Pegging Assignments" in SAP S/4HANA. It reads from 1 data source (I_PeggingAssignment) and exposes 34 fields with key fields ReplenishmentElement, AssignedWBSElementInternalID, AlternateCostAssignmentObject, AcctAsgtGroupingWBSElmntIntID, Plant. It has 1 association to related views.

Data Sources (1)

SourceAliasJoin Type
I_PeggingAssignment I_PeggingAssignment from

Associations (1)

CardinalityTargetAliasCondition
[0..1] I_CostCenter _AlternateCostAssgmtCostCenter $projection.controllingarea = _AlternateCostAssgmtCostCenter.ControllingArea and $projection.CostCenter = _AlternateCostAssgmtCostCenter.CostCenter and ( _AlternateCostAssgmtCostCenter.ValidityStartDate <= $session.system_date and _AlternateCostAssgmtCostCenter.ValidityEndDate >= $session.system_date )

Annotations (7)

NameValueLevelField
AccessControl.authorizationCheck #CHECK view
EndUserText.label Aggregated Pegging Assignments view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #COMPOSITE view

Fields (34)

KeyFieldSource TableSource FieldDescription
KEY ReplenishmentElement
KEY AssignedWBSElementInternalID AssignedWBSElementInternalID WBS Element
KEY AlternateCostAssignmentObject AlternateCostAssignmentObject Breakpoint
KEY AcctAsgtGroupingWBSElmntIntID AcctAsgtGroupingWBSElmntIntID
KEY Plant Plant Valuation Area
Material Material Vehicle Model
AlternateCostAssignmentObjType AlternateCostAssignmentObjType
MRPElementCategory MRPElementCategory MRP Elmnt Ind.
ControllingArea _AcctAsgtGrpgWBSElmnt ControllingArea Controlling Area
WBSElmntAssgdMatlQuantity
WBSElmntAssgdMatlExssQuantity
WBSElmntAssgdMatlScrapQuantity
WBSElmntAssgdMatlLossQuantity
WBSElmntMatlCarryFwdQuantity
MaterialBaseUnit MaterialBaseUnit Valuation Unit
ReplnmtElmntTotalOrderQuantity ReplnmtElmntTotalOrderQuantity Totl. Order Qty
MaterialInStockQuantity
MaterialInProcurementQuantity
MaterialConsumedWithinGroupQty
MaterialConsumedOutOfGroupQty
MaterialInTransitQuantity
LastChangeDateTime
_Material _Material
_Plant _Plant
_MaterialPlant _MaterialPlant
_AssignedWBSElmnt _AssignedWBSElmnt
_AcctAsgtGrpgWBSElmnt _AcctAsgtGrpgWBSElmnt
_MatlQtyBaseUnit _MatlQtyBaseUnit
_AlternateCostAssgmtWBSElmnt _AlternateCostAssgmtWBSElmnt
_AlternateCostAssgmtTypeTxt _AlternateCostAssgmtTypeTxt
_MRPElemAccountAssgmtTypeText _MRPElemAccountAssgmtTypeText
_MRPElemCategoryText _MRPElemCategoryText
_AlternateCostAssgmtNtwkRtg _AlternateCostAssgmtNtwkRtg
_AlternateCostAssgmtCostCenter _AlternateCostAssgmtCostCenter

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 I_PeggingAssignmentSum.
-- 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.

CREATE VIEW I_PeggingAssignmentSum AS
SELECT
  cast (ReplnmtElmntWithoutSchdLn as pmmo_repobj_d) AS ReplenishmentElement,
  AssignedWBSElementInternalID,
  AlternateCostAssignmentObject,
  AcctAsgtGroupingWBSElmntIntID,
  Plant,
  Material,
  AlternateCostAssignmentObjType,
  MRPElementCategory,
  _AcctAsgtGrpgWBSElmnt.ControllingArea AS ControllingArea,
  sum(WBSElmntAssgdMatlQuantity) AS WBSElmntAssgdMatlQuantity,
  sum(WBSElmntAssgdMatlExssQuantity) AS WBSElmntAssgdMatlExssQuantity,
  sum(WBSElmntAssgdMatlScrapQuantity) AS WBSElmntAssgdMatlScrapQuantity,
  sum(WBSElmntAssgdMatlLossQuantity) AS WBSElmntAssgdMatlLossQuantity,
  sum(WBSElmntMatlCarryFwdQuantity) AS WBSElmntMatlCarryFwdQuantity,
  MaterialBaseUnit,
  ReplnmtElmntTotalOrderQuantity,
  sum(MaterialInStockQuantity) AS MaterialInStockQuantity,
  sum(MaterialInProcurementQuantity) AS MaterialInProcurementQuantity,
  sum(MaterialConsumedWithinGroupQty) AS MaterialConsumedWithinGroupQty,
  sum(MaterialConsumedOutOfGroupQty) AS MaterialConsumedOutOfGroupQty,
  sum(MaterialInTransitQuantity) AS MaterialInTransitQuantity,
  cast(max(LastChangeDateTime) as timestampl preserving type) AS LastChangeDateTime
FROM I_PeggingAssignment
LEFT OUTER JOIN I_CostCenter AS _AlternateCostAssgmtCostCenter ON controllingarea = _AlternateCostAssgmtCostCenter.ControllingArea AND CostCenter = _AlternateCostAssgmtCostCenter.CostCenter AND ( _AlternateCostAssgmtCostCenter.ValidityStartDate <= $session.system_date AND _AlternateCostAssgmtCostCenter.ValidityEndDate >= $session.system_date )  -- association [0..1]
;