P_CLEAREDACCOUNT3

CDS View

P_CLEAREDACCOUNT3 is a CDS View in S/4HANA. It contains 9 fields. 1 CDS views read from this table.

CDS Views using this table (1)

ViewTypeJoinVDMDescription
P_ClearedAccount4 view inner CONSUMPTION

Fields (9)

KeyField CDS FieldsUsed in Views
KEY Account Account 1
KEY ClearingJournalEntry ClearingJournalEntry 1
KEY ClearingJournalEntryFiscalYear ClearingJournalEntryFiscalYear 1
KEY CompanyCode CompanyCode 1
KEY FinancialAccountType FinancialAccountType 1
AccountName AccountName 1
CityName CityName 1
FinancialAccountTypeName FinancialAccountTypeName 1
PostalCode PostalCode 1
@AbapCatalog.sqlViewName: 'PCLRDACCNT3'
@AbapCatalog.compiler.compareFilter: true
@VDM.viewType: #CONSUMPTION
@VDM.private: true
@AccessControl.authorizationCheck: #NOT_ALLOWED
@ClientHandling.algorithm: #SESSION_VARIABLE

define view P_ClearedAccount3 as 
  select from P_ClearedAccount2 
  
  association [0..1] to I_Customer  as _Customer  on  P_ClearedAccount2.Account              = _Customer.Customer
                                                  and P_ClearedAccount2.FinancialAccountType = 'D'
                                                  
  association [0..1] to I_Supplier  as _Supplier  on  P_ClearedAccount2.Account              = _Supplier.Supplier
                                                  and P_ClearedAccount2.FinancialAccountType = 'K'
                                                  
  association [0..1] to I_GLAccount as _GLAccount on  P_ClearedAccount2.Account              = _GLAccount.GLAccount
                                                  and P_ClearedAccount2.FinancialAccountType = 'S'
                                                  and P_ClearedAccount2.CompanyCode          = _GLAccount.CompanyCode
                                                        
  association [0..1] to I_FinancialAccountTypeText as _FinancialAccountTypeText 
                                                  on  P_ClearedAccount2.FinancialAccountType = _FinancialAccountTypeText.FinancialAccountType
                                                  and _FinancialAccountTypeText.Language  = $session.system_language 
{
 key CompanyCode,
 key ClearingJournalEntry,
 key ClearingJournalEntryFiscalYear,
 key FinancialAccountType,
 key Account,
 
 _FinancialAccountTypeText[1:Language=$session.system_language].FinancialAccountTypeName,
 
 case
    when FinancialAccountType = 'D' then   
      _Customer.CustomerName     
    when FinancialAccountType = 'K' then  
      _Supplier.SupplierName   
    when FinancialAccountType = 'S' then                                                        
      _GLAccount._Text[1:Language=$session.system_language].GLAccountName
    else
      ''
  end                                                               as AccountName,  
  
  case
    when FinancialAccountType = 'D' then   
      _Customer._StandardAddress.PostalCode    
    when FinancialAccountType = 'K' then  
      _Supplier._StandardAddress.PostalCode 
    else                                                       
      ''
    end                                                             as PostalCode,
 
  case
    when FinancialAccountType = 'D' then   
      _Customer._StandardAddress.CityName    
    when FinancialAccountType = 'K' then  
      _Supplier._StandardAddress.CityName 
    else                                                        
      ''
    end                                                             as CityName
} 
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ADDRESS",
"I_CUSTOMER",
"I_FINANCIALACCOUNTTYPETEXT",
"I_GLACCOUNT",
"I_GLACCOUNTTEXTINCOMPANYCODE",
"I_SUPPLIER",
"P_CLEAREDACCOUNT2"
],
"ASSOCIATED":
[
"I_CUSTOMER",
"I_FINANCIALACCOUNTTYPETEXT",
"I_GLACCOUNT",
"I_SUPPLIER"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/