P_Ru_RecnclnDocDet002

DDL: P_RU_RECNCLNDOCDET002 SQL: PRURECDOCDET002 Type: view CONSUMPTION

P_Ru_RecnclnDocDet002 is a Consumption CDS View in SAP S/4HANA. It reads from 1 data source (I_OperationalAcctgDocItem) and exposes 8 fields.

Data Sources (1)

SourceAliasJoin Type
I_OperationalAcctgDocItem _FinancialDocument from

Annotations (8)

NameValueLevelField
VDM.private true view
VDM.viewType #CONSUMPTION view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.authorizationCheck #NOT_REQUIRED view
AbapCatalog.sqlViewName PRURECDOCDET002 view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view

Fields (8)

KeyFieldSource TableSource FieldDescription
CompanyCode I_OperationalAcctgDocItem CompanyCode
FiscalYear I_OperationalAcctgDocItem FiscalYear
AccountingDocument I_OperationalAcctgDocItem AccountingDocument
GLAccount I_OperationalAcctgDocItem GLAccount
AmountInCompanyCodeCurrency
CompanyCodeCurrency I_OperationalAcctgDocItem CompanyCodeCurrency
AmountInTransactionCurrency
TransactionCurrency I_OperationalAcctgDocItem TransactionCurrency
@VDM.private: true
@VDM.viewType: #CONSUMPTION
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.authorizationCheck: #NOT_REQUIRED
@AbapCatalog.sqlViewName: 'PRURECDOCDET002' 
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.dataClass: #MIXED

// this view is intermediate view for "Payment" document type determination


define view P_Ru_RecnclnDocDet002 
   as select from I_OperationalAcctgDocItem as _FinancialDocument

    association[0..1] to I_GLAccountInCompanyCode as _GLAccount
    on  $projection.CompanyCode = _GLAccount.CompanyCode
    and $projection.GLAccount = _GLAccount.GLAccount

{
       _FinancialDocument.CompanyCode,
       _FinancialDocument.FiscalYear,
       _FinancialDocument.AccountingDocument,
       _FinancialDocument.GLAccount,
  sum( _FinancialDocument.AmountInCompanyCodeCurrency) as AmountInCompanyCodeCurrency,  
   _FinancialDocument.CompanyCodeCurrency,
  sum( _FinancialDocument.AmountInTransactionCurrency) as AmountInTransactionCurrency, 
   _FinancialDocument.TransactionCurrency
} 
where   _FinancialDocument.FinancialAccountType              =   'S' // "G/L accounts

  and   _GLAccount.IsCashFlowAccount          =   'X'
  
  and   _FinancialDocument.AccountingDocumentCategory <>  'D' // “Recurring entry document”

  and   _FinancialDocument.AccountingDocumentCategory <>  'M' // “Sample document”

 group by 
  _FinancialDocument.CompanyCode, 
  _FinancialDocument.AccountingDocument, 
  _FinancialDocument.FiscalYear,
  _FinancialDocument.GLAccount,
  _FinancialDocument.CompanyCodeCurrency,
  _FinancialDocument.TransactionCurrency                                 
 /*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_GLACCOUNTINCOMPANYCODE",
"I_OPERATIONALACCTGDOCITEM"
],
"ASSOCIATED":
[
"I_GLACCOUNTINCOMPANYCODE"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/