I_PL_SAFTGenLdgrAcctTagCube

DDL: I_PL_SAFTGENLDGRACCTTAGCUBE Type: view_entity COMPOSITE Package: GLO_FIN_IS_SAFT_PL

SAFT PL KR PD GLAccounts Tag - Cube

I_PL_SAFTGenLdgrAcctTagCube is a Composite CDS View (Cube) that provides data about "SAFT PL KR PD GLAccounts Tag - Cube" in SAP S/4HANA. It reads from 2 data sources (I_PL_SAFTGeneralSettings, I_PL_SAFTGenLdgrAcctBalCube) and exposes 28 fields with key fields Ledger, CompanyCode, FiscalYear, SourceLedger, AccountingDocument. Part of development package GLO_FIN_IS_SAFT_PL.

Data Sources (2)

SourceAliasJoin Type
I_PL_SAFTGeneralSettings I_PL_SAFTGeneralSettings inner
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 KR PD GLAccounts Tag - Cube view
Analytics.dataCategory #CUBE view
Metadata.allowExtensions true view
Analytics.internalName #LOCAL view
AccessControl.personalData.blocking #NOT_REQUIRED view
Metadata.ignorePropagatedAnnotations true view
VDM.viewType #COMPOSITE view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view

Fields (28)

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
FixedAsset I_FxdAstActualLineItem FixedAsset
MasterFixedAsset I_FxdAstActualLineItem MasterFixedAsset
PostingDate I_PL_SAFTGenLdgrAcctBalCube PostingDate
DocumentDate I_PL_SAFTGenLdgrAcctBalCube DocumentDate
GLAccount I_PL_SAFTGenLdgrAcctBalCube GLAccount
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
BusinessType I_PL_SAFTGeneralSettings BusinessType
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #MANDATORY
@EndUserText.label: 'SAFT PL KR PD GLAccounts Tag - Cube'
@Analytics.dataCategory:#CUBE
@Metadata.allowExtensions:true
@Analytics.internalName:#LOCAL
@AccessControl.personalData.blocking:#NOT_REQUIRED
@Metadata.ignorePropagatedAnnotations: true
@VDM.viewType: #COMPOSITE
@ObjectModel.usageType:{
  serviceQuality: #X,
  sizeCategory: #XL,
  dataClass: #MIXED
}
define view entity I_PL_SAFTGenLdgrAcctTagCube
  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,

    @Semantics.booleanIndicator:true
    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 )
    inner join              I_PL_SAFTGeneralSettings   on  I_PL_SAFTGeneralSettings.CompanyCode       = I_PL_SAFTGenLdgrAcctBalCube.CompanyCode
                                                       and I_PL_SAFTGeneralSettings.ValidityStartDate <= $parameters.P_ToPostingDate
                                                       and I_PL_SAFTGeneralSettings.ValidityEndDate   >= $parameters.P_ToPostingDate

    left outer to one join  I_AcctTypeText             on  I_AcctTypeText.FinancialAccountType = I_PL_SAFTGenLdgrAcctBalCube.ReconciliationAccountType
                                                       and I_AcctTypeText.Language             = $session.system_language

    left outer to one join  I_GLAccountText            on  I_GLAccountText.ChartOfAccounts = I_PL_SAFTGenLdgrAcctBalCube.ChartOfAccounts
                                                       and I_GLAccountText.GLAccount       = I_PL_SAFTGenLdgrAcctBalCube.AlternativeGLAccount
                                                       and I_GLAccountText.Language             = $session.system_language
    left outer to one join  I_FxdAstActualLineItem     on  I_FxdAstActualLineItem.Ledger             = I_PL_SAFTGenLdgrAcctBalCube.Ledger
                                                       and I_FxdAstActualLineItem.CompanyCode        = I_PL_SAFTGenLdgrAcctBalCube.CompanyCode
                                                       and I_FxdAstActualLineItem.FiscalYear         = I_PL_SAFTGenLdgrAcctBalCube.FiscalYear
                                                       and I_FxdAstActualLineItem.AccountingDocument = I_PL_SAFTGenLdgrAcctBalCube.AccountingDocument
                                                       and I_FxdAstActualLineItem.LedgerGLLineItem   = I_PL_SAFTGenLdgrAcctBalCube.LedgerGLLineItem
{
  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_FxdAstActualLineItem.FixedAsset,
       I_FxdAstActualLineItem.MasterFixedAsset,
       I_PL_SAFTGenLdgrAcctBalCube.PostingDate,
       I_PL_SAFTGenLdgrAcctBalCube.DocumentDate,

       cast( case
         when I_PL_SAFTGenLdgrAcctBalCube.PL_IndicatorIsCustomerSupplier = 'X'and I_PL_SAFTGenLdgrAcctBalCube.FinancialAccountType = 'K'
           then ltrim(I_PL_SAFTGenLdgrAcctBalCube.Supplier, '0')
          when I_PL_SAFTGenLdgrAcctBalCube.PL_IndicatorIsCustomerSupplier = 'X'and I_PL_SAFTGenLdgrAcctBalCube.FinancialAccountType = 'D'
           then ltrim(I_PL_SAFTGenLdgrAcctBalCube.Customer, '0')
          when I_PL_SAFTGenLdgrAcctBalCube.PL_IndicatorIsCustomerSupplier = 'X'and I_PL_SAFTGenLdgrAcctBalCube.FinancialAccountType = 'A'
           then concat(concat(I_FxdAstActualLineItem.MasterFixedAsset, '_' ), I_FxdAstActualLineItem.FixedAsset)
          when I_PL_SAFTGeneralSettings.PL_SAFTAccountSelectCriterion = 'M'
           then ltrim(I_PL_SAFTGenLdgrAcctBalCube.GLAccount, '0')
          when I_PL_SAFTGeneralSettings.PL_SAFTAccountSelectCriterion = 'A'
           then ltrim(I_PL_SAFTGenLdgrAcctBalCube.AlternativeGLAccount, '0')
       end as fipl_kr_subledger)                                     as PL_SubledgerAccountNumber,
       I_PL_SAFTGenLdgrAcctBalCube.GLAccount,
       case
        when I_PL_SAFTGenLdgrAcctBalCube.PL_IndicatorIsCustomerSupplier = 'X'and I_PL_SAFTGenLdgrAcctBalCube.FinancialAccountType = 'K'
          then I_PL_SAFTGenLdgrAcctBalCube.SupplierName
        when I_PL_SAFTGenLdgrAcctBalCube.PL_IndicatorIsCustomerSupplier = 'X'and I_PL_SAFTGenLdgrAcctBalCube.FinancialAccountType = 'D'
          then I_PL_SAFTGenLdgrAcctBalCube.CustomerName
        when I_PL_SAFTGenLdgrAcctBalCube.PL_IndicatorIsCustomerSupplier = 'X'and I_PL_SAFTGenLdgrAcctBalCube.FinancialAccountType = 'A'
          then I_FxdAstActualLineItem._FixedAsset.FixedAssetDescription
        when I_PL_SAFTGeneralSettings.PL_SAFTAccountSelectCriterion = 'M'
           then I_PL_SAFTGenLdgrAcctBalCube.GLAccountLongName
        when I_PL_SAFTGeneralSettings.PL_SAFTAccountSelectCriterion = 'A'
           then I_GLAccountText.GLAccountLongName
         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.FinancialAccountType = 'K' ) or
         ( I_PL_SAFTGenLdgrAcctBalCube.PL_IndicatorIsCustomerSupplier = 'X'and I_PL_SAFTGenLdgrAcctBalCube.FinancialAccountType = 'D' ) or
         ( I_PL_SAFTGenLdgrAcctBalCube.PL_IndicatorIsCustomerSupplier = 'X'and I_PL_SAFTGenLdgrAcctBalCube.FinancialAccountType = 'A' )
           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.FinancialAccountType = 'K' ) or
          ( I_PL_SAFTGenLdgrAcctBalCube.PL_IndicatorIsCustomerSupplier = 'X'and I_PL_SAFTGenLdgrAcctBalCube.FinancialAccountType = 'D' ) or
          ( I_PL_SAFTGenLdgrAcctBalCube.PL_IndicatorIsCustomerSupplier = 'X'and I_PL_SAFTGenLdgrAcctBalCube.FinancialAccountType = 'A' )
           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.FinancialAccountType = 'K'
           then I_PL_SAFTGenLdgrAcctBalCube.FinancialAccountType
          when I_PL_SAFTGenLdgrAcctBalCube.PL_IndicatorIsCustomerSupplier = 'X'and I_PL_SAFTGenLdgrAcctBalCube.FinancialAccountType = 'D'
           then I_PL_SAFTGenLdgrAcctBalCube.FinancialAccountType
          when I_PL_SAFTGenLdgrAcctBalCube.PL_IndicatorIsCustomerSupplier = 'X'and I_PL_SAFTGenLdgrAcctBalCube.FinancialAccountType = 'A'
           then I_PL_SAFTGenLdgrAcctBalCube.FinancialAccountType
          else
             I_PL_SAFTGenLdgrAcctBalCube.GLAccountGroup
       end                                                   as PL_RecnclnAcctTypeOrGroupText,

       case
         when I_PL_SAFTGenLdgrAcctBalCube.FinancialAccountType = 'K' or I_PL_SAFTGenLdgrAcctBalCube.FinancialAccountType = 'D' or I_PL_SAFTGenLdgrAcctBalCube.FinancialAccountType = 'A'
            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,
       I_PL_SAFTGeneralSettings.BusinessType               as BusinessType

}