C_RO_SAFTJOURNALENTRYITEMC

CDS View

GL Item and Header for RO SAFT - Cube

C_RO_SAFTJOURNALENTRYITEMC is a CDS View in S/4HANA. GL Item and Header for RO SAFT - Cube. 5 CDS views read from this table.

CDS Views using this table (5)

ViewTypeJoinVDMDescription
C_RO_SAFTJournalEntryItemQ view from CONSUMPTION GL Item and Header for RO SAFT - Query
P_RO_SAFTPaymentHeader view from CONSUMPTION
P_RO_SAFTPaymentHeader view union CONSUMPTION
P_RO_SAFTPaymentItem view from CONSUMPTION
P_RO_SAFTPaymentItem view union CONSUMPTION
@AbapCatalog.sqlViewName: 'CROSAFTJRNENITMC'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
//@AbapCatalog.dbHints: [{ hint: 'PREAGGR_BEFORE_JOIN' }]

@VDM.viewType: #CONSUMPTION
@Analytics: { dataCategory: #CUBE }
@Analytics.internalName:#LOCAL
@ObjectModel.usageType.serviceQuality: #X
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.personalData.blocking: #BLOCKED_DATA_INCLUDED
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'GL Item and Header for RO SAFT - Cube'
@Metadata.allowExtensions: true
define view C_RO_SAFTJournalEntryItemC

  with parameters

    P_AlternativeGLAccountIsUsed : saft_ro_alt_gl_account_flag,
    P_VATRegistration            : stceg

  as select from           P_RO_SAFTJournalEntryItem(P_AlternativeGLAccountIsUsed : $parameters.P_AlternativeGLAccountIsUsed) as Item

  // Mapping of GL accounts to active accounts

    left outer to one join I_RO_SAFTAccountMapping                                                                            as Account on  Account.ChartOfAccounts = Item.ActiveChartOfAccounts
                                                                                                                                         and Account.GLAccount       = Item.ActiveGLAccount

{
  key Item.StatryRptCategory,
  key Item.StatryRptgEntity,
  key Item.StatryRptRunID,
  key Item.SourceLedger,
  key Item.CompanyCode,
  key Item.FiscalYear,
  key Item.AccountingDocument,
  key Item.LedgerGLLineItem,
  key Item.Ledger,
      Item.AccountingDocumentItem,
      Item.FinancialAccountType,
      Item.Customer,
      Item.Supplier,
      Item.DebitCreditCode,
      Item.TaxCode,
      Item.TaxCountry,
      Item.GLAccount,
      Item.ChartOfAccounts,
      Item.AlternativeGLAccount,
      Item.CountryChartOfAccounts,
      Item.GLAccountType,
      Item.PostingDate,
      Item.DocumentDate,
      Item.AccountingDocumentCreationDate,
      Item.AccountingDocCreatedByUser,
      Item.AccountingDocumentType,
      Item.AccountingDocumentTypeName,
      Item.ValueDate,
      Item.DocumentItemText,
      Item.BaseUnit,
      Item.ControllingArea,
      Item.ProfitCenter,
      Item._ProfitCenterTxt,
      Item.Segment,
      Item._SegmentText,
      Item.CostCenter,
      Item._CostCenterTxt,
      Item.OrderID,
      Item._Order,
      Item.WBSElement,
      Item.WBSElementInternalID,
      Item._WBSElementBasicDataText,
      Item.TransactionTypeDetermination,
      case
        when Item.CustomerVATRegistration = '0' and Item.SupplierVATRegistration = '0' then cast( $parameters.P_VATRegistration as stceg )
        else Item.CustomerVATRegistration
      end                                                            as CustomerVATRegistration,
      case
        when Item.CustomerVATRegistration = '0' and Item.SupplierVATRegistration = '0' then cast( $parameters.P_VATRegistration as stceg )
        else Item.SupplierVATRegistration
      end                                                            as SupplierVATRegistration,
      Item.BusinessPartner,
      @DefaultAggregation:#SUM
      @Semantics.amount.currencyCode: 'CompanyCodeCurrency'
      Item.CreditAmountInCoCodeCrcy,
      @Semantics.currencyCode:true
      Item.CreditAmountCurrency,
      @DefaultAggregation:#SUM
      @Semantics.amount.currencyCode: 'CompanyCodeCurrency'
      Item.DebitAmountInCoCodeCrcy,
      @Semantics.currencyCode:true
      Item.DebitAmountCurrency,
      @DefaultAggregation:#SUM
      @Semantics.amount.currencyCode: 'CompanyCodeCurrency'
      Item.AmountInCompanyCodeCurrency,
      @Semantics.currencyCode:true
      Item.CompanyCodeCurrency,
      @DefaultAggregation:#SUM
      @Semantics.amount.currencyCode: 'TransactionCurrency'
      Item.CreditAmountInTransCrcy,
      @DefaultAggregation:#SUM
      @Semantics.amount.currencyCode: 'TransactionCurrency'
      Item.DebitAmountInTransCrcy,
      @DefaultAggregation:#SUM
      @Semantics.amount.currencyCode: 'TransactionCurrency'
      Item.AmountInTransactionCurrency,
      @Semantics.currencyCode:true
      Item.TransactionCurrency,
      '                    '                                         as VATRegistration, //do not use

      coalesce(Account.RO_SAFTStandardAccount, Item.ActiveGLAccount) as RO_SAFTStandardAccount,
      Item.RO_SAFTJournalTransaction,
      Item.RO_SAFTSourceDocument,
      Item.RO_SAFTJournalTransactionType,
      Item.RO_SAFTJournalTransDescription,
      ' '                                                            as TaxType,
      Item.RO_SAFTCustomerTaxType,
      Item.RO_SAFTSupplierTaxType,
      Item.LogicalSystem,
      cast(
        case Item.DebitCreditCode
          when 'H' then Item.RO_SAFTExchangeRate
          else 0
        end
      as saft_ro_exchange_rate)                                      as CreditExchangeRate,
      cast(
        case Item.DebitCreditCode
          when 'S' then Item.RO_SAFTExchangeRate
          else 0
        end
      as saft_ro_exchange_rate)                                      as DebitExchangeRate,
      Item.RO_SAFTExchangeRate,
      Item._JournalEntry.FiscalPeriod,
      Item._JournalEntry.TaxReportingDate
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_JOURNALENTRY",
"I_RO_SAFTACCOUNTMAPPING",
"P_RO_SAFTJOURNALENTRYITEM"
],
"ASSOCIATED":
[
"I_COSTCENTERTEXT",
"I_ORDER",
"I_PROFITCENTERTEXT",
"I_SEGMENTTEXT",
"I_WBSELEMENTBASICDATA"
],
"BASE":
[
"P_RO_SAFTJOURNALENTRYITEM"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/