P_AR_LatestRefDoc

DDL: P_AR_LATESTREFDOC SQL: PLSTREFDOC Type: view COMPOSITE

P_AR_LatestRefDoc is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (P_AR_BranchPrintChar, P_AR_BranchPrintCharOfRefDoc) and exposes 7 fields with key fields CompanyCode, Branch, AR_PrintCharacter.

Data Sources (2)

SourceAliasJoin Type
P_AR_BranchPrintChar P_AR_BranchPrintChar from
P_AR_BranchPrintCharOfRefDoc P_AR_BranchPrintCharOfRefDoc left_outer

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PLSTREFDOC view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
VDM.viewType #COMPOSITE view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.dataClass #MIXED view
AccessControl.personalData.blocking #NOT_REQUIRED view
VDM.private true view

Fields (7)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode P_AR_BranchPrintChar CompanyCode
KEY Branch P_AR_BranchPrintChar Branch
KEY AR_PrintCharacter P_AR_BranchPrintChar AR_PrintCharacter
DocumentReferenceID DocumentReferenceID
AR_OfficialDocumentNumber
NumberOfCountedItems
DocumentClass DocumentClass
@AbapCatalog.sqlViewName: 'PLSTREFDOC'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@VDM.viewType: #COMPOSITE
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.dataClass: #MIXED
@AccessControl.personalData.blocking: #NOT_REQUIRED
@VDM.private: true
//@EndUserText.label: 'Private View Containaing the Latest Ref Doc'

define view P_AR_LatestRefDoc as select from P_AR_BranchPrintChar

left outer join P_AR_BranchPrintCharOfRefDoc on  P_AR_BranchPrintCharOfRefDoc.CompanyCode = P_AR_BranchPrintChar.CompanyCode
                                             and P_AR_BranchPrintCharOfRefDoc.Branch      = P_AR_BranchPrintChar.Branch
                                             and P_AR_BranchPrintCharOfRefDoc.AR_PrintCharacter  = P_AR_BranchPrintChar.AR_PrintCharacter
 {
  key P_AR_BranchPrintChar.CompanyCode,
  key P_AR_BranchPrintChar.Branch,
  key P_AR_BranchPrintChar.AR_PrintCharacter,
 // key P_AR_BranchPrintCharOfRefDoc.AccountingDocumentType,


  DocumentReferenceID,
  
  concat(concat(P_AR_BranchPrintChar.Branch,P_AR_BranchPrintChar.AR_PrintCharacter),AR_OfficialDocumentNumber) as AR_OfficialDocumentNumber,
  @DefaultAggregation: #SUM
  cast(AR_OfficialDocumentNumber as int4) as NumberOfCountedItems,
  
// DocumentDate,

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