TIMESTAMP フィールドで DISTINCT を指定して COUNT を使用しているときに問題が発生しました。以下は私の CDS ビューです。助けてください。ConfirmedDateフィールドにCOUNTを入れたい。
@AbapCatalog.sqlViewName: 'ZXEWMIWT'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Interface View for Warehouse Task detail'
@OData.publish: true
// I* type:ddls
define view ZXEWMI_WT as select from /scwm/ordim_c as ORDIM_C {
key ORDIM_C.lgnum as WarehouseNo,
@UI.selectionField: [{ position: 1 }]
@UI.lineItem: [{ position : 1 }]
ORDIM_C.processor as Processor,
@UI.lineItem: [{ position : 2 }]
//count(distinct ORDIM_C.confirmed_at) as sum_wt
**tstmp_to_dats( ORDIM_C.confirmed_at,
abap_system_timezone( $session.client,'NULL' ),
$session.client,
'NULL' ) as ConfirmedDate**
}where processor <> ''
group by lgnum, processor, confirmed_at;