P_RevnRecgnJournalEntryItem

DDL: P_REVNRECGNJOURNALENTRYITEM SQL: PIRRJRNENTRITEM Type: view CONSUMPTION

P_RevnRecgnJournalEntryItem is a Consumption CDS View in SAP S/4HANA. It reads from 1 data source (I_GLAccountLineItem) and exposes 51 fields with key fields Ledger, SourceLedger, CompanyCode, FiscalYear, AccountingDocument. It has 3 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_GLAccountLineItem I_GLAccountLineItem from

Parameters (1)

NameTypeDefault
P_Language sylangu

Associations (3)

CardinalityTargetAliasCondition
[1..1] I_GLAccountLineItem _GLAccountLineItem $projection.Ledger = _GLAccountLineItem.Ledger and $projection.SourceLedger = _GLAccountLineItem.SourceLedger and $projection.CompanyCode = _GLAccountLineItem.CompanyCode and $projection.FiscalYear = _GLAccountLineItem.FiscalYear and $projection.AccountingDocument = _GLAccountLineItem.AccountingDocument and $projection.LedgerGLLineItem = _GLAccountLineItem.LedgerGLLineItem
[0..1] I_ProfitCenterText _ProfitCenterText $projection.ControllingArea = _ProfitCenterText.ControllingArea and $projection.ProfitCenter = _ProfitCenterText.ProfitCenter and $projection.PostingDate >= _ProfitCenterText.ValidityStartDate and $projection.PostingDate <= _ProfitCenterText.ValidityEndDate
[0..1] I_CostCenterText _CostCenterText $projection.ControllingArea = _CostCenterText.ControllingArea and $projection.CostCenter = _CostCenterText.CostCenter and $projection.PostingDate >= _CostCenterText.ValidityStartDate and $projection.PostingDate <= _CostCenterText.ValidityEndDate

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName PIRRJRNENTRITEM view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
VDM.private true view
VDM.viewType #CONSUMPTION view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.serviceQuality #C view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (51)

KeyFieldSource TableSource FieldDescription
KEY Ledger Ledger
KEY SourceLedger SourceLedger
KEY CompanyCode CompanyCode
KEY FiscalYear FiscalYear
KEY AccountingDocument AccountingDocument
KEY LedgerGLLineItem LedgerGLLineItem
ReferenceDocument ReferenceDocument
BusinessTransactionType BusinessTransactionType
FiscalPeriod FiscalPeriod
FiscalYearPeriod FiscalYearPeriod
GLAccount GLAccount
GLAccountType GLAccountType
DebitCreditCode DebitCreditCode
ChartOfAccounts ChartOfAccounts
Project Project
ProjectInternalID ProjectInternalID
WBSElement WBSElement
WBSElementInternalID WBSElementInternalID
SalesOrder SalesOrder
SalesOrderItem SalesOrderItem
BalanceTransactionCurrency BalanceTransactionCurrency
AmountInBalanceTransacCrcy AmountInBalanceTransacCrcy
TransactionCurrency TransactionCurrency
AmountInTransactionCurrency AmountInTransactionCurrency
CompanyCodeCurrency CompanyCodeCurrency
AmountInCompanyCodeCurrency AmountInCompanyCodeCurrency
GlobalCurrency GlobalCurrency
AmountInGlobalCurrency AmountInGlobalCurrency
ProfitCenter ProfitCenter
ProfitCenterName
OriginProfitCenter OriginProfitCenter
CostCenter CostCenter
CostCenterName
CostCtrActivityType CostCtrActivityType
CompanyCodeName _CompanyCodeText CompanyCodeName
AccountingDocCreatedByUser AccountingDocCreatedByUser
AccountingDocumentType AccountingDocumentType
DocumentDate DocumentDate
PostingDate PostingDate
CreationDateTime CreationDateTime
AccountingDocumentCategory AccountingDocumentCategory
GLAccountName
PartnerWBSElementInternalID PartnerWBSElementInternalID
ControllingArea ControllingArea
_Ledger _Ledger
_SourceLedger _SourceLedger
_CompanyCode _CompanyCode
_FiscalYear _FiscalYear
_JournalEntry _JournalEntry
_GLAccountInChartOfAccounts _GLAccountInChartOfAccounts
_GLAccountLineItem _GLAccountLineItem
@AbapCatalog.sqlViewName: 'PIRRJRNENTRITEM'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true

@VDM.private: true
@VDM.viewType: #CONSUMPTION

