P_JournalEntryItemHistory

DDL: P_JOURNALENTRYITEMHISTORY SQL: PFIGLJNITEMHIST Type: view COMPOSITE

P_JournalEntryItemHistory is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_JournalEntry, I_OperationalAcctgDocItem) and exposes 16 fields with key fields CompanyCode, AccountingDocument, FiscalYear, AccountingDocumentItem.

Data Sources (2)

SourceAliasJoin Type
I_JournalEntry bkpf left_outer
I_OperationalAcctgDocItem bseg from

Annotations (8)

NameValueLevelField
AbapCatalog.sqlViewName PFIGLJNITEMHIST 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_OperationalAcctgDocItem CompanyCode
KEY AccountingDocument I_OperationalAcctgDocItem AccountingDocument
KEY FiscalYear I_OperationalAcctgDocItem FiscalYear
KEY AccountingDocumentItem
Ledger I_JournalEntry Ledger
PostingDate I_JournalEntry PostingDate
DocumentDate I_JournalEntry DocumentDate
timestamp CreationTime
CreationTime CreationTime
AccountingDocumentCreationDate AccountingDocumentCreationDate
objectid
tabkey
FinancialAccountType I_OperationalAcctgDocItem FinancialAccountType
GLAccount I_OperationalAcctgDocItem GLAccount
AccountingDocumentCategory I_OperationalAcctgDocItem AccountingDocumentCategory
AccountingDocumentType I_OperationalAcctgDocItem AccountingDocumentType
@AbapCatalog.sqlViewName: 'PFIGLJNITEMHIST'
@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_JournalEntryItemHistory
  as select from    I_OperationalAcctgDocItem as bseg
    left outer join I_JournalEntry            as bkpf on  bseg.CompanyCode        = bkpf.CompanyCode
                                                      and bseg.FiscalYear         = bkpf.FiscalYear
                                                      and bseg.AccountingDocument = bkpf.AccountingDocument
{
  key    bseg.CompanyCode,
  key    bseg.AccountingDocument,
  key    bseg.FiscalYear,
  key    cast(bseg.AccountingDocumentItem as  docln6)                                                                                        as AccountingDocumentItem,
         bkpf.Ledger,
         bkpf.PostingDate,
         bkpf.DocumentDate,
         CreationTime                                                                                                                        as timestamp,
         CreationTime,
         AccountingDocumentCreationDate,
         replace(replace(concat( bseg.mandt, concat( rpad(bseg.CompanyCode, 4, '|'), concat( bseg.AccountingDocument, bseg.FiscalYear))), '|', '| |'), '|', '')                                   as objectid,
         replace(replace(concat( bseg.mandt, concat( rpad(bseg.CompanyCode, 4, '|'), concat( bseg.AccountingDocument, concat( bseg.FiscalYear , AccountingDocumentItem)))), '|', '| |'), '|', '') as tabkey,
         bseg.FinancialAccountType,
         bseg.GLAccount,
         bseg.AccountingDocumentCategory,
         bseg.AccountingDocumentType
}
where
  bseg.AccountingDocumentCategory <> 'C'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_JOURNALENTRY",
"I_OPERATIONALACCTGDOCITEM"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/