728x90
반응형
Calculation CDS View에서는 연산 작업을 수행한다. key와 필드 갯수가 이전 CDS View인 Initial View와 같을 필요가 없다. 가공하는 것이기 때문에.
@AbapCatalog.sqlViewName: 'ZCDSTEST003_CDS'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'PO Calculation CDS view'
define view zcdstest003_ddl
as select from zcdstest002_ddl
{
key ebeln,
key ebelp,
bukrs,
bsart,
LEFT(aedat,4) as ZYEAR,
LEFT(aedat,6) as ZMONTH,
case SUBSTRING(aedat, 5, 2)
when '01' then '01'
when '02' then '01'
when '03' then '01'
when '04' then '02'
when '05' then '02'
when '06' then '02'
when '07' then '03'
when '08' then '03'
when '09' then '03'
when '10' then '04'
when '11' then '04'
when '12' then '04'
end as ZQUARTER,
aedat,
matnr,
werks,
lgort,
@Semantics.quantity.unitOfMeasure: 'MEINS'
menge,
@Semantics.unitOfMeasure
meins,
banfn,
bnfpo,
mtart,
@Semantics.amount.currencyCode: 'WAERS'
netpr,
@Semantics.currencyCode
waers,
@Semantics.amount.currencyCode: 'WAERS'
( netpr * menge ) as amount
}
새로 추가한 필드들이 뷰에서도 추가가 되서 생성된다.
728x90
반응형
'Fiori > CDS View' 카테고리의 다른 글
Cube CDS View (0) | 2023.03.09 |
---|---|
Grouping CDS View (0) | 2023.03.09 |
Initial CDS View (0) | 2023.03.09 |
Table function (0) | 2023.03.09 |
AMDP (0) | 2023.03.09 |
댓글