P_PE_PurchaseOriginalJrnlEntry
Original Journal Entry for Peru
P_PE_PurchaseOriginalJrnlEntry is a Consumption CDS View that provides data about "Original Journal Entry for Peru" in SAP S/4HANA. It reads from 2 data sources (I_GLAccountLineItemRawData, I_JournalEntry) and exposes 7 fields with key fields SourceLedger, CompanyCode, FiscalYear, AccountingDocument, LedgerGLLineItem. Part of development package GLO_FIN_IS_PE.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_GLAccountLineItemRawData | GLAccountLineItem | inner |
| I_JournalEntry | JournalEntry | from |
Annotations (9)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PPEPUROJE | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.private | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.dataClass | #MIXED | view |
Fields (7)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | SourceLedger | I_GLAccountLineItemRawData | SourceLedger | |
| KEY | CompanyCode | I_GLAccountLineItemRawData | CompanyCode | |
| KEY | FiscalYear | I_GLAccountLineItemRawData | FiscalYear | |
| KEY | AccountingDocument | I_GLAccountLineItemRawData | AccountingDocument | |
| KEY | LedgerGLLineItem | I_GLAccountLineItemRawData | LedgerGLLineItem | |
| DocumentDate | ||||
| DocumentReferenceID |
@AbapCatalog.sqlViewName: 'PPEPUROJE'
@AbapCatalog.compiler.compareFilter: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.private:true
@VDM.viewType: #CONSUMPTION
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.dataClass: #MIXED
define view P_PE_PurchaseOriginalJrnlEntry
as select from I_JournalEntry as JournalEntry
inner join I_GLAccountLineItemRawData as GLAccountLineItem on JournalEntry.CompanyCode = GLAccountLineItem.CompanyCode
and JournalEntry.AccountingDocument = GLAccountLineItem.AccountingDocument
and JournalEntry.FiscalYear = GLAccountLineItem.FiscalYear
left outer to one join I_JournalEntry as InvoiceReference on GLAccountLineItem.CompanyCode = InvoiceReference.CompanyCode
and GLAccountLineItem.InvoiceReference = InvoiceReference.AccountingDocument
and GLAccountLineItem.InvoiceReferenceFiscalYear = InvoiceReference.FiscalYear
left outer to one join I_GLAccountLineItemRawData as ClearedLineItem on JournalEntry.CompanyCode = ClearedLineItem.CompanyCode
and JournalEntry.AccountingDocument = ClearedLineItem.ClearingJournalEntry
and JournalEntry.FiscalYear = ClearedLineItem.ClearingJournalEntryFiscalYear
and GLAccountLineItem.SourceLedger = ClearedLineItem.SourceLedger
and ClearedLineItem.FinancialAccountType = 'K'
and ClearedLineItem.InvoiceReference = ''
and ( JournalEntry.AccountingDocument <> ClearedLineItem.AccountingDocument
or JournalEntry.FiscalYear <> ClearedLineItem.FiscalYear )
left outer to one join I_JournalEntry as OriginalJournalEntry on ClearedLineItem.CompanyCode = OriginalJournalEntry.CompanyCode
and ClearedLineItem.AccountingDocument = OriginalJournalEntry.AccountingDocument
and ClearedLineItem.FiscalYear = OriginalJournalEntry.FiscalYear
{
key GLAccountLineItem.SourceLedger,
key GLAccountLineItem.CompanyCode,
key GLAccountLineItem.FiscalYear,
key GLAccountLineItem.AccountingDocument,
key GLAccountLineItem.LedgerGLLineItem,
cast( coalesce( InvoiceReference.DocumentDate, OriginalJournalEntry.DocumentDate ) as fipe_original_document_date preserving type) as DocumentDate,
cast( coalesce( InvoiceReference.DocumentReferenceID, OriginalJournalEntry.DocumentReferenceID ) as fis_xblnr1 preserving type ) as DocumentReferenceID
}
where GLAccountLineItem.FinancialAccountType = 'K'
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