P_ManageJournalEntryEtag

DDL: P_MANAGEJOURNALENTRYETAG Type: view_entity COMPOSITE

Journal Entry Etag

P_ManageJournalEntryEtag is a Composite CDS View that provides data about "Journal Entry Etag" in SAP S/4HANA. It reads from 1 data source (I_ChangeDocument) and exposes 3 fields with key field ChangeDocObject.

Data Sources (1)

SourceAliasJoin Type
I_ChangeDocument cdhdr from

Annotations (8)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label Journal Entry Etag view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #COMPOSITE view
VDM.private true view

Fields (3)

KeyFieldSource TableSource FieldDescription
KEY ChangeDocObject I_ChangeDocument ChangeDocObject
LastChangeDate
clientNULLasChangeDocCreationDateTime
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Journal Entry Etag'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
  serviceQuality: #X,
  sizeCategory: #XXL,
  dataClass: #MIXED
}

@VDM: {
  viewType: #COMPOSITE,
  private: true
}
define view entity P_ManageJournalEntryEtag
as 

select from I_ChangeDocument     as cdhdr

{

  key cdhdr.ChangeDocObject,
  
      max (cdhdr.CreationDate) as LastChangeDate,
      
      max ( dats_tims_to_tstmp( cdhdr.CreationDate,
                                cdhdr.CreationTime,
                                'UTC',
                                $session.client,
                                'NULL' ))  as ChangeDocCreationDateTime
  
}
where
  cdhdr.CreationDate > dats_add_days($session.system_date, -7, 'INITIAL') and 
  (
       cdhdr.ChangeDocObjectClass = 'BELEG'
    or cdhdr.ChangeDocObjectClass = 'BELEGR'
    or cdhdr.ChangeDocObjectClass = 'ISJP_IT'
  )
group by cdhdr.ChangeDocObject

//where

//  (

//     _JournalEntry.AccountingDocumentCategory = ''  // Normal document

//  or _JournalEntry.AccountingDocumentCategory = 'A' // Clearing Document

//  or _JournalEntry.AccountingDocumentCategory = 'B' // Reset clearing document

//  or _JournalEntry.AccountingDocumentCategory = 'C' // Balance Carryforward and Balance Adjustments from Migration

//  or _JournalEntry.AccountingDocumentCategory = 'J' // Closing Operations (postings are not made to record type 0)

//  or _JournalEntry.AccountingDocumentCategory = 'L' // Posting Not in Leading Ledger

//  or _JournalEntry.AccountingDocumentCategory = 'O' // Financial Statements: Open Entry

//  or _JournalEntry.AccountingDocumentCategory = 'S' // Noted items

//  or _JournalEntry.AccountingDocumentCategory = 'U' // Posting in General Ledger Only

//  )

//  and

//  (

//     _JournalEntry.SubLedgerAcctLineItemType between '07000' and '07209'

//  or

//  //Additionaly for the transaction list of asset accounting

//     _JournalEntry.SubLedgerAcctLineItemType between '07900' and '07906'

//  or _JournalEntry.SubLedgerAcctLineItemType =       '07940'

//  )

//group by 

//_JournalEntry.CompanyCode,

//_JournalEntry.FiscalYear,

//_JournalEntry.AccountingDocument,

//_JournalEntry.CompanyCodeCurrency,

//_JournalEntry.AccountingDocumentType,

//_JournalEntry.AccountingDocumentCategory


/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CHANGEDOCUMENT"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/