R_ManageJournalEntryHistory

DDL: R_MANAGEJOURNALENTRYHISTORY Type: view_entity TRANSACTIONAL

Journal Entry - History

R_ManageJournalEntryHistory is a Transactional CDS View that provides data about "Journal Entry - History" in SAP S/4HANA. It reads from 1 data source (R_MngJrnlEntrChangeDocument) and exposes 25 fields with key fields CompanyCode, Ledger, AccountingDocument, ChangeDocument, DatabaseTable. It has 7 associations to related views.

Data Sources (1)

SourceAliasJoin Type
R_MngJrnlEntrChangeDocument _Change from

Associations (7)

CardinalityTargetAliasCondition
[0..1] I_JournalFieldElementText _FieldText _Change.DatabaseTable = _FieldText.DatabaseTable and _Change.ChangeDocDatabaseTableField = _FieldText.DatabaseTableFieldName and _FieldText.Language = $session.system_language
[0..1] I_DataElementLabelText _DeleText _Change.ChangeDocDatabaseTableField = _DeleText.ABAPDataElement and _DeleText.Language = $session.system_language
[0..1] I_CompanyCode _CompanyCode _Change.CompanyCode = _CompanyCode.CompanyCode
[0..1] I_UserContactCard _ChangedByContactCard $projection.ChangedBy = _ChangedByContactCard.ContactCardID
[0..1] I_LedgerText _LedgerText _Change.Ledger = _LedgerText.Ledger and _LedgerText.Language = $session.system_language
[0..1] I_AccountingDocumentTypeText _AccountingDocumentTypeText $projection.AccountingDocumentType = _AccountingDocumentTypeText.AccountingDocumentType and _AccountingDocumentTypeText.Language = $session.system_language
[0..1] I_AccountingDocumentCategoryT _AccountingDocumentCategoryT $projection.AccountingDocumentCategory = _AccountingDocumentCategoryT.AccountingDocumentCategory and _AccountingDocumentCategoryT.Language = $session.system_language

Annotations (8)

NameValueLevelField
AccessControl.authorizationCheck #MANDATORY view
EndUserText.label Journal Entry - History view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #TRANSACTIONAL view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view

Fields (25)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode R_MngJrnlEntrChangeDocument CompanyCode Receiver Company Code
KEY Ledger R_MngJrnlEntrChangeDocument Ledger Ledger
KEY AccountingDocument R_MngJrnlEntrChangeDocument AccountingDocument Journal Entry
KEY ChangeDocument R_MngJrnlEntrChangeDocument ChangeDocument Document Number
KEY DatabaseTable R_MngJrnlEntrChangeDocument DatabaseTable Table Name
KEY ChangeDocTableKey R_MngJrnlEntrChangeDocument ChangeDocTableKey
KEY ChangeDocDatabaseTableField R_MngJrnlEntrChangeDocument ChangeDocDatabaseTableField
KEY JournalEntryItem R_MngJrnlEntrChangeDocument JournalEntryItem Journal Entry Item
KEY FiscalYear R_MngJrnlEntrChangeDocument FiscalYear G/L Fiscal Year
DocumentDate R_MngJrnlEntrChangeDocument DocumentDate Journal Entry Date
PostingDate R_MngJrnlEntrChangeDocument PostingDate Posting Date for GR
ChangedBy R_MngJrnlEntrChangeDocument ChangedBy User Name
LastChangeTime R_MngJrnlEntrChangeDocument LastChangeTime Time changed
ChangedFieldOldValue
ChangedFieldNewValue
LastChangedDate R_MngJrnlEntrChangeDocument LastChangedDate Created On
CreationDate R_MngJrnlEntrChangeDocument CreationDate Time Stamp
CreationTime R_MngJrnlEntrChangeDocument CreationTime Time of Change
CompanyCodeName _CompanyCode CompanyCodeName Company Name
LedgerName _LedgerText LedgerName Ledger Name
AccountingDocumentType AccountingDocumentType Journal Entry Type
AccountingDocumentCategory Journal Entry Category
_ChangedByContactCard _ChangedByContactCard
_AccountingDocumentTypeText _AccountingDocumentTypeText
_AccountingDocumentCategoryT _AccountingDocumentCategoryT

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view R_ManageJournalEntryHistory.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.

CREATE VIEW R_ManageJournalEntryHistory AS
SELECT
  _Change.CompanyCode AS CompanyCode,
  _Change.Ledger AS Ledger,
  _Change.AccountingDocument AS AccountingDocument,
  _Change.ChangeDocument AS ChangeDocument,
  _Change.DatabaseTable AS DatabaseTable,
  _Change.ChangeDocTableKey AS ChangeDocTableKey,
  _Change.ChangeDocDatabaseTableField AS ChangeDocDatabaseTableField,
  _Change.JournalEntryItem AS JournalEntryItem,
  _Change.FiscalYear AS FiscalYear,
  _Change.DocumentDate AS DocumentDate,
  _Change.PostingDate AS PostingDate,
  _Change.ChangedBy AS ChangedBy,
  _Change.LastChangeTime AS LastChangeTime,
  cast( _Change.ChangedFieldOldValue as fac_mje_fieldval_old preserving type ) AS ChangedFieldOldValue,
  cast( _Change.ChangedFieldNewValue as fac_mje_fieldval_new preserving type ) AS ChangedFieldNewValue,
  _Change.LastChangedDate AS LastChangedDate,
  _Change.CreationDate AS CreationDate,
  _Change.CreationTime AS CreationTime,
  _CompanyCode.CompanyCodeName AS CompanyCodeName,
  _LedgerText.LedgerName AS LedgerName,
  AccountingDocumentType,
  cast(AccountingDocumentCategory as fis_bstat preserving type ) AS AccountingDocumentCategory
FROM R_MngJrnlEntrChangeDocument AS _Change
LEFT OUTER JOIN I_JournalFieldElementText AS _FieldText ON _Change.DatabaseTable = _FieldText.DatabaseTable AND _Change.ChangeDocDatabaseTableField = _FieldText.DatabaseTableFieldName AND _FieldText.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN I_DataElementLabelText AS _DeleText ON _Change.ChangeDocDatabaseTableField = _DeleText.ABAPDataElement AND _DeleText.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON _Change.CompanyCode = _CompanyCode.CompanyCode  -- association [0..1]
LEFT OUTER JOIN I_UserContactCard AS _ChangedByContactCard ON ChangedBy = _ChangedByContactCard.ContactCardID  -- association [0..1]
LEFT OUTER JOIN I_LedgerText AS _LedgerText ON _Change.Ledger = _LedgerText.Ledger AND _LedgerText.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN I_AccountingDocumentTypeText AS _AccountingDocumentTypeText ON AccountingDocumentType = _AccountingDocumentTypeText.AccountingDocumentType AND _AccountingDocumentTypeText.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN I_AccountingDocumentCategoryT AS _AccountingDocumentCategoryT ON AccountingDocumentCategory = _AccountingDocumentCategoryT.AccountingDocumentCategory AND _AccountingDocumentCategoryT.Language = $session.system_language  -- association [0..1]
;