P_PL_SAFTJournalEntry

DDL: P_PL_SAFTJOURNALENTRY SQL: PSAFTPLJRNLENTRY Type: view CONSUMPTION Package: GLO_FIN_IS_SAFT_PL

SAFT PL Journal Entry

P_PL_SAFTJournalEntry is a Consumption CDS View that provides data about "SAFT PL Journal Entry" in SAP S/4HANA. It reads from 1 data source (I_JournalEntryItem) and exposes 12 fields with key fields SourceLedger, CompanyCode, FiscalYear, AccountingDocument, Ledger. Part of development package GLO_FIN_IS_SAFT_PL.

Data Sources (1)

SourceAliasJoin Type
I_JournalEntryItem I_JournalEntryItem from

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName PSAFTPLJRNLENTRY view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #NOT_REQUIRED view
ObjectModel.usageType.serviceQuality #P view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.private true view
VDM.viewType #CONSUMPTION view

Fields (12)

KeyFieldSource TableSource FieldDescription
KEY SourceLedger I_JournalEntryItem SourceLedger
KEY CompanyCode I_JournalEntryItem CompanyCode
KEY FiscalYear I_JournalEntryItem FiscalYear
KEY AccountingDocument I_JournalEntryItem AccountingDocument
KEY Ledger I_JournalEntryItem Ledger
CompanyCodeCurrency I_JournalEntryItem CompanyCodeCurrency
_JournalEntry _JournalEntry
_Ledger _Ledger
_CompanyCode _CompanyCode
_FiscalYear _FiscalYear
_SourceLedger _SourceLedger
_CompanyCodeCurrency _CompanyCodeCurrency
@AbapCatalog.sqlViewName: 'PSAFTPLJRNLENTRY'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #NOT_REQUIRED
@ObjectModel.usageType.serviceQuality: #P
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.dataClass: #MIXED
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.private: true
@VDM.viewType: #CONSUMPTION
define view P_PL_SAFTJournalEntry
  as select from           I_JournalEntryItem
    left outer to one join I_OperationalAcctgDocItem as Bseg on  Bseg.AccountingDocument             = I_JournalEntryItem.AccountingDocument
                                                             and Bseg.CompanyCode                    = I_JournalEntryItem.CompanyCode
                                                             and Bseg.FiscalYear                     = I_JournalEntryItem.FiscalYear
                                                             and I_JournalEntryItem.LedgerGLLineItem = concat(
      '000', Bseg.AccountingDocumentItem
    )

{
  key I_JournalEntryItem.SourceLedger       as SourceLedger,
  key I_JournalEntryItem.CompanyCode        as CompanyCode,
  key I_JournalEntryItem.FiscalYear         as FiscalYear,
  key I_JournalEntryItem.AccountingDocument as AccountingDocument,
  key I_JournalEntryItem.Ledger             as Ledger,
      I_JournalEntryItem.CompanyCodeCurrency,
      @Semantics.amount.currencyCode: 'CompanyCodeCurrency'
      //            sum(I_JournalEntryItem.AmountInCompanyCodeCurrency) as TotalGrossAmountInCoCodeCrcy,


      sum(
      case
        when Bseg.IsNegativePosting = 'X' and I_JournalEntryItem.DebitCreditCode = 'H'
           then 0
        else I_JournalEntryItem.AmountInCompanyCodeCurrency
      end
      )                                     as TotalGrossAmountInCoCodeCrcy,

      //Associations

      _JournalEntry,
      _Ledger,
      _CompanyCode,
      _FiscalYear,
      _SourceLedger,
      _CompanyCodeCurrency
}
where
        I_JournalEntryItem.DebitCreditCode = 'S'
  or(
        I_JournalEntryItem.DebitCreditCode = 'H'
    and Bseg.IsNegativePosting             = 'X'
  )
group by
  I_JournalEntryItem.SourceLedger,
  I_JournalEntryItem.CompanyCode,
  I_JournalEntryItem.FiscalYear,
  I_JournalEntryItem.AccountingDocument,
  I_JournalEntryItem.Ledger,
  I_JournalEntryItem.CompanyCodeCurrency