P_MPJournalEntry

DDL: P_MPJOURNALENTRY SQL: PMPJRNLENTY Type: view COMPOSITE

P_MPJournalEntry is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_JournalEntryItem, I_MstrProjCostElmntToResource) and exposes 35 fields with key fields Ledger, SourceLedger, CompanyCode, FiscalYear, AccountingDocument.

Data Sources (2)

SourceAliasJoin Type
I_JournalEntryItem JournalEntry from
I_MstrProjCostElmntToResource resource inner

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName PMPJRNLENTY view
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.viewType #COMPOSITE view
VDM.private true view

Fields (35)

KeyFieldSource TableSource FieldDescription
KEY Ledger I_JournalEntryItem Ledger
KEY SourceLedger I_JournalEntryItem SourceLedger
KEY CompanyCode I_JournalEntryItem CompanyCode
KEY FiscalYear I_JournalEntryItem FiscalYear
KEY AccountingDocument I_JournalEntryItem AccountingDocument
KEY LedgerGLLineItem I_JournalEntryItem LedgerGLLineItem
WBSElement I_JournalEntryItem WBSElement
WBSIsStatisticalWBSElement I_JournalEntryItem WBSIsStatisticalWBSElement
BusinessArea I_JournalEntryItem BusinessArea
ControllingArea I_JournalEntryItem ControllingArea
ControllingObjectendasControllingObject
ControllingObjectDebitType I_JournalEntryItem ControllingObjectDebitType
GLAccount I_JournalEntryItem GLAccount
PersonnelNumber I_JournalEntryItem PersonnelNumber
SalesOrder I_JournalEntryItem SalesOrder
SalesOrderItem I_JournalEntryItem SalesOrderItem
FiscalYearPeriod I_JournalEntryItem FiscalYearPeriod
FiscalPeriod I_JournalEntryItem FiscalPeriod
PostingDate I_JournalEntryItem PostingDate
CompanyCodeCurrency I_JournalEntryItem CompanyCodeCurrency
AmountInCompanyCodeCurrency I_JournalEntryItem AmountInCompanyCodeCurrency
GlobalCurrency I_JournalEntryItem GlobalCurrency
AmountInGlobalCurrency I_JournalEntryItem AmountInGlobalCurrency
Quantity I_JournalEntryItem Quantity
BaseUnit I_JournalEntryItem BaseUnit
TransactionCurrency I_JournalEntryItem TransactionCurrency
ControllingObjectCurrency I_JournalEntryItem ControllingObjectCurrency
AmountInObjectCurrency I_JournalEntryItem AmountInObjectCurrency
AmountInTransactionCurrency I_JournalEntryItem AmountInTransactionCurrency
ValuationQuantity I_JournalEntryItem ValuationQuantity
Material I_JournalEntryItem Material
OriginCostCtrActivityType I_JournalEntryItem OriginCostCtrActivityType
Plant I_JournalEntryItem Plant
DocumentDate I_JournalEntryItem DocumentDate
IsReversed I_JournalEntryItem IsReversed
@AbapCatalog.sqlViewName: 'PMPJRNLENTY'
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.viewType: #COMPOSITE
@VDM.private:true
define view P_MPJournalEntry as select from I_JournalEntryItem        as JournalEntry
                                 inner join I_MstrProjCostElmntToResource as resource on JournalEntry.GLAccount       = resource.CostElement           //SAP Note 3527745

                                                                                     and JournalEntry.ControllingArea = resource.ControllingArea       //SAP Note 3538969

{
key JournalEntry.Ledger,
key JournalEntry.SourceLedger,
key JournalEntry.CompanyCode,
key JournalEntry.FiscalYear,
key JournalEntry.AccountingDocument,
key JournalEntry.LedgerGLLineItem,
      JournalEntry.WBSElement,
      JournalEntry.WBSIsStatisticalWBSElement,
       JournalEntry.BusinessArea,
       JournalEntry.ControllingArea,
//       JournalEntry.ControllingObject,                            //SAP Note 3525273

       case when JournalEntry.WBSIsStatisticalWBSElement = 'X'
       then concat('PR',JournalEntry.WBSElementInternalID)
       else
       JournalEntry.ControllingObject
       end as ControllingObject,
       JournalEntry.ControllingObjectDebitType,
       JournalEntry.GLAccount,
       JournalEntry.PersonnelNumber,
       JournalEntry.SalesOrder,
       JournalEntry.SalesOrderItem,
       JournalEntry.FiscalYearPeriod,
       JournalEntry.FiscalPeriod,
       JournalEntry.PostingDate,
       JournalEntry.CompanyCodeCurrency,
       JournalEntry.AmountInCompanyCodeCurrency,
       JournalEntry.GlobalCurrency,
       JournalEntry.AmountInGlobalCurrency,
       JournalEntry.Quantity,
       JournalEntry.BaseUnit,
       JournalEntry.TransactionCurrency,
       JournalEntry.ControllingObjectCurrency,
       JournalEntry.AmountInObjectCurrency,
       JournalEntry.AmountInTransactionCurrency,
       JournalEntry.ValuationQuantity,
       JournalEntry.Material,
       JournalEntry.OriginCostCtrActivityType,
       JournalEntry.Plant,
       JournalEntry.DocumentDate,
       JournalEntry.IsReversed



}
where JournalEntry.Ledger = '0L' and JournalEntry.BusinessTransactionType not like 'KOA%'   //SAP Note 3413353