@ObjectModel.usageType: {
  dataClass: #MIXED,
  sizeCategory: #L,
  serviceQuality: #C
}

@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #REQUIRED

@ClientHandling.algorithm: #SESSION_VARIABLE
define view P_RevnRecgnJournalEntryItem
  with parameters
    P_Language : sylangu
  as select from I_GLAccountLineItem 
    association [1..1] to I_GLAccountLineItem as _GLAccountLineItem on $projection.Ledger = _GLAccountLineItem.Ledger
                                                                   and $projection.SourceLedger = _GLAccountLineItem.SourceLedger
                                                                   and $projection.CompanyCode = _GLAccountLineItem.CompanyCode
                                                                   and $projection.FiscalYear = _GLAccountLineItem.FiscalYear
                                                                   and $projection.AccountingDocument = _GLAccountLineItem.AccountingDocument
                                                                   and $projection.LedgerGLLineItem = _GLAccountLineItem.LedgerGLLineItem
 
  association [0..1] to I_ProfitCenterText as _ProfitCenterText on $projection.ControllingArea = _ProfitCenterText.ControllingArea
                                                               and $projection.ProfitCenter    = _ProfitCenterText.ProfitCenter
                                                               and $projection.PostingDate    >= _ProfitCenterText.ValidityStartDate
                                                               and $projection.PostingDate    <= _ProfitCenterText.ValidityEndDate
                                                                   
  association [0..1] to I_CostCenterText as _CostCenterText on $projection.ControllingArea = _CostCenterText.ControllingArea
                                                           and $projection.CostCenter      = _CostCenterText.CostCenter
                                                           and $projection.PostingDate    >= _CostCenterText.ValidityStartDate
                                                           and $projection.PostingDate    <= _CostCenterText.ValidityEndDate                                                                   
{
  key Ledger,
  
  key SourceLedger,
  
  key CompanyCode,
  
  key FiscalYear,
  
  key AccountingDocument,
  
  key LedgerGLLineItem,
  
  ReferenceDocument,
  BusinessTransactionType,
  
  cast (
   case BusinessTransactionType
    when 'TBRR' then 'R' //recognized

    else 'A' //actual

    end as fco_revn_recgn_postg_type 
   ) as RevnRecgnGLLineItmPostgType,

  FiscalPeriod,
  FiscalYearPeriod,
  
  GLAccount,
  GLAccountType,
  DebitCreditCode,
  ChartOfAccounts,

  Project,
  ProjectInternalID,
  WBSElement,
  WBSElementInternalID,
  SalesOrder,
  SalesOrderItem,

  BalanceTransactionCurrency,
  AmountInBalanceTransacCrcy,

  TransactionCurrency,
  AmountInTransactionCurrency,

  CompanyCodeCurrency,
  AmountInCompanyCodeCurrency,

  GlobalCurrency,
  AmountInGlobalCurrency,
  
  ProfitCenter,
  _ProfitCenterText[1:Language = :P_Language ].ProfitCenterName,
  OriginProfitCenter,
  CostCenter,
  _CostCenterText[1:Language = :P_Language ].CostCenterName,
  CostCtrActivityType,
  
  _CompanyCodeText.CompanyCodeName,
  
  AccountingDocCreatedByUser,
  AccountingDocumentType,
  DocumentDate,
  PostingDate,
  CreationDateTime,
  
  AccountingDocumentCategory,

  _GLAcctInChartOfAccountsText[1:Language = :P_Language ].GLAccountName,
  

  PartnerWBSElementInternalID,
  
  ControllingArea,

  _Ledger,
  _SourceLedger,
  _CompanyCode,
  _FiscalYear,
  _JournalEntry,
  _GLAccountInChartOfAccounts,

  /* For authorization purposes */
  _GLAccountLineItem
} where AccountingDocumentCategory <> 'C'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_COMPANYCODE",
"I_COSTCENTERTEXT",
"I_GLACCOUNTLINEITEM",
"I_GLACCOUNTTEXT",
"I_PROFITCENTERTEXT"
],
"ASSOCIATED":
[
"I_COMPANYCODE",
"I_COSTCENTERTEXT",
"I_FISCALYEARFORCOMPANYCODE",
"I_GLACCOUNTINCHARTOFACCOUNTS",
"I_GLACCOUNTLINEITEM",
"I_JOURNALENTRY",
"I_LEDGER",
"I_PROFITCENTERTEXT"
],
"BASE":
[
"I_GLACCOUNTLINEITEM"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/