P_ProdAllocSalesSchedLine
Product Allocation Sales Order Schedule Lines
P_ProdAllocSalesSchedLine is a Consumption CDS View that provides data about "Product Allocation Sales Order Schedule Lines" in SAP S/4HANA. It reads from 2 data sources (P_ProdAllocQtyAssgmtOrderItem, I_SalesDocumentScheduleLine) and exposes 11 fields with key fields SalesDocument, SalesDocumentItem. Part of development package PRODUCT_ALLOCATION_OBJECT.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| P_ProdAllocQtyAssgmtOrderItem | QA | from |
| I_SalesDocumentScheduleLine | SL | inner |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PALSLSORDSCHEDL | view | |
| EndUserText.label | Product Allocation Sales Order Schedule Lines | view | |
| VDM.private | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view |
Fields (11)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | SalesDocument | I_SalesDocumentScheduleLine | SalesDocument | |
| KEY | SalesDocumentItem | I_SalesDocumentScheduleLine | SalesDocumentItem | |
| ScheduleLineOrderQuantity | ||||
| OrderQuantityUnit | I_SalesDocumentScheduleLine | OrderQuantityUnit | ||
| CorrectedQtyInOrderQtyUnit | ||||
| DeliveredQtyInOrderQtyUnit | ||||
| CumltvDlvrdBaseUnitOfMeasure | CDQ | CumltvDlvrdBaseUnitOfMeasure | ||
| CumulativeDeliveredQty | CDQ | CumulativeDeliveredQty | ||
| ConfdOrderQtyByMatlAvailCheck | ||||
| RequestedDeliveryDate | ||||
| ProductAllocationPeriodEndDate |
@AbapCatalog.sqlViewName: 'PALSLSORDSCHEDL'
@EndUserText.label: 'Product Allocation Sales Order Schedule Lines'
@VDM.private: true
@VDM.viewType: #CONSUMPTION
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
define view P_ProdAllocSalesSchedLine
as select from P_ProdAllocQtyAssgmtOrderItem as QA
inner join I_SalesDocumentScheduleLine as SL
on QA.ProdAllocAssignedOrder = SL.SalesDocument
and QA.ProdAllocAssignedOrderItem = SL.SalesDocumentItem
and QA.ProdAllocAssignedOrderType = '01'
left outer to one join P_ProdAllocItmCumltvDlvrdQts as CDQ
on QA.ProdAllocAssignedOrder = CDQ.DocumentNumber
and QA.ProdAllocAssignedOrderItem = CDQ.ItemNumber
/*association[0..1]to P_ProdAllocSalesStatus as _ProdAllocSalesStatus on $projection.SalesDocument = _ProdAllocSalesStatus.SalesDocument
and $projection.SalesDocumentItem = _ProdAllocSalesStatus.SalesDocumentItem*/
{
//Key
key SL.SalesDocument,
key SL.SalesDocumentItem,
// key ProdAllocSchedLineType,
sum(SL.ScheduleLineOrderQuantity) as ScheduleLineOrderQuantity,
SL.OrderQuantityUnit,
sum(SL.CorrectedQtyInOrderQtyUnit) as CorrectedQtyInOrderQtyUnit,
sum(SL.DeliveredQtyInOrderQtyUnit) as DeliveredQtyInOrderQtyUnit,
CDQ.CumltvDlvrdBaseUnitOfMeasure as CumltvDlvrdBaseUnitOfMeasure,
CDQ.CumulativeDeliveredQty as CumulativeDeliveredQty,
sum(SL.ConfdOrderQtyByMatlAvailCheck) as ConfdOrderQtyByMatlAvailCheck,
min(SL.DeliveryDate) as RequestedDeliveryDate,
max(SL.DeliveryDate) as ProductAllocationPeriodEndDate,
//coalesce( _ProdAllocSalesStatus.NrOfNotFullyConfdSchedLines, 0 )
sum( case when SL.ConfdOrderQtyByMatlAvailCheck < SL.ScheduleLineOrderQuantity
then 1
else 0
end )
as NrOfNotFullyConfdSchedLines
}
where SL.OrderQuantityUnit <> ''
and SL.RequirementsClass <> ''
group by
SL.SalesDocument,
SL.SalesDocumentItem,
SL.OrderQuantityUnit,
CDQ.CumulativeDeliveredQty,
CDQ.CumltvDlvrdBaseUnitOfMeasure //,
//_ProdAllocSalesStatus.NrOfNotFullyConfdSchedLines
Learn More
- 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 Annotations — A Complete Guide
- 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