C_PL_SAFTJournalEntryItemCube

DDL: C_PL_SAFTJOURNALENTRYITEMCUBE SQL: CPLSAFTJNLENTITC Type: view CONSUMPTION Package: GLO_FIN_IS_SAFT_PL

SAFT PL Journal Entry Item Cube

C_PL_SAFTJournalEntryItemCube is a Consumption CDS View (Cube) that provides data about "SAFT PL Journal Entry Item Cube" in SAP S/4HANA. It reads from 2 data sources (I_PL_SAFTGeneralSettings, I_PL_SAFTJournalEntryCube) and exposes 18 fields with key fields SourceLedger, CompanyCode, AccountingDocument, FiscalYear, LedgerGLLineItem. Part of development package GLO_FIN_IS_SAFT_PL.

Data Sources (2)

SourceAliasJoin Type
I_PL_SAFTGeneralSettings I_PL_SAFTGeneralSettings inner
I_PL_SAFTJournalEntryCube I_PL_SAFTJournalEntryCube from

Parameters (3)

NameTypeDefault
P_FromPostingDate fis_budat_from
P_ToPostingDate fis_budat_to
P_PL_IndicatorIsTrueOrFalse fipl_consider_vendor_customer

Annotations (14)

NameValueLevelField
AbapCatalog.sqlViewName CPLSAFTJNLENTITC view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #CONSUMPTION view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #NOT_REQUIRED view
Analytics.dataCategory #CUBE view
Metadata.allowExtensions true view
Analytics.internalName #LOCAL view
EndUserText.label SAFT PL Journal Entry Item Cube view

Fields (18)

