P_PurOrdSingleScheduleLineHlp2

DDL: P_PURORDSINGLESCHEDULELINEHLP2 SQL: PMMPURORDSSHLP2 Type: view COMPOSITE

P_PurOrdSingleScheduleLineHlp2 is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_PurgDocScheduleLine, P_PurOrdSingleScheduleLineHlp1) and exposes 4 fields with key fields PurchasingDocument, PurchasingDocumentItem, ScheduleLineDeliveryDate.

Data Sources (2)

SourceAliasJoin Type
I_PurgDocScheduleLine I_PurgDocScheduleLine inner
P_PurOrdSingleScheduleLineHlp1 P_PurOrdSingleScheduleLineHlp1 from

Annotations (7)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.preserveKey true view
AbapCatalog.compiler.compareFilter true view
VDM.viewType #COMPOSITE view
VDM.private true view
AbapCatalog.sqlViewName PMMPURORDSSHLP2 view
AccessControl.authorizationCheck #PRIVILEGED_ONLY view

Fields (4)

KeyFieldSource TableSource FieldDescription
KEY PurchasingDocument I_PurgDocScheduleLine PurchasingDocument
KEY PurchasingDocumentItem I_PurgDocScheduleLine PurchasingDocumentItem
KEY ScheduleLineDeliveryDate I_PurgDocScheduleLine ScheduleLineDeliveryDate
ScheduleLineDeliveryTime
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.preserveKey: true
@AbapCatalog.compiler.compareFilter: true
@VDM.viewType: #COMPOSITE
@VDM.private: true
@AbapCatalog.sqlViewName: 'PMMPURORDSSHLP2'
@AccessControl.authorizationCheck: #PRIVILEGED_ONLY

// Helper view to get latest Delivery Time if there are multiple Schedule lines having the same Delivery Date


define view P_PurOrdSingleScheduleLineHlp2 as select from P_PurOrdSingleScheduleLineHlp1 as P_PurOrdSingleScheduleLineHlp1  
                                inner join I_PurgDocScheduleLine as I_PurgDocScheduleLine 
                                on  P_PurOrdSingleScheduleLineHlp1.PurchasingDocument       = I_PurgDocScheduleLine.PurchasingDocument
                                and P_PurOrdSingleScheduleLineHlp1.PurchasingDocumentItem   = I_PurgDocScheduleLine.PurchasingDocumentItem
                                and P_PurOrdSingleScheduleLineHlp1.ScheduleLineDeliveryDate = I_PurgDocScheduleLine.ScheduleLineDeliveryDate

  {  key I_PurgDocScheduleLine.PurchasingDocument as PurchasingDocument,
     key  I_PurgDocScheduleLine.PurchasingDocumentItem,
     key  I_PurgDocScheduleLine.ScheduleLineDeliveryDate , 
     min( I_PurgDocScheduleLine.ScheduleLineDeliveryTime ) as ScheduleLineDeliveryTime
  }
  
group by I_PurgDocScheduleLine.PurchasingDocument, 
         I_PurgDocScheduleLine.PurchasingDocumentItem, 
         I_PurgDocScheduleLine.ScheduleLineDeliveryDate            
 /*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_PURGDOCSCHEDULELINE",
"P_PURORDSINGLESCHEDULELINEHLP1"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/