P_AR_JournalEntry
P_AR_JournalEntry is a Consumption CDS View in SAP S/4HANA. It reads from 1 data source (I_JournalEntry) and exposes 30 fields with key fields CompanyCode, FiscalYear, AccountingDocument. It has 1 association to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_JournalEntry | JournalEntry | from |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..*] | I_OneTimeAccountBP | _OneTimeAccountBP | JournalEntry.CompanyCode = _OneTimeAccountBP.CompanyCode and JournalEntry.FiscalYear = _OneTimeAccountBP.FiscalYear and JournalEntry.AccountingDocument = _OneTimeAccountBP.AccountingDocument |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PARJOURNALENTRY | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| VDM.viewType | #CONSUMPTION | view | |
| VDM.private | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view |
Fields (30)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | I_JournalEntry | CompanyCode | |
| KEY | FiscalYear | I_JournalEntry | FiscalYear | |
| KEY | AccountingDocument | I_JournalEntry | AccountingDocument | |
| FiscalPeriod | I_JournalEntry | FiscalPeriod | ||
| PostingDate | I_JournalEntry | PostingDate | ||
| DocumentDate | I_JournalEntry | DocumentDate | ||
| TaxReportingDate | I_JournalEntry | TaxReportingDate | ||
| AccountingDocumentType | I_JournalEntry | AccountingDocumentType | ||
| AccountingDocumentCategory | I_JournalEntry | AccountingDocumentCategory | ||
| DocumentReferenceID | I_JournalEntry | DocumentReferenceID | ||
| NmbrOfPagesendasj_1anopgasNmbrOfPages | ||||
| AccountingDocumentHeaderText | I_JournalEntry | AccountingDocumentHeaderText | ||
| IsReversal | I_JournalEntry | IsReversal | ||
| IsReversed | I_JournalEntry | IsReversed | ||
| ReverseDocument | I_JournalEntry | ReverseDocument | ||
| ReverseDocumentFiscalYear | I_JournalEntry | ReverseDocumentFiscalYear | ||
| ReversalReferenceDocument | I_JournalEntry | ReversalReferenceDocument | ||
| OriginalReferenceDocument | I_JournalEntry | OriginalReferenceDocument | ||
| ReferenceDocumentType | I_JournalEntry | ReferenceDocumentType | ||
| ReferenceDocumentLogicalSystem | I_JournalEntry | ReferenceDocumentLogicalSystem | ||
| ExchangeRateDate | I_JournalEntry | ExchangeRateDate | ||
| ExchangeRate | ||||
| LogicalSystem | I_JournalEntry | LogicalSystem | ||
| CompanyCodeCurrency | I_JournalEntry | CompanyCodeCurrency | ||
| TransactionCurrency | ||||
| AdditionalCurrency1 | I_JournalEntry | AdditionalCurrency1 | ||
| AdditionalCurrency2 | I_JournalEntry | AdditionalCurrency2 | ||
| _CompanyCode | _CompanyCode | |||
| _OneTimeAccountBP | _OneTimeAccountBP | |||
| _AccountingDocumentTypeText | _AccountingDocumentTypeText |
@AbapCatalog.sqlViewName: 'PARJOURNALENTRY'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@VDM.viewType: #CONSUMPTION
@VDM.private: true
@ClientHandling.algorithm: #SESSION_VARIABLE
define view P_AR_JournalEntry
as
select from I_JournalEntry as JournalEntry
association [0..*] to I_OneTimeAccountBP as _OneTimeAccountBP on JournalEntry.CompanyCode = _OneTimeAccountBP.CompanyCode
and JournalEntry.FiscalYear = _OneTimeAccountBP.FiscalYear
and JournalEntry.AccountingDocument = _OneTimeAccountBP.AccountingDocument
{
key JournalEntry.CompanyCode,
key JournalEntry.FiscalYear,
key JournalEntry.AccountingDocument,
JournalEntry.FiscalPeriod,
JournalEntry.PostingDate,
JournalEntry.DocumentDate,
JournalEntry.TaxReportingDate,
cast(
case
when JournalEntry.TaxReportingDate = '00000000' then JournalEntry.PostingDate
when JournalEntry.TaxReportingDate <> '00000000' then JournalEntry.TaxReportingDate
end
as glo_reporting_date preserving type ) as ReportingDate,
JournalEntry.AccountingDocumentType,
JournalEntry.AccountingDocumentCategory,
JournalEntry.DocumentReferenceID,
cast(
case length( JournalEntry.DocumentReferenceID )
when 13
then substring( JournalEntry.DocumentReferenceID,1,4 )
when 14
then substring( JournalEntry.DocumentReferenceID,1,5 )
end as fiar_branch preserving type
) as AR_Branch,
case length( JournalEntry.DocumentReferenceID )
when 13
then substring( JournalEntry.DocumentReferenceID,1,4 )
when 14
then substring( JournalEntry.DocumentReferenceID,2,4 )
end as AR_Branch4Digits,
cast(
case length( JournalEntry.DocumentReferenceID )
when 13
then substring( JournalEntry.DocumentReferenceID,5,1 )
when 14
then substring( JournalEntry.DocumentReferenceID,6,1 )
else ''
end as j_1apchar preserving type
) as AR_PrintCharacter,
cast(
case length( JournalEntry.DocumentReferenceID )
when 13
then substring( JournalEntry.DocumentReferenceID,6,8 )
when 14
then substring( JournalEntry.DocumentReferenceID,7,8 )
end as fiar_odn
) as AR_OfficialDocumentNumber,
cast(
case
when JournalEntry.NmbrOfPages = '000' or JournalEntry.NmbrOfPages = ''
then '001'
else JournalEntry.NmbrOfPages
end as j_1anopg
) as NmbrOfPages,
JournalEntry.AccountingDocumentHeaderText,
JournalEntry.IsReversal,
JournalEntry.IsReversed,
JournalEntry.ReverseDocument,
JournalEntry.ReverseDocumentFiscalYear,
JournalEntry.ReversalReferenceDocument,
JournalEntry.OriginalReferenceDocument,
JournalEntry.ReferenceDocumentType,
cast(
case
when JournalEntry.ReferenceDocumentType = 'VBRK' or JournalEntry.ReferenceDocumentType = 'CF3PS'
then 'X'
else ''
end as flag
) as IsDocumentFromSD,
JournalEntry.ReferenceDocumentLogicalSystem,
JournalEntry.ExchangeRateDate,
cast( JournalEntry.ExchangeRate as fis_exchange_rate preserving type ) as ExchangeRate,
JournalEntry.LogicalSystem,
JournalEntry.CompanyCodeCurrency,
cast( JournalEntry.TransactionCurrency as fis_rwcur preserving type ) as TransactionCurrency,
JournalEntry.AdditionalCurrency1,
JournalEntry.AdditionalCurrency2,
_CompanyCode,
_OneTimeAccountBP,
_AccountingDocumentTypeText
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_JOURNALENTRY"
],
"ASSOCIATED":
[
"I_ACCOUNTINGDOCUMENTTYPETEXT",
"I_COMPANYCODE",
"I_ONETIMEACCOUNTBP"
],
"BASE":
[
"I_JOURNALENTRY"
],
"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