KeyFieldSource TableSource FieldDescription
KEY SourceLedger SourceLedger
KEY CompanyCode I_PL_SAFTJournalEntryCube CompanyCode
KEY AccountingDocument I_PL_SAFTJournalEntryCube AccountingDocument
KEY FiscalYear FiscalYear
KEY LedgerGLLineItem LedgerGLLineItem
KEY Ledger Ledger
KEY StatryRptCategory I_PL_SAFTJournalEntryCube StatryRptCategory
KEY StatryRptgEntity I_PL_SAFTJournalEntryCube StatryRptgEntity
KEY StatryRptRunID I_PL_SAFTJournalEntryCube StatryRptRunID
PostingDate I_PL_SAFTJournalEntryCube PostingDate
ChartOfAccounts I_PL_SAFTJournalEntryCube ChartOfAccounts
GLAccountendasGLAccount
DocumentItemText I_PL_SAFTJournalEntryCube DocumentItemText
CompanyCodeCurrency I_PL_SAFTJournalEntryCube CompanyCodeCurrency
DebitAmountInCoCodeCrcy I_PL_SAFTJournalEntryCube DebitAmountInCoCodeCrcy
DebitCreditCode I_PL_SAFTJournalEntryCube DebitCreditCode
CreditAmountInCoCodeCrcy
_JournalEntry _JournalEntry
@AbapCatalog.sqlViewName: 'CPLSAFTJNLENTITC'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.viewType: #CONSUMPTION
@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #D
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #NOT_REQUIRED
@Analytics.dataCategory: #CUBE
@Metadata.allowExtensions:true
@Analytics.internalName:#LOCAL
@EndUserText.label: 'SAFT PL Journal Entry Item Cube'
define view C_PL_SAFTJournalEntryItemCube
  with parameters
    P_FromPostingDate           : fis_budat_from,
    P_ToPostingDate             : fis_budat_to,
    P_PL_IndicatorIsTrueOrFalse : fipl_consider_vendor_customer
  as select from I_PL_SAFTJournalEntryCube(P_PL_IndicatorIsTrueOrFalse: $parameters.P_PL_IndicatorIsTrueOrFalse)
    inner join   I_PL_SAFTGeneralSettings on  I_PL_SAFTGeneralSettings.CompanyCode       = I_PL_SAFTJournalEntryCube.CompanyCode
                                          and I_PL_SAFTGeneralSettings.ValidityStartDate <= $parameters.P_ToPostingDate
                                          and I_PL_SAFTGeneralSettings.ValidityEndDate   >= $parameters.P_ToPostingDate
{
  key  SourceLedger,
  key  I_PL_SAFTJournalEntryCube.CompanyCode,
  key  I_PL_SAFTJournalEntryCube.AccountingDocument,
  key  FiscalYear,
  key  LedgerGLLineItem,
  key  Ledger,
  key  I_PL_SAFTJournalEntryCube.StatryRptCategory,
  key  I_PL_SAFTJournalEntryCube.StatryRptgEntity,
  key  I_PL_SAFTJournalEntryCube.StatryRptRunID,

       I_PL_SAFTJournalEntryCube.PostingDate,

       I_PL_SAFTJournalEntryCube.ChartOfAccounts,

       case
         when I_PL_SAFTJournalEntryCube.PL_IndicatorIsCustomerSupplier = 'X'and I_PL_SAFTJournalEntryCube.FinancialAccountType = 'K'
           then I_PL_SAFTJournalEntryCube.Supplier
          when I_PL_SAFTJournalEntryCube.PL_IndicatorIsCustomerSupplier = 'X'and I_PL_SAFTJournalEntryCube.FinancialAccountType = 'D'
           then I_PL_SAFTJournalEntryCube.Customer
          when I_PL_SAFTGeneralSettings.PL_SAFTAccountSelectCriterion = 'M'
           then I_PL_SAFTJournalEntryCube.GLAccount
          when I_PL_SAFTGeneralSettings.PL_SAFTAccountSelectCriterion = 'A'
           then I_PL_SAFTJournalEntryCube.AlternativeGLAccount
          else I_PL_SAFTJournalEntryCube.GLAccount
       end                                                                      as GLAccount,

       I_PL_SAFTJournalEntryCube.DocumentItemText,
       
        case
        when I_PL_SAFTJournalEntryCube.DocumentItemText is not initial
          then I_PL_SAFTJournalEntryCube.DocumentItemText
        else
          'Brak opisu'
       end                                                                      as DeliveryDocumentItemText,

       @Semantics.currencyCode: true
       I_PL_SAFTJournalEntryCube.CompanyCodeCurrency,

       @Semantics.currencyCode: true
       case
       when I_PL_SAFTJournalEntryCube.DebitCreditCode = 'S' and I_PL_SAFTJournalEntryCube.CompanyCodeCurrency <> I_PL_SAFTJournalEntryCube.TransactionCurrency
       then I_PL_SAFTJournalEntryCube.TransactionCurrency
       end                                                                      as TransactionCurrency,

       case
       when I_PL_SAFTJournalEntryCube.DebitCreditCode = 'H' and I_PL_SAFTJournalEntryCube.CompanyCodeCurrency <> I_PL_SAFTJournalEntryCube.TransactionCurrency
       then I_PL_SAFTJournalEntryCube.TransactionCurrency
       end                                                                      as BalanceTransactionCurrency,

       @DefaultAggregation:#SUM
       @Semantics.amount.currencyCode: 'CompanyCodeCurrency'
       I_PL_SAFTJournalEntryCube.DebitAmountInCoCodeCrcy,
       @DefaultAggregation:#SUM
       @Semantics.amount.currencyCode: 'TransactionCurrency'
       case
        when I_PL_SAFTJournalEntryCube.DebitAmountInTransCrcy <> I_PL_SAFTJournalEntryCube.DebitAmountInCoCodeCrcy
          then I_PL_SAFTJournalEntryCube.DebitAmountInTransCrcy
       end                                                                      as DebitAmountInTransCrcy,

       I_PL_SAFTJournalEntryCube.DebitCreditCode,

       @DefaultAggregation:#SUM
       @Semantics.amount.currencyCode: 'CompanyCodeCurrency'
       cast(- I_PL_SAFTJournalEntryCube.CreditAmountInCoCodeCrcy as fis_cr_hsl) as CreditAmountInCoCodeCrcy,
       @DefaultAggregation:#SUM
       @Semantics.amount.currencyCode: 'TransactionCurrency'
       case
        when I_PL_SAFTJournalEntryCube.CreditAmountInTransCrcy <> I_PL_SAFTJournalEntryCube.CreditAmountInCoCodeCrcy
          then -I_PL_SAFTJournalEntryCube.CreditAmountInTransCrcy
       end                                                                      as CreditAmountInTransCrcy,

       //       cast(- I_PL_SAFTJournalEntryCube.CreditAmountInTransCrcy as fis_cr_wsl)  as CreditAmountInTransCrcy,



       _JournalEntry

}