Ausdrücke in der Feldliste - Beispiele
@AbapCatalog.sqlViewName: 'ZJB_EXPRESSIONS'
@EndUserText.label: 'SQL Expressions'
define view zjb_cds_expressions
as select from zbc_users as u
left outer join zjb_cds_aggregation as t
on u.user_id = t.Assignee
{
key u.user_id as UserId,
u.firstname as Firstname,
u.lastname as Lastname,
u.email as Email,
u.gender as Gender,
u.date_of_birth as DateOfBirth,
u.changed_at as ChangedAt,
'EUR' as CurrencyCode,
$session.user as CurrentUser,
concat_with_space( Left(u.firstname, 1) , u.lastname , 1 ) as Name,
case u.gender when 'F' then 'Frau '
when 'M' then 'Herr '
else '' end
as Anrede,
concat_with_space( concat_with_space( 'User hat ',
cast( t.TaskCount as abap.char(11) ) ,
1 ),
' Aufgaben',
1 ) as CNT
}