P_CL_JournalEntryTotalAmount

DDL: P_CL_JOURNALENTRYTOTALAMOUNT Type: view_entity CONSUMPTION Package: GLO_FIN_IS_CL

Journal Entry Total Amount for Chile Reporting

P_CL_JournalEntryTotalAmount is a Consumption CDS View that provides data about "Journal Entry Total Amount for Chile Reporting" in SAP S/4HANA. It reads from 1 data source (I_GLAccountLineItemRawData) and exposes 6 fields with key fields SourceLedger, CompanyCode, FiscalYear, AccountingDocument. It has 1 association to related views. Part of development package GLO_FIN_IS_CL.

Data Sources (1)

SourceAliasJoin Type
I_GLAccountLineItemRawData GLAccountLineItem from

Parameters (1)

NameTypeDefault
P_ReportingCurrency glo_reporting_currency

Associations (1)

CardinalityTargetAliasCondition
[0..1] I_Currency _ReportingCurrency _ReportingCurrency.Currency = $projection.ReportingCurrency

Annotations (6)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
VDM.private true view
VDM.viewType #CONSUMPTION view

Fields (6)

KeyFieldSource TableSource FieldDescription
KEY SourceLedger I_GLAccountLineItemRawData SourceLedger
KEY CompanyCode I_GLAccountLineItemRawData CompanyCode
KEY FiscalYear I_GLAccountLineItemRawData FiscalYear
KEY AccountingDocument I_GLAccountLineItemRawData AccountingDocument
ReportingCurrency
_ReportingCurrency _ReportingCurrency
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ObjectModel.usageType:{
  serviceQuality: #D,
  sizeCategory: #XL,
  dataClass: #MIXED
}
@VDM: {
  private: true,
  viewType: #CONSUMPTION
}
define view entity P_CL_JournalEntryTotalAmount
  with parameters
    P_ReportingCurrency : glo_reporting_currency
  as select from I_GLAccountLineItemRawData as GLAccountLineItem
  association [0..1] to I_Currency as _ReportingCurrency on _ReportingCurrency.Currency = $projection.ReportingCurrency
{
  key GLAccountLineItem.SourceLedger,
  key GLAccountLineItem.CompanyCode,
  key GLAccountLineItem.FiscalYear,
  key GLAccountLineItem.AccountingDocument,

      cast( $parameters.P_ReportingCurrency as glo_reporting_currency preserving type ) as ReportingCurrency,

      @ObjectModel.foreignKey.association: '_ReportingCurrency'
      @Semantics.amount.currencyCode: 'ReportingCurrency'
      cast( sum(
        case $parameters.P_ReportingCurrency
          when GLAccountLineItem.CompanyCodeCurrency
            then GLAccountLineItem.AmountInCompanyCodeCurrency
          when GLAccountLineItem.GlobalCurrency
            then GLAccountLineItem.AmountInGlobalCurrency
          when GLAccountLineItem.FreeDefinedCurrency1
            then GLAccountLineItem.AmountInFreeDefinedCurrency1
          when GLAccountLineItem.FreeDefinedCurrency2
            then GLAccountLineItem.AmountInFreeDefinedCurrency2
          when GLAccountLineItem.FreeDefinedCurrency3
            then GLAccountLineItem.AmountInFreeDefinedCurrency3
          when GLAccountLineItem.FreeDefinedCurrency4
            then GLAccountLineItem.AmountInFreeDefinedCurrency4
          when GLAccountLineItem.FreeDefinedCurrency5
            then GLAccountLineItem.AmountInFreeDefinedCurrency5
          when GLAccountLineItem.FreeDefinedCurrency6
            then GLAccountLineItem.AmountInFreeDefinedCurrency6
          when GLAccountLineItem.FreeDefinedCurrency7
            then GLAccountLineItem.AmountInFreeDefinedCurrency7
          when GLAccountLineItem.FreeDefinedCurrency8
            then GLAccountLineItem.AmountInFreeDefinedCurrency8
          else
            abap.curr'0.00'
        end
      ) as glo_total_amount_inrptgcrcy preserving type )                                as TotalAmountInDisplayCrcy,
      _ReportingCurrency
}
where GLAccountLineItem.DebitCreditCode = 'S'
group by
  GLAccountLineItem.SourceLedger,
  GLAccountLineItem.CompanyCode,
  GLAccountLineItem.FiscalYear,
  GLAccountLineItem.AccountingDocument