P_AR_InvoiceAcctgDocuments
P_AR_InvoiceAcctgDocuments is a Composite CDS View in SAP S/4HANA. It reads from 6 data sources and exposes 25 fields with key fields CompanyCode, AccountingDocument, FiscalYear, DocumentReferenceID, BranchPrefix.
Data Sources (6)
| Source | Alias | Join Type |
|---|---|---|
| I_StRpJournalEntryLog | _ReportedItemsLog | left_outer |
| I_StRpJournalEntryLog | _ReportedItemsLog | left_outer |
| I_AR_OfficialDocNmbrRnge | I_AR_OfficialDocNmbrRnge | inner |
| I_AR_OfficialDocNmbrRnge | I_AR_OfficialDocNmbrRnge | left_outer |
| P_AR_BranchPrintCharOfRefDoc | P_AR_BranchPrintCharOfRefDoc | from |
| P_AR_BranchPrintCharOfRefDoc | P_AR_BranchPrintCharOfRefDoc | union_all |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PINVACCDOC | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | 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 (25)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | P_AR_BranchPrintCharOfRefDoc | CompanyCode | |
| KEY | AccountingDocument | P_AR_BranchPrintCharOfRefDoc | AccountingDocument | |
| KEY | FiscalYear | P_AR_BranchPrintCharOfRefDoc | FiscalYear | |
| KEY | DocumentReferenceID | P_AR_BranchPrintCharOfRefDoc | DocumentReferenceID | |
| KEY | BranchPrefix | P_AR_BranchPrintCharOfRefDoc | BranchPrefix | |
| KEY | Branch | P_AR_BranchPrintCharOfRefDoc | Branch | |
| KEY | DocumentClass | I_AR_OfficialDocNmbrRnge | DocumentClass | |
| KEY | AR_PrintCharacter | P_AR_BranchPrintCharOfRefDoc | AR_PrintCharacter | |
| KEY | AR_OfficialDocumentNumber | AR_OfficialDocumentNumber | ||
| KEY | StatryRptCategory | I_StRpJournalEntryLog | StatryRptCategory | |
| KEY | StatryRptgEntity | I_StRpJournalEntryLog | StatryRptgEntity | |
| KEY | StatryRptRunID | I_StRpJournalEntryLog | StatryRptRunID | |
| CompanyCode | ||||
| KEY | AccountingDocument | P_AR_BranchPrintCharOfRefDoc | AccountingDocument | |
| KEY | FiscalYear | P_AR_BranchPrintCharOfRefDoc | FiscalYear | |
| KEY | DocumentReferenceID | P_AR_BranchPrintCharOfRefDoc | DocumentReferenceID | |
| KEY | BranchPrefix | P_AR_BranchPrintCharOfRefDoc | BranchPrefix | |
| KEY | Branch | P_AR_BranchPrintCharOfRefDoc | Branch | |
| KEY | DocumentClass | P_AR_BranchPrintCharOfRefDoc | DocumentClass | |
| KEY | AR_PrintCharacter | P_AR_BranchPrintCharOfRefDoc | AR_PrintCharacter | |
| KEY | AR_OfficialDocumentNumber | AR_OfficialDocumentNumber | ||
| KEY | StatryRptCategory | I_StRpJournalEntryLog | StatryRptCategory | |
| KEY | StatryRptgEntity | I_StRpJournalEntryLog | StatryRptgEntity | |
| KEY | StatryRptRunID | I_StRpJournalEntryLog | StatryRptRunID | |
| ReportingDate | ReportingDate |
@AbapCatalog.sqlViewName: 'PINVACCDOC'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@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: 'Relevant Documents Of Official Document Numbering'
define view P_AR_InvoiceAcctgDocuments as select from P_AR_BranchPrintCharOfRefDoc
inner join I_AR_OfficialDocNmbrRnge
on ( P_AR_BranchPrintCharOfRefDoc.CompanyCode = I_AR_OfficialDocNmbrRnge.CompanyCode )
//// on ( P_AR_BranchPrintCharOfRefDoc.CompanyCode = I_AR_OfficialDocNmbrRnge.CompanyCode or P_AR_BranchPrintCharOfRefDoc.CompanyCode is null or P_AR_BranchPrintCharOfRefDoc.CompanyCode = ' ' )
and P_AR_BranchPrintCharOfRefDoc.Branch = I_AR_OfficialDocNmbrRnge.Branch
and P_AR_BranchPrintCharOfRefDoc.AR_PrintCharacter = I_AR_OfficialDocNmbrRnge.AR_PrintCharacter
and ( P_AR_BranchPrintCharOfRefDoc.AR_OfficialDocumentNumber >= I_AR_OfficialDocNmbrRnge.RefDocNmbrRngeLowrLmt
and P_AR_BranchPrintCharOfRefDoc.AR_OfficialDocumentNumber <= I_AR_OfficialDocNmbrRnge.RefDocNmbrRngeUprLmt )
left outer join I_StRpJournalEntryLog as _ReportedItemsLog on _ReportedItemsLog.CompanyCode = P_AR_BranchPrintCharOfRefDoc.CompanyCode
and _ReportedItemsLog.AccountingDocument = P_AR_BranchPrintCharOfRefDoc.AccountingDocument
and _ReportedItemsLog.FiscalYear = P_AR_BranchPrintCharOfRefDoc.FiscalYear
{
key P_AR_BranchPrintCharOfRefDoc.CompanyCode,
key P_AR_BranchPrintCharOfRefDoc.AccountingDocument,
key P_AR_BranchPrintCharOfRefDoc.FiscalYear,
key P_AR_BranchPrintCharOfRefDoc.DocumentReferenceID,
key P_AR_BranchPrintCharOfRefDoc.BranchPrefix,
key P_AR_BranchPrintCharOfRefDoc.Branch,
key I_AR_OfficialDocNmbrRnge.DocumentClass,
key P_AR_BranchPrintCharOfRefDoc.AR_PrintCharacter,
key AR_OfficialDocumentNumber,
key _ReportedItemsLog.StatryRptCategory,
key _ReportedItemsLog.StatryRptgEntity,
key _ReportedItemsLog.StatryRptRunID,
ReportingDate
}
union all
select from P_AR_BranchPrintCharOfRefDoc
left outer join I_AR_OfficialDocNmbrRnge
on P_AR_BranchPrintCharOfRefDoc.CompanyCode = I_AR_OfficialDocNmbrRnge.CompanyCode
and P_AR_BranchPrintCharOfRefDoc.Branch = I_AR_OfficialDocNmbrRnge.Branch
and P_AR_BranchPrintCharOfRefDoc.AR_PrintCharacter = I_AR_OfficialDocNmbrRnge.AR_PrintCharacter
left outer join I_StRpJournalEntryLog as _ReportedItemsLog on _ReportedItemsLog.CompanyCode = P_AR_BranchPrintCharOfRefDoc.CompanyCode
and _ReportedItemsLog.AccountingDocument = P_AR_BranchPrintCharOfRefDoc.AccountingDocument
and _ReportedItemsLog.FiscalYear = P_AR_BranchPrintCharOfRefDoc.FiscalYear
{
key P_AR_BranchPrintCharOfRefDoc.CompanyCode,
key P_AR_BranchPrintCharOfRefDoc.AccountingDocument,
key P_AR_BranchPrintCharOfRefDoc.FiscalYear,
key P_AR_BranchPrintCharOfRefDoc.DocumentReferenceID,
key P_AR_BranchPrintCharOfRefDoc.BranchPrefix,
key P_AR_BranchPrintCharOfRefDoc.Branch,
key P_AR_BranchPrintCharOfRefDoc.DocumentClass,
key P_AR_BranchPrintCharOfRefDoc.AR_PrintCharacter,
key AR_OfficialDocumentNumber,
key _ReportedItemsLog.StatryRptCategory,
key _ReportedItemsLog.StatryRptgEntity,
key _ReportedItemsLog.StatryRptRunID,
ReportingDate
}
where ( I_AR_OfficialDocNmbrRnge.CompanyCode is null ) and ( I_AR_OfficialDocNmbrRnge.AR_PrintCharacter is null
) and ( I_AR_OfficialDocNmbrRnge.Branch is null )
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_AR_OFFICIALDOCNMBRRNGE",
"I_STRPJOURNALENTRYLOG",
"P_AR_BRANCHPRINTCHAROFREFDOC"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
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