P_TrialBalanceFlow_Log

DDL: P_TRIALBALANCEFLOW_LOG Type: view_entity CONSUMPTION Package: FKK_ID_PL_REP

Overall Balance Log

P_TrialBalanceFlow_Log is a Consumption CDS View that provides data about "Overall Balance Log" in SAP S/4HANA. It reads from 2 data sources (I_CADocumentBPItem, I_CAStRpDocItmJournalLog) and exposes 9 fields with key fields StatryRptgEntity, StatryRptCategory, StatryRptRunID, BusinessPartner, ContractAccount. Part of development package FKK_ID_PL_REP.

Data Sources (2)

SourceAliasJoin Type
I_CADocumentBPItem doc from
I_CAStRpDocItmJournalLog log inner

Parameters (1)

NameTypeDefault
P_KeyDate vdm_v_key_date

Annotations (8)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label Overall Balance Log view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #S view
ObjectModel.usageType.dataClass #MIXED view
VDM.private true view
VDM.viewType #CONSUMPTION view

Fields (9)

KeyFieldSource TableSource FieldDescription
KEY StatryRptgEntity I_CAStRpDocItmJournalLog StatryRptgEntity
KEY StatryRptCategory I_CAStRpDocItmJournalLog StatryRptCategory
KEY StatryRptRunID I_CAStRpDocItmJournalLog StatryRptRunID
KEY BusinessPartner I_CADocumentBPItem BusinessPartner
KEY ContractAccount I_CADocumentBPItem ContractAccount
KEY CAReconciliationAccount I_CADocumentBPItem CAReconciliationAccount
KEY CompanyCode I_CADocumentBPItem CompanyCode
CAAmountInLocalCurrency
CompanyCodeCurrency I_CADocumentBPItem CompanyCodeCurrency
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Overall Balance Log'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
    serviceQuality: #X,
    sizeCategory: #S,
    dataClass: #MIXED
}
@VDM.private:true
@VDM.viewType: #CONSUMPTION
define view entity P_TrialBalanceFlow_Log
with parameters    
    @Consumption.hidden: true
    @Environment.systemField: #SYSTEM_DATE
    P_KeyDate                 : vdm_v_key_date    
as select from I_CADocumentBPItem as doc
   inner join I_CAStRpDocItmJournalLog as log on  doc.CADocumentNumber       = log.CADocumentNumber
                                              and doc.CARepetitionItemNumber = log.CARepetitionItemNumber
                                              and doc.CASubItemNumber        = log.CASubItemNumber
                                              and doc.CABPItemNumber         = log.CABPItemNumber 
{
    key log.StatryRptgEntity,
    key log.StatryRptCategory,
    key log.StatryRptRunID,
    key doc.BusinessPartner,
    key doc.ContractAccount,
    key doc.CAReconciliationAccount,
    key doc.CompanyCode,
        @Semantics.amount.currencyCode: 'CompanyCodeCurrency'
        sum( doc.CAAmountInLocalCurrency ) as CAAmountInLocalCurrency,
        doc.CompanyCodeCurrency    
}
where
  doc.CAPostingDate <= $parameters.P_KeyDate and doc.CAStatisticalItemCode is initial
group by
  log.StatryRptgEntity,
  log.StatryRptCategory,
  log.StatryRptRunID,
  doc.CompanyCode,
  doc.CompanyCodeCurrency,    
  doc.BusinessPartner,
  doc.ContractAccount,
  doc.CAReconciliationAccount