P_JP_IRDocumentHeader
P_JP_IRDocumentHeader is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_AccountingDocument) and exposes 14 fields with key fields SourceLedger, CompanyCode, FiscalYear, AccountingDocument, Ledger. It has 1 association to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_AccountingDocument | Header | inner |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_JournalEntry | _JournalEntry | $projection.CompanyCode = _JournalEntry.CompanyCode and $projection.FiscalYear = _JournalEntry.FiscalYear and $projection.AccountingDocument = _JournalEntry.AccountingDocument |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PJPIRDOCHD | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| ObjectModel.usageType.dataClass | #MIXED | view |
Fields (14)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | SourceLedger | I_GLAccountLineItem | SourceLedger | |
| KEY | CompanyCode | I_GLAccountLineItem | CompanyCode | |
| KEY | FiscalYear | I_GLAccountLineItem | FiscalYear | |
| KEY | AccountingDocument | I_GLAccountLineItem | AccountingDocument | |
| KEY | Ledger | I_GLAccountLineItem | Ledger | |
| KEY | ReferenceDocument | I_GLAccountLineItem | ReferenceDocument | |
| Supplier | I_GLAccountLineItem | Supplier | ||
| AccountingDocumentHeaderText | I_AccountingDocument | AccountingDocumentHeaderText | ||
| _SourceLedger | _SourceLedger | |||
| _CompanyCode | _CompanyCode | |||
| _FiscalYear | _FiscalYear | |||
| _JournalEntry | _JournalEntry | |||
| _Ledger | _Ledger | |||
| _Supplier | _Supplier |
@AbapCatalog.sqlViewName: 'PJPIRDOCHD'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.viewType: #COMPOSITE
@VDM.private:true
@ObjectModel: { usageType.serviceQuality: #D,
usageType.sizeCategory: #XXL,
usageType.dataClass: #MIXED }
//@EndUserText.label: 'Invoice Receipt Document Header List'
define view P_JP_IRDocumentHeader
as select distinct from I_GLAccountLineItem as I_GLAccountLineItem
inner join I_AccountingDocument as Header on I_GLAccountLineItem.CompanyCode = Header.CompanyCode
and I_GLAccountLineItem.FiscalYear = Header.FiscalYear
and I_GLAccountLineItem.AccountingDocument = Header.AccountingDocument
association [1..1] to I_JournalEntry as _JournalEntry on $projection.CompanyCode = _JournalEntry.CompanyCode
and $projection.FiscalYear = _JournalEntry.FiscalYear
and $projection.AccountingDocument = _JournalEntry.AccountingDocument
{
key I_GLAccountLineItem.SourceLedger,
key I_GLAccountLineItem.CompanyCode,
key I_GLAccountLineItem.FiscalYear,
key I_GLAccountLineItem.AccountingDocument,
key I_GLAccountLineItem.Ledger,
key I_GLAccountLineItem.ReferenceDocument,
I_GLAccountLineItem.Supplier,
Header.AccountingDocumentHeaderText,
_SourceLedger,
_CompanyCode,
_FiscalYear,
_JournalEntry,
_Ledger,
_Supplier
}
where
I_GLAccountLineItem.AccountingDocument <> I_GLAccountLineItem.ClearingAccountingDocument
and SpecialGLCode = ''
and FinancialAccountType = 'K'
and I_GLAccountLineItem.IsReversal <> 'X'
and I_GLAccountLineItem.IsReversed = ''
and FollowOnDocumentType is initial
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ACCOUNTINGDOCUMENT",
"I_GLACCOUNTLINEITEM"
],
"ASSOCIATED":
[
"I_COMPANYCODE",
"I_FISCALYEARFORCOMPANYCODE",
"I_JOURNALENTRY",
"I_LEDGER",
"I_SUPPLIER"
],
"BASE":
[
"I_GLACCOUNTLINEITEM"
],
"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