@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
}
Depth:
1
2
3
4
5
All
Reload
C_PL_SAFTJournalEntryItemCube view