@VDM.private: true
@VDM.viewType: #COMPOSITE
@AbapCatalog.sqlViewName: 'PRUEXTNUMBYDEF1'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.authorizationCheck: #NOT_REQUIRED
define view P_RU_ExtNumByDefault1
as select from I_RU_ExtNumByDefault
{
key CompanyCode,
key AccountingDocumentType,
ExtDocNmbrAndDteAreFilled,
case
when CompanyCode <> '' and AccountingDocumentType <> ''
then 3
when CompanyCode <> '' and AccountingDocumentType = ''
then 2
when CompanyCode = '' and AccountingDocumentType <> ''
then 1
else 0
end as Rank
}