P_GLAcctMaxPostgDteBfrKDte

DDL: P_GLACCTMAXPOSTGDTEBFRKDTE SQL: PGRCGAMPDBKD Type: view CONSUMPTION

GL accounts with last posting date

P_GLAcctMaxPostgDteBfrKDte is a Consumption CDS View that provides data about "GL accounts with last posting date" in SAP S/4HANA. It reads from 1 data source (I_GLAccountLineItemRawData) and exposes 3 fields with key fields GLAccount, CompanyCode.

Data Sources (1)

SourceAliasJoin Type
I_GLAccountLineItemRawData I_GLAccountLineItemRawData from

Parameters (1)

NameTypeDefault
P_ToKeyDateDays abap.int4

Annotations (12)

NameValueLevelField
AbapCatalog.sqlViewName PGRCGAMPDBKD view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
EndUserText.label GL accounts with last posting date view
VDM.viewType #CONSUMPTION view
VDM.private true view
AbapCatalog.buffering.status #NOT_ALLOWED view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.dataClass #MIXED view

Fields (3)

KeyFieldSource TableSource FieldDescription
KEY GLAccount GLAccount
KEY CompanyCode CompanyCode
LatestPostingDateBeforeKeyDate
@AbapCatalog.sqlViewName: 'PGRCGAMPDBKD'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'GL accounts with last posting date'
@VDM.viewType: #CONSUMPTION
@VDM.private: true
@AbapCatalog.buffering.status: #NOT_ALLOWED
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.dataClass: #MIXED
define view P_GLAcctMaxPostgDteBfrKDte
  with parameters

    P_ToKeyDateDays :abap.int4


  as select from I_GLAccountLineItemRawData
{


  key GLAccount,
  key CompanyCode,
  max(_JournalEntry.AccountingDocumentCreationDate) as LatestPostingDateBeforeKeyDate


}

where
  DocumentDate < DATS_ADD_DAYS(
    cast(
      $session.user_date as abap.dats
    ), - $parameters.P_ToKeyDateDays, 'INITIAL'
  )
group by
  GLAccount,
  CompanyCode
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_GLACCOUNTLINEITEMRAWDATA",
"I_JOURNALENTRY"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/