P_RelatedAccountingDocument

DDL: P_RELATEDACCOUNTINGDOCUMENT Type: view_entity COMPOSITE

Related Accounting Documents

P_RelatedAccountingDocument is a Composite CDS View that provides data about "Related Accounting Documents" in SAP S/4HANA. It reads from 1 data source (I_JournalEntry) and exposes 64 fields with key fields ReferenceDocumentType, OriginalReferenceDocument, CompanyCode, FiscalYear, AccountingDocument. It has 1 association to related views.

Data Sources (1)

SourceAliasJoin Type
I_JournalEntry I_JournalEntry from

Associations (1)

CardinalityTargetAliasCondition
[0..1] I_ReferenceDocumentType _PrivatReferenceDocumentType $projection.PrivatReferenceDocumentType = _PrivatReferenceDocumentType.ReferenceDocumentType

Annotations (8)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label Related Accounting Documents view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #A view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #COMPOSITE view
VDM.private true view

Fields (64)

KeyFieldSource TableSource FieldDescription
KEY ReferenceDocumentType ReferenceDocumentType
KEY OriginalReferenceDocument OriginalReferenceDocument
KEY CompanyCode CompanyCode
KEY FiscalYear FiscalYear
KEY AccountingDocument AccountingDocument
AccountingDocumentType AccountingDocumentType
DocumentDate DocumentDate
PostingDate PostingDate
FiscalPeriod FiscalPeriod
AccountingDocumentCreationDate AccountingDocumentCreationDate
CreationTime CreationTime
LastChangeDate LastChangeDate
ExchangeRateDate ExchangeRateDate
AccountingDocCreatedByUser AccountingDocCreatedByUser
TransactionCode TransactionCode
IntercompanyTransaction IntercompanyTransaction
DocumentReferenceID DocumentReferenceID
RecurringAccountingDocument RecurringAccountingDocument
ReverseDocument ReverseDocument
ReverseDocumentFiscalYear ReverseDocumentFiscalYear
AccountingDocumentHeaderText AccountingDocumentHeaderText
ExchangeRate ExchangeRate
AccountingDocumentCategory AccountingDocumentCategory
BusinessTransactionType BusinessTransactionType
BatchInputSession BatchInputSession
FinancialManagementArea FinancialManagementArea
ReferenceDocumentLogicalSystem ReferenceDocumentLogicalSystem
Branch Branch
IsDiscountDocument IsDiscountDocument
Reference1InDocumentHeader Reference1InDocumentHeader
Reference2InDocumentHeader Reference2InDocumentHeader
InvoiceReceiptDate InvoiceReceiptDate
Ledger Ledger
LedgerGroup LedgerGroup
AlternativeReferenceDocument AlternativeReferenceDocument
IsReversal IsReversal
IsReversed IsReversed
TaxReportingDate TaxReportingDate
ReversalReason ReversalReason
ParkingDate ParkingDate
ParkingTime ParkingTime
CompanyCodeCurrency CompanyCodeCurrency
AdditionalCurrency1 AdditionalCurrency1
AdditionalCurrency2 AdditionalCurrency2
TaxIsCalculatedAutomatically TaxIsCalculatedAutomatically
NmbrOfPages NmbrOfPages
PrivatReferenceDocumentType
_AccountingDocumentCategory _AccountingDocumentCategory
_AccountingDocumentType _AccountingDocumentType
_AccountingDocumentTypeText _AccountingDocumentTypeText
_AdditionalCurrency1 _AdditionalCurrency1
_AdditionalCurrency2 _AdditionalCurrency2
_BusinessTransactionType _BusinessTransactionType
_BusinessTransactionTypeText _BusinessTransactionTypeText
_CompanyCode _CompanyCode
_CompanyCodeCurrency _CompanyCodeCurrency
_FiscalYear _FiscalYear
_Ledger _Ledger
_LedgerGroup _LedgerGroup
_LedgerText _LedgerText
_OperationalAcctgDocItem _OperationalAcctgDocItem
_ReferenceDocumentType _ReferenceDocumentType
_PrivatReferenceDocumentType _PrivatReferenceDocumentType
_User _User
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Related Accounting Documents'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
    serviceQuality: #A,
    sizeCategory: #XXL,
    dataClass: #MIXED
}
@VDM: {
  viewType: #COMPOSITE,
  private:true
}
define view entity P_RelatedAccountingDocument
  as select from I_JournalEntry
  association [0..1] to I_ReferenceDocumentType as _PrivatReferenceDocumentType on $projection.PrivatReferenceDocumentType = _PrivatReferenceDocumentType.ReferenceDocumentType
{
  key  ReferenceDocumentType,
  key  OriginalReferenceDocument,
  key  CompanyCode,
  key  FiscalYear,       
  key  AccountingDocument,
       AccountingDocumentType,
       DocumentDate,
       PostingDate,
       FiscalPeriod,
       AccountingDocumentCreationDate,
       CreationTime,
       LastChangeDate,
       ExchangeRateDate,
       AccountingDocCreatedByUser,
       TransactionCode,
       IntercompanyTransaction,
       DocumentReferenceID,
       RecurringAccountingDocument,
       ReverseDocument,
       ReverseDocumentFiscalYear,
       AccountingDocumentHeaderText,
       ExchangeRate,
       AccountingDocumentCategory,
       BusinessTransactionType,
       BatchInputSession,
       FinancialManagementArea,
       ReferenceDocumentLogicalSystem,
       Branch,
       IsDiscountDocument,
       Reference1InDocumentHeader,
       Reference2InDocumentHeader,
       InvoiceReceiptDate,
       Ledger,
       LedgerGroup,
       AlternativeReferenceDocument,
       IsReversal,
       IsReversed,
       TaxReportingDate,
       ReversalReason,
       ParkingDate,
       ParkingTime,
       CompanyCodeCurrency,
       AdditionalCurrency1,
       AdditionalCurrency2,
       TaxIsCalculatedAutomatically,
       NmbrOfPages,
       cast('BKPF' as fis_awtyp) as PrivatReferenceDocumentType,

       /* Associations */
       _AccountingDocumentCategory,
       _AccountingDocumentType,
       _AccountingDocumentTypeText,
       _AdditionalCurrency1,
       _AdditionalCurrency2,
       _BusinessTransactionType,
       _BusinessTransactionTypeText,
       _CompanyCode,
       _CompanyCodeCurrency,
       _FiscalYear,
       _Ledger,
       _LedgerGroup,
       _LedgerText,
       _OperationalAcctgDocItem,
       _ReferenceDocumentType,
       _PrivatReferenceDocumentType,
       _User
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_JOURNALENTRY"
],
"ASSOCIATED":
[
"I_ACCOUNTINGDOCUMENTCATEGORY",
"I_ACCOUNTINGDOCUMENTTYPE",
"I_ACCOUNTINGDOCUMENTTYPETEXT",
"I_BUSINESSTRANSACTIONTYPE",
"I_BUSTRANSACTIONTYPETEXT",
"I_COMPANYCODE",
"I_CURRENCY",
"I_FISCALYEARFORCOMPANYCODE",
"I_LEDGER",
"I_LEDGERGROUP",
"I_LEDGERTEXT",
"I_OPERATIONALACCTGDOCITEM",
"I_REFERENCEDOCUMENTTYPE",
"I_USER"
],
"BASE":
[
"I_JOURNALENTRY"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/