I_PL_SAFTGenLdgrAcctCube

DDL: I_PL_SAFTGENLDGRACCTCUBE Type: view_entity COMPOSITE Package: GLO_FIN_IS_SAFT_PL

SAFT PL Accounting Balance - Cube

I_PL_SAFTGenLdgrAcctCube is a Composite CDS View (Cube) that provides data about "SAFT PL Accounting Balance - Cube" in SAP S/4HANA. It reads from 1 data source (I_PL_SAFTGenLdgrAcctBalCube) and exposes 25 fields with key fields Ledger, CompanyCode, FiscalYear, SourceLedger, AccountingDocument. Part of development package GLO_FIN_IS_SAFT_PL.

Data Sources (1)

SourceAliasJoin Type
I_PL_SAFTGenLdgrAcctBalCube I_PL_SAFTGenLdgrAcctBalCube from

Parameters (5)

NameTypeDefault
P_FromPostingDate fis_budat_from
P_ToPostingDate fis_budat_to
P_FromFiscalPeriod fis_period_from
P_ToFiscalPeriod fis_period_to
P_PL_IndicatorIsTrueOrFalse fipl_consider_vendor_customer

Annotations (11)

NameValueLevelField
AccessControl.authorizationCheck #MANDATORY view
EndUserText.label SAFT PL Accounting Balance - Cube view
AccessControl.personalData.blocking #NOT_REQUIRED view
Analytics.internalName #LOCAL view
VDM.viewType #COMPOSITE view
Analytics.dataCategory #CUBE view
Metadata.ignorePropagatedAnnotations true view
Metadata.allowExtensions true view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view

Fields (25)

