P_JournalEntryHeaderHistory

DDL: P_JOURNALENTRYHEADERHISTORY SQL: PJNHEADERTRKDOC Type: view COMPOSITE

P_JournalEntryHeaderHistory is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_JournalEntry) and exposes 16 fields with key fields CompanyCode, AccountingDocument, FiscalYear.

Data Sources (1)

SourceAliasJoin Type
I_JournalEntry bkpf from

Annotations (8)

NameValueLevelField
AbapCatalog.sqlViewName PJNHEADERTRKDOC view
VDM.viewType #COMPOSITE view
AccessControl.authorizationCheck #NOT_REQUIRED view
ObjectModel.representativeKey AccountingDocument view
VDM.private true view
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.buffering.status #NOT_ALLOWED view
Metadata.ignorePropagatedAnnotations true view

Fields (16)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode I_JournalEntry CompanyCode
KEY AccountingDocument I_JournalEntry AccountingDocument
KEY FiscalYear I_JournalEntry FiscalYear
AccountingDocumentItem
Ledger I_JournalEntry Ledger
PostingDate I_JournalEntry PostingDate
DocumentDate I_JournalEntry DocumentDate
timestamp CreationTime
CreationTime CreationTime
AccountingDocumentCreationDate AccountingDocumentCreationDate
objectid
bkpf_tabkey
FinancialAccountType
GLAccount
AccountingDocumentType AccountingDocumentType
AccountingDocumentCategory AccountingDocumentCategory
@AbapCatalog.sqlViewName: 'PJNHEADERTRKDOC'
@VDM.viewType: #COMPOSITE
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ObjectModel.representativeKey: 'AccountingDocument'
@VDM.private:true
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.buffering.status: #NOT_ALLOWED
@Metadata.ignorePropagatedAnnotations: true

define view P_JournalEntryHeaderHistory
  as select from I_JournalEntry as bkpf
{
  key    bkpf.CompanyCode,
  key    bkpf.AccountingDocument,
  key    bkpf.FiscalYear,
         ''                                                                                                                                  as AccountingDocumentItem,
         bkpf.Ledger,
         bkpf.PostingDate,
         bkpf.DocumentDate,
         CreationTime                                                                                                                        as timestamp,
         CreationTime,
         AccountingDocumentCreationDate,
         replace(replace(concat( bkpf.mandt, concat( rpad(bkpf.CompanyCode, 4, '|'), concat( bkpf.AccountingDocument, bkpf.FiscalYear))), '|', '| |'), '|', '')                                   as objectid,
         replace(replace(concat( bkpf.mandt, concat( rpad(bkpf.CompanyCode, 4, '|'), concat( bkpf.AccountingDocument, concat( bkpf.FiscalYear, '000')))), '|', '| |'), '|', '')                   as bkpf_tabkey,
         ''                                                                                                                                  as FinancialAccountType,
         ''                                                                                                                                  as GLAccount,
         AccountingDocumentType,
         AccountingDocumentCategory
}
where
     AccountingDocumentCategory = 'B'
  or AccountingDocumentCategory = 'U'
  or AccountingDocumentCategory = ' '
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_JOURNALENTRY"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/