P_ClearedAccount4

DDL: P_CLEAREDACCOUNT4 SQL: PCLRDACCNT4 Type: view CONSUMPTION

P_ClearedAccount4 is a Consumption CDS View in SAP S/4HANA. It reads from 2 data sources (P_ClearedAccount3, I_JournalEntry) and exposes 10 fields with key fields CompanyCode, ClearingJournalEntry, ClearingJournalEntryFiscalYear, FinancialAccountType, Account.

Data Sources (2)

SourceAliasJoin Type
P_ClearedAccount3 CleardAccount inner
I_JournalEntry I_JournalEntry from

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName PCLRDACCNT4 view
AbapCatalog.compiler.compareFilter true view
VDM.viewType #CONSUMPTION view
VDM.private true view
AccessControl.authorizationCheck #NOT_ALLOWED view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (10)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode P_ClearedAccount3 CompanyCode
KEY ClearingJournalEntry P_ClearedAccount3 ClearingJournalEntry
KEY ClearingJournalEntryFiscalYear P_ClearedAccount3 ClearingJournalEntryFiscalYear
KEY FinancialAccountType P_ClearedAccount3 FinancialAccountType
KEY Account P_ClearedAccount3 Account
FinancialAccountTypeName P_ClearedAccount3 FinancialAccountTypeName
AccountName P_ClearedAccount3 AccountName
PostalCode P_ClearedAccount3 PostalCode
CityName P_ClearedAccount3 CityName
IntercompanyTransaction I_JournalEntry IntercompanyTransaction
@AbapCatalog.sqlViewName: 'PCLRDACCNT4'
@AbapCatalog.compiler.compareFilter: true
@VDM.viewType: #CONSUMPTION
@VDM.private: true
@AccessControl.authorizationCheck: #NOT_ALLOWED
@ClientHandling.algorithm: #SESSION_VARIABLE

define view P_ClearedAccount4 as  
//Support of Intercompany Use Case 

//Clearing Document belongs to an Intercompany transaction.

//Hence the other clearing documents belonging to the same Intercompany transaction need to be

//retrieved in order to get the cleared items which they have cleared

  select from I_JournalEntry
  
  inner join P_ClearedAccount3 as CleardAccount on  I_JournalEntry.CompanyCode        = CleardAccount.CompanyCode
                                                and I_JournalEntry.AccountingDocument = CleardAccount.ClearingJournalEntry
                                                and I_JournalEntry.FiscalYear         = CleardAccount.ClearingJournalEntryFiscalYear
{
  key CleardAccount.CompanyCode,
  key CleardAccount.ClearingJournalEntry,
  key CleardAccount.ClearingJournalEntryFiscalYear,
  key CleardAccount.FinancialAccountType,
  key CleardAccount.Account,
  
  CleardAccount.FinancialAccountTypeName,
  CleardAccount.AccountName,
  CleardAccount.PostalCode,
  CleardAccount.CityName,  
  I_JournalEntry.IntercompanyTransaction
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_JOURNALENTRY",
"P_CLEAREDACCOUNT3"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/