以下是一个case when的示例
@AbapCatalog.sqlViewName: 'ZS_TEST_CASE'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'CASE WHEN TEST'
define view Z_TEST_CASE as select from sbook
{
carrid,
customid,
case class
when 'F' then ' '
else case
when (wunit = 'KG' and luggweight >20)
OR ()wunit = 'LB' and luggweight >44 )then 'X'
else ' ooo '
else 'xxx'
end as excess_liggage1
}