P_RU_RealReversedDocument
P_RU_RealReversedDocument is a Consumption CDS View in SAP S/4HANA. It reads from 2 data sources (I_JournalEntry, P_RU_AcctgDocReferenceID) and exposes 30 fields with key fields CompanyCode, AccountingDocument, FiscalYear.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_JournalEntry | ReversalDoc | from |
| P_RU_AcctgDocReferenceID | ReversedDoc | inner |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| VDM.private | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| AbapCatalog.sqlViewName | PRURREVERSEDDOC | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| ObjectModel.usageType.serviceQuality | #B | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view |
Fields (30)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | P_RU_AcctgDocReferenceID | CompanyCode | |
| KEY | AccountingDocument | P_RU_AcctgDocReferenceID | AccountingDocument | |
| KEY | FiscalYear | P_RU_AcctgDocReferenceID | FiscalYear | |
| AccountingDocumentType | P_RU_AcctgDocReferenceID | AccountingDocumentType | ||
| PostingDate | P_RU_AcctgDocReferenceID | PostingDate | ||
| TaxReportingDate | P_RU_AcctgDocReferenceID | TaxReportingDate | ||
| DocumentReferenceID | P_RU_AcctgDocReferenceID | DocumentReferenceID | ||
| ReferenceDocumentType | P_RU_AcctgDocReferenceID | ReferenceDocumentType | ||
| OriginalReferenceDocumentCntxt | P_RU_AcctgDocReferenceID | OriginalReferenceDocumentCntxt | ||
| OriginalReferenceDocumentNum | P_RU_AcctgDocReferenceID | OriginalReferenceDocumentNum | ||
| IsReversal | P_RU_AcctgDocReferenceID | IsReversal | ||
| IsReversed | P_RU_AcctgDocReferenceID | IsReversed | ||
| ReversalDocumentBKPF | P_RU_AcctgDocReferenceID | ReverseDocument | ||
| ReversalDocumentFiscalYearBKPF | P_RU_AcctgDocReferenceID | ReverseDocumentFiscalYear | ||
| ReversalDocument | I_JournalEntry | AccountingDocument | ||
| ReversalDocumentFiscalYear | I_JournalEntry | FiscalYear | ||
| ReversalDocumentType | I_JournalEntry | AccountingDocumentType | ||
| ReversalDocumentPostingDate | I_JournalEntry | PostingDate | ||
| ReversalDocumentTaxRepDate | I_JournalEntry | TaxReportingDate | ||
| ReversalDocumentReferenceID | I_JournalEntry | DocumentReferenceID | ||
| ReversalDocumentRefDocType | I_JournalEntry | ReferenceDocumentType | ||
| ReversalReferenceDocumentCntxt | I_JournalEntry | ReversalReferenceDocumentCntxt | ||
| ReversalReferenceDocument | I_JournalEntry | ReversalReferenceDocument | ||
| ReversalDocumentIsReversal | I_JournalEntry | IsReversal | ||
| ReversalDocumentIsReversed | I_JournalEntry | IsReversed | ||
| ReversedDocumentBKPF | I_JournalEntry | ReverseDocument | ||
| ReversedDocumentFiscalYearBKPF | I_JournalEntry | ReverseDocumentFiscalYear | ||
| LedgerGroup | I_JournalEntry | LedgerGroup | ||
| CompanyCodeCurrency | I_JournalEntry | CompanyCodeCurrency | ||
| RU_ReverseType |
@VDM.private: true
@VDM.viewType: #CONSUMPTION
@AbapCatalog.sqlViewName: 'PRURREVERSEDDOC'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.authorizationCheck: #CHECK
@ObjectModel.usageType: {
serviceQuality: #B,
sizeCategory: #XXL,
dataClass: #TRANSACTIONAL
}
define view P_RU_RealReversedDocument
as select from I_JournalEntry as ReversalDoc
inner join P_RU_AcctgDocReferenceID as ReversedDoc on ReversedDoc.CompanyCode = ReversalDoc.CompanyCode
and ReversedDoc.ReferenceDocumentType = ReversalDoc.ReferenceDocumentType
and ReversedDoc.OriginalReferenceDocumentCntxt = ReversalDoc.ReversalReferenceDocumentCntxt
and ReversedDoc.OriginalReferenceDocumentNum = ReversalDoc.ReversalReferenceDocument
and ReversedDoc.SenderLogicalSystem = ReversalDoc.SenderLogicalSystem
and ReversedDoc.LedgerGroup = ReversalDoc.LedgerGroup
{
key ReversedDoc.CompanyCode,
key ReversedDoc.AccountingDocument,
key ReversedDoc.FiscalYear,
ReversedDoc.AccountingDocumentType,
ReversedDoc.PostingDate,
ReversedDoc.TaxReportingDate,
ReversedDoc.DocumentReferenceID,
ReversedDoc.ReferenceDocumentType,
ReversedDoc.OriginalReferenceDocumentCntxt,
ReversedDoc.OriginalReferenceDocumentNum,
ReversedDoc.IsReversal,
ReversedDoc.IsReversed,
ReversedDoc.ReverseDocument as ReversalDocumentBKPF,
ReversedDoc.ReverseDocumentFiscalYear as ReversalDocumentFiscalYearBKPF,
ReversalDoc.AccountingDocument as ReversalDocument,
ReversalDoc.FiscalYear as ReversalDocumentFiscalYear,
ReversalDoc.AccountingDocumentType as ReversalDocumentType,
ReversalDoc.PostingDate as ReversalDocumentPostingDate,
ReversalDoc.TaxReportingDate as ReversalDocumentTaxRepDate,
ReversalDoc.DocumentReferenceID as ReversalDocumentReferenceID,
ReversalDoc.ReferenceDocumentType as ReversalDocumentRefDocType,
ReversalDoc.ReversalReferenceDocumentCntxt,
ReversalDoc.ReversalReferenceDocument,
ReversalDoc.IsReversal as ReversalDocumentIsReversal,
ReversalDoc.IsReversed as ReversalDocumentIsReversed,
ReversalDoc.ReverseDocument as ReversedDocumentBKPF,
ReversalDoc.ReverseDocumentFiscalYear as ReversedDocumentFiscalYearBKPF,
ReversalDoc.LedgerGroup,
ReversalDoc.CompanyCodeCurrency,
'REAL' as RU_ReverseType
}
where
ReversedDoc.IsReversed = 'X'
and ReversalDoc.IsReversal = 'X'
and ReversedDoc.AccountingDocumentCategory <> 'U'
and ReversalDoc.AccountingDocumentCategory <> 'U'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_JOURNALENTRY",
"P_RU_ACCTGDOCREFERENCEID"
],
"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