본문 바로가기
Fiori/CDS View

Consumption CDS View

by clode 2023. 3. 9.
728x90
반응형

VDM (Virtual Data Model)로 사용 할 수 있는 CONSUMPTION CDS View 생성해본다. 이 CDS View가 최종적으로 OData가 될 CDS View이다.

@AbapCatalog.sqlViewName: 'ZCDSTEST1_CDS_P'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'PO Consumption CDS view'
@Analytics.query: true
@VDM.viewType: #CONSUMPTION
@OData.publish: true
define view zcdstest001_ddl_p
as select from zcdstest005_ddl 
{
               @EndUserText.label: '자재번호'
  key          matnr, 
               @EndUserText.label: '플랜트'
  key          werks, 
               @EndUserText.label: '회사코드'
  key          bukrs, 
               @EndUserText.label: '년도'
  key          ZYEAR,
               @EndUserText.label: '월'
  key          ZMONTH, 
               @EndUserText.label: '분기'
  key          ZQUARTER, 
               @EndUserText.label: '자재타입'
  key          mtart, 

               @EndUserText.label: '발주수량'
               @Semantics.quantity.unitOfMeasure: 'MEINS'
               menge,
               @EndUserText.label: '단위'
               @Semantics.unitOfMeasure
               meins,
               @EndUserText.label: '단가'
               @Semantics.amount.currencyCode: 'WAERS'
               netpr,
               @EndUserText.label: '금액'
               amount,
               @EndUserText.label: '통화'
               @Semantics.currencyCode
               waers
}

@VDM.viewType: #CONSUMPTION CDS View의 특성을 Consumption 타입으로 정의한다.
@Analytics.query: true
@OData.publish: true OData Service Model 선언한다.

728x90
반응형

'Fiori > CDS View' 카테고리의 다른 글

OData Service 생성 (+Fiori 연동)  (0) 2023.03.09
Cube CDS View  (0) 2023.03.09
Grouping CDS View  (0) 2023.03.09
Calculation CDS View  (0) 2023.03.09
Initial CDS View  (0) 2023.03.09

댓글