P_GetLastPostingDate

DDL: P_GETLASTPOSTINGDATE SQL: PGETLASTPOSTDATE Type: view COMPOSITE

P_GetLastPostingDate is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_MaterialDocumentRecord, I_PurchasingDocumentItem) and exposes 3 fields with key fields PurchaseOrder, PurchaseOrderItem.

Data Sources (2)

SourceAliasJoin Type
I_MaterialDocumentRecord _MaterialDocumentRecord inner
I_PurchasingDocumentItem _PurchasingDocumentItem from

Annotations (9)

NameValueLevelField
AbapCatalog.preserveKey true view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.sqlViewName PGETLASTPOSTDATE view
AccessControl.authorizationCheck #NOT_REQUIRED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #S view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.private true view
VDM.viewType #COMPOSITE view

Fields (3)

KeyFieldSource TableSource FieldDescription
KEY PurchaseOrder PurchaseOrder
KEY PurchaseOrderItem PurchaseOrderItem
LastPostingDateOfMaterialDoc
@AbapCatalog.preserveKey: true
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.sqlViewName: 'PGETLASTPOSTDATE'
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #S
@ClientHandling.algorithm: #SESSION_VARIABLE

@VDM.private: true
@VDM.viewType: #COMPOSITE
define view P_GetLastPostingDate as select from I_PurchasingDocumentItem as _PurchasingDocumentItem


 inner join I_MaterialDocumentRecord as _MaterialDocumentRecord
         on _PurchasingDocumentItem.PurchasingDocument     = _MaterialDocumentRecord.PurchaseOrder
        and _PurchasingDocumentItem.PurchasingDocumentItem = _MaterialDocumentRecord.PurchaseOrderItem 

{
        key PurchaseOrder,
        key PurchaseOrderItem,
        max(_MaterialDocumentRecord.PostingDate) as LastPostingDateOfMaterialDoc
}
      where _PurchasingDocumentItem.IsCompletelyDelivered = 'X'

   group by PurchaseOrder, PurchaseOrderItem  

/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_MATERIALDOCUMENTRECORD",
"I_PURCHASINGDOCUMENTITEM"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/