KeyFieldSource TableSource FieldDescription
KEY Ledger I_PL_SAFTGenLdgrAcctBalCube Ledger
KEY CompanyCode I_PL_SAFTGenLdgrAcctBalCube CompanyCode
KEY FiscalYear I_PL_SAFTGenLdgrAcctBalCube FiscalYear
KEY SourceLedger I_PL_SAFTGenLdgrAcctBalCube SourceLedger
KEY AccountingDocument I_PL_SAFTGenLdgrAcctBalCube AccountingDocument
KEY LedgerGLLineItem I_PL_SAFTGenLdgrAcctBalCube LedgerGLLineItem
KEY StatryRptCategory I_PL_SAFTGenLdgrAcctBalCube StatryRptCategory
KEY StatryRptgEntity I_PL_SAFTGenLdgrAcctBalCube StatryRptgEntity
KEY StatryRptRunID I_PL_SAFTGenLdgrAcctBalCube StatryRptRunID
PostingDate I_PL_SAFTGenLdgrAcctBalCube PostingDate
DocumentDate I_PL_SAFTGenLdgrAcctBalCube DocumentDate
GLAccountendasPL_AccountNumber
GLAccountType I_PL_SAFTGenLdgrAcctBalCube GLAccountType
CompanyCodeCurrency I_PL_SAFTGenLdgrAcctBalCube CompanyCodeCurrency
StartingBalanceAmtInCoCodeCrcy I_PL_SAFTGenLdgrAcctBalCube StartingBalanceAmtInCoCodeCrcy
DebitStartingBalAmtInCCCrcy I_PL_SAFTGenLdgrAcctBalCube DebitStartingBalAmtInCCCrcy
CreditStartingBalAmtInCCCrcy I_PL_SAFTGenLdgrAcctBalCube CreditStartingBalAmtInCCCrcy
AmountInCompanyCodeCurrency I_PL_SAFTGenLdgrAcctBalCube AmountInCompanyCodeCurrency
DebitAmountInCoCodeCrcy I_PL_SAFTGenLdgrAcctBalCube DebitAmountInCoCodeCrcy
CreditAmountInCoCodeCrcy I_PL_SAFTGenLdgrAcctBalCube CreditAmountInCoCodeCrcy
EndingBalanceAmtInCoCodeCrcy I_PL_SAFTGenLdgrAcctBalCube EndingBalanceAmtInCoCodeCrcy
DebitEndingBalAmtInCCCrcy I_PL_SAFTGenLdgrAcctBalCube DebitEndingBalAmtInCCCrcy
CreditEndingBalAmtInCCCrcy I_PL_SAFTGenLdgrAcctBalCube CreditEndingBalAmtInCCCrcy
YTDDebitAmtInCoCodeCrcy I_PL_SAFTGenLdgrAcctBalCube YTDDebitAmtInCoCodeCrcy
YTDCrdtAmtInCoCodeCrcy I_PL_SAFTGenLdgrAcctBalCube YTDCrdtAmtInCoCodeCrcy
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #MANDATORY
@EndUserText.label: 'SAFT PL Accounting Balance - Cube'
@AccessControl.personalData.blocking:#NOT_REQUIRED
@Analytics.internalName:#LOCAL
@VDM.viewType:#COMPOSITE
@Analytics.dataCategory:#CUBE 
@Metadata.ignorePropagatedAnnotations: true
@Metadata.allowExtensions:true
@ObjectModel.usageType:{
  serviceQuality: #X,
  sizeCategory: #XL,
  dataClass: #MIXED
}
define view entity I_PL_SAFTGenLdgrAcctCube    with parameters
    P_FromPostingDate  : fis_budat_from,
    P_ToPostingDate    : fis_budat_to,

    @Consumption.hidden: true
    @Consumption.defaultValue: '000'
    P_FromFiscalPeriod : fis_period_from,

    @Consumption.hidden: true
    @Consumption.defaultValue: '000'
    P_ToFiscalPeriod   : fis_period_to,

    P_PL_IndicatorIsTrueOrFalse       : fipl_consider_vendor_customer
  as select from I_PL_SAFTGenLdgrAcctBalCube 
                   ( P_FromPostingDate: $parameters.P_FromPostingDate,
                   P_ToPostingDate: $parameters.P_ToPostingDate,
                   P_FromFiscalPeriod: $parameters.P_FromFiscalPeriod,
                   P_ToFiscalPeriod: $parameters.P_ToFiscalPeriod,
                   P_PL_IndicatorIsTrueOrFalse: $parameters.P_PL_IndicatorIsTrueOrFalse )
  left outer to one join I_PL_SAFTGenAcctsExcl on I_PL_SAFTGenAcctsExcl.CompanyCode = I_PL_SAFTGenLdgrAcctBalCube.CompanyCode and
                               I_PL_SAFTGenAcctsExcl.GLAccount = I_PL_SAFTGenLdgrAcctBalCube.GLAccount
                   
  left outer to one join I_AcctTypeText on I_AcctTypeText.FinancialAccountType = I_PL_SAFTGenLdgrAcctBalCube.ReconciliationAccountType and
                                            I_AcctTypeText.Language = $session.system_language
{
  key  I_PL_SAFTGenLdgrAcctBalCube.Ledger,
  key  I_PL_SAFTGenLdgrAcctBalCube.CompanyCode,
  key  I_PL_SAFTGenLdgrAcctBalCube.FiscalYear,
  key  I_PL_SAFTGenLdgrAcctBalCube.SourceLedger,
  key  I_PL_SAFTGenLdgrAcctBalCube.AccountingDocument,
  key  I_PL_SAFTGenLdgrAcctBalCube.LedgerGLLineItem,
  key  I_PL_SAFTGenLdgrAcctBalCube.StatryRptCategory,
  key  I_PL_SAFTGenLdgrAcctBalCube.StatryRptgEntity,
  key  I_PL_SAFTGenLdgrAcctBalCube.StatryRptRunID,

       I_PL_SAFTGenLdgrAcctBalCube.PostingDate,
       I_PL_SAFTGenLdgrAcctBalCube.DocumentDate,

       case
         when I_PL_SAFTGenLdgrAcctBalCube.PL_IndicatorIsCustomerSupplier = 'X'and I_PL_SAFTGenLdgrAcctBalCube.ReconciliationAccountType = 'K'
           then I_PL_SAFTGenLdgrAcctBalCube.Supplier
          when I_PL_SAFTGenLdgrAcctBalCube.PL_IndicatorIsCustomerSupplier = 'X'and I_PL_SAFTGenLdgrAcctBalCube.ReconciliationAccountType = 'D'
           then I_PL_SAFTGenLdgrAcctBalCube.Customer
          else
             I_PL_SAFTGenLdgrAcctBalCube.GLAccount
       end as PL_AccountNumber,
       
       case
        when I_PL_SAFTGenLdgrAcctBalCube.PL_IndicatorIsCustomerSupplier = 'X'and I_PL_SAFTGenLdgrAcctBalCube.ReconciliationAccountType = 'K'
          then I_PL_SAFTGenLdgrAcctBalCube.SupplierName
         when I_PL_SAFTGenLdgrAcctBalCube.PL_IndicatorIsCustomerSupplier = 'X'and I_PL_SAFTGenLdgrAcctBalCube.ReconciliationAccountType = 'D'
          then I_PL_SAFTGenLdgrAcctBalCube.CustomerName
         else
            I_PL_SAFTGenLdgrAcctBalCube.GLAccountLongName
       end as PL_AccountNumberDescription,
       
       I_PL_SAFTGenLdgrAcctBalCube.GLAccountType,

       case
         when ( I_PL_SAFTGenLdgrAcctBalCube.PL_IndicatorIsCustomerSupplier = 'X'and I_PL_SAFTGenLdgrAcctBalCube.ReconciliationAccountType = 'K' ) or 
         ( I_PL_SAFTGenLdgrAcctBalCube.PL_IndicatorIsCustomerSupplier = 'X'and I_PL_SAFTGenLdgrAcctBalCube.ReconciliationAccountType = 'D' )
           then I_PL_SAFTGenLdgrAcctBalCube.GLAccount
          else
             I_PL_SAFTGenLdgrAcctBalCube.GLAccountGroup
       end as PL_GLAccountOrGroupText,

       case
         when ( I_PL_SAFTGenLdgrAcctBalCube.PL_IndicatorIsCustomerSupplier = 'X'and I_PL_SAFTGenLdgrAcctBalCube.ReconciliationAccountType = 'K' ) or
          ( I_PL_SAFTGenLdgrAcctBalCube.PL_IndicatorIsCustomerSupplier = 'X'and I_PL_SAFTGenLdgrAcctBalCube.ReconciliationAccountType = 'D' )
           then I_PL_SAFTGenLdgrAcctBalCube.GLAccountLongName
          else
             I_PL_SAFTGenLdgrAcctBalCube.AccountGroupName
       end as PL_GLAccountOrGroupDescription,

       case
         when I_PL_SAFTGenLdgrAcctBalCube.PL_IndicatorIsCustomerSupplier = 'X'and I_PL_SAFTGenLdgrAcctBalCube.ReconciliationAccountType = 'K'
           then I_PL_SAFTGenLdgrAcctBalCube.ReconciliationAccountType
          when I_PL_SAFTGenLdgrAcctBalCube.PL_IndicatorIsCustomerSupplier = 'X'and I_PL_SAFTGenLdgrAcctBalCube.ReconciliationAccountType = 'D'
           then I_PL_SAFTGenLdgrAcctBalCube.ReconciliationAccountType
          else
             I_PL_SAFTGenLdgrAcctBalCube.GLAccountGroup
       end as PL_RecnclnAcctTypeOrGroupText,

       case
         when I_PL_SAFTGenLdgrAcctBalCube.ReconciliationAccountType = 'K' or I_PL_SAFTGenLdgrAcctBalCube.ReconciliationAccountType = 'D'
            then I_AcctTypeText.FinancialAccountTypeName
         else
            I_PL_SAFTGenLdgrAcctBalCube.AccountGroupName
       end as PL_RecnclnAcctNameOrGrpDesc,

       I_PL_SAFTGenLdgrAcctBalCube.CompanyCodeCurrency,

       @DefaultAggregation: #SUM
       @Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
       I_PL_SAFTGenLdgrAcctBalCube.StartingBalanceAmtInCoCodeCrcy,

       @DefaultAggregation: #SUM
       @Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
       I_PL_SAFTGenLdgrAcctBalCube.DebitStartingBalAmtInCCCrcy,

       @DefaultAggregation: #SUM
       @Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
       I_PL_SAFTGenLdgrAcctBalCube.CreditStartingBalAmtInCCCrcy,

       //current balance

       @DefaultAggregation: #SUM
       @Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
       I_PL_SAFTGenLdgrAcctBalCube.AmountInCompanyCodeCurrency,

       @DefaultAggregation: #SUM
       @Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
       I_PL_SAFTGenLdgrAcctBalCube.DebitAmountInCoCodeCrcy,

       @DefaultAggregation: #SUM
       @Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
       I_PL_SAFTGenLdgrAcctBalCube.CreditAmountInCoCodeCrcy,

       //Ending Balance

       @DefaultAggregation: #SUM
       @Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
       I_PL_SAFTGenLdgrAcctBalCube.EndingBalanceAmtInCoCodeCrcy,

       @DefaultAggregation: #SUM
       @Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
       I_PL_SAFTGenLdgrAcctBalCube.DebitEndingBalAmtInCCCrcy,

       @DefaultAggregation: #SUM
       @Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
       I_PL_SAFTGenLdgrAcctBalCube.CreditEndingBalAmtInCCCrcy,

       @DefaultAggregation: #SUM
       @Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
       I_PL_SAFTGenLdgrAcctBalCube.YTDDebitAmtInCoCodeCrcy,

       @DefaultAggregation: #SUM
       @Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
       I_PL_SAFTGenLdgrAcctBalCube.YTDCrdtAmtInCoCodeCrcy
}
 where I_PL_SAFTGenAcctsExcl.GLAccount is null