P_OffsettingAccountVH is a Composite CDS View in SAP S/4HANA. It reads from 5 data sources (I_Customer, I_GLAccountInChartOfAccounts, I_GLAccountInChartOfAccounts, I_GLAccountInChartOfAccounts, I_Supplier) and exposes 9 fields with key fields ChartOfAccounts, OffsettingAccount, ChartOfAccounts, OffsettingAccount, ChartOfAccounts.
@AbapCatalog.sqlViewName: 'PFIOFFACCTVH'
@AbapCatalog.compiler.compareFilter: true@AbapCatalog.preserveKey:true@VDM.viewType: #COMPOSITE@AccessControl.authorizationCheck: #NOT_REQUIRED@VDM.private:true@ClientHandling.algorithm: #SESSION_VARIABLE@AbapCatalog.buffering.status: #NOT_ALLOWED//@EndUserText.label: 'Private view for Offsetting Account Value Help'
defineview P_OffsettingAccountVH asselectfrom I_GLAccountInChartOfAccounts {
key I_GLAccountInChartOfAccounts.ChartOfAccounts,
keycast(I_GLAccountInChartOfAccounts.GLAccount as fis_gkont preserving type ) as OffsettingAccount,
keycast('S' as farp_gkoar preserving type ) as OffsettingAccountType
}
unionallselectfrom I_GLAccountInChartOfAccounts {
key I_GLAccountInChartOfAccounts.ChartOfAccounts,
keycast(I_GLAccountInChartOfAccounts.GLAccount as fis_gkont preserving type ) as OffsettingAccount,
keycast('A' as farp_gkoar preserving type ) as OffsettingAccountType
//I_GLAccountInChartOfAccounts._Text[1: Language = $session.system_language].GLAccountLongName as OffsettingAccountFullName
}
unionallselectfrom I_GLAccountInChartOfAccounts {
key I_GLAccountInChartOfAccounts.ChartOfAccounts,
keycast(I_GLAccountInChartOfAccounts.GLAccount as fis_gkont preserving type ) as OffsettingAccount,
keycast('M' as farp_gkoar preserving type ) as OffsettingAccountType
//I_GLAccountInChartOfAccounts._Text[1: Language = $session.system_language].GLAccountLongName as OffsettingAccountFullName
}
unionallselectfrom I_Customer {
keycast(' ' as fis_ktopl preserving type ) as ChartOfAccounts,
keycast(I_Customer.Customer as fis_gkont preserving type ) as OffsettingAccount,
keycast('D' as farp_gkoar preserving type ) as OffsettingAccountType
//I_Customer.CustomerFullName as OffsettingAccountFullName
}
unionallselectfrom I_Supplier {
keycast(' ' as fis_ktopl preserving type ) as ChartOfAccounts,
keycast(I_Supplier.Supplier as fis_gkont preserving type ) as OffsettingAccount,
keycast('K' as farp_gkoar preserving type ) as OffsettingAccountType
//I_Supplier.SupplierFullName as OffsettingAccountFullName
}