@AbapCatalog.sqlViewName: 'PCLRDACCNT3'
@AbapCatalog.compiler.compareFilter: true@VDM.viewType: #CONSUMPTION@VDM.private: true@AccessControl.authorizationCheck: #NOT_ALLOWED@ClientHandling.algorithm: #SESSION_VARIABLEdefineview P_ClearedAccount3 asselectfrom 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,
casewhen FinancialAccountType = 'D' then
_Customer.CustomerName
when FinancialAccountType = 'K' then
_Supplier.SupplierName
when FinancialAccountType = 'S' then
_GLAccount._Text[1:Language=$session.system_language].GLAccountName
else
''
endas AccountName,
casewhen FinancialAccountType = 'D' then
_Customer._StandardAddress.PostalCode
when FinancialAccountType = 'K' then
_Supplier._StandardAddress.PostalCode
else
''
endas PostalCode,
casewhen FinancialAccountType = 'D' then
_Customer._StandardAddress.CityName
when FinancialAccountType = 'K' then
_Supplier._StandardAddress.CityName
else
''
endas 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":""
}
}*/