P_LatestGIRltdMatDocDateTime

DDL: P_LATESTGIRLTDMATDOCDATETIME SQL: PLTSTGIRLTDTIME Type: view BASIC

P_LatestGIRltdMatDocDateTime is a Basic CDS View in SAP S/4HANA. It reads from 2 data sources (I_SDDocumentProcessFlow, P_LatestGIRltdMatDocDate) and exposes 4 fields with key fields PrecedingDocument, PrecedingDocumentCategory.

Data Sources (2)

SourceAliasJoin Type
I_SDDocumentProcessFlow Flow from
P_LatestGIRltdMatDocDate MaxDate inner

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName PLTSTGIRLTDTIME view
AbapCatalog.compiler.compareFilter true view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.private true view
VDM.viewType #BASIC view

Fields (4)

KeyFieldSource TableSource FieldDescription
KEY PrecedingDocument I_SDDocumentProcessFlow PrecedingDocument
KEY PrecedingDocumentCategory I_SDDocumentProcessFlow PrecedingDocumentCategory
MaxCreationDate P_LatestGIRltdMatDocDate MaxCreationDate
MaxCreationTime
@AbapCatalog.sqlViewName: 'PLTSTGIRLTDTIME'
@AbapCatalog.compiler.compareFilter: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.private: true
@VDM.viewType: #BASIC

define view P_LatestGIRltdMatDocDateTime 
as select from I_SDDocumentProcessFlow as Flow
  inner join P_LatestGIRltdMatDocDate as MaxDate
    on Flow.CreationDate = MaxDate.MaxCreationDate   
{
  key Flow.PrecedingDocument,
  key Flow.PrecedingDocumentCategory,
  MaxDate.MaxCreationDate as MaxCreationDate,
  max(CreationTime) as MaxCreationTime  
}
where Flow.SubsequentDocumentCategory = 'R'         
   or Flow.SubsequentDocumentCategory = 'h'
  
group by Flow.PrecedingDocument,
         Flow.PrecedingDocumentCategory,
         MaxDate.MaxCreationDate