on 05-23-2017 12:17 PM - last edited on 02-03-2024 10:40 PM by postmig_api_4
Hi Experts,
I tried to develop a simple Fiori app by using CDS and then publish to OData service. Using Smart template in SAP WEB IDE to consume the OData service.
However, I found the the Annotation xml is not created as I expected. BTW, I followed a very good tutorial as below. I copied the code totally, however it has different result.
https://blogs.sap.com/2016/05/09/how-to-create-smart-templates-annotations-within-cds-views-part-2/
I am not sure if it is the issue about SAP WEB IDE, because I used SAP WEB IDE Personal Edition version.
Will this issue be solved by using SAP WEB IDE in HCP?
Thank you so much.
As below are my CDS codes.
@AbapCatalog.sqlViewName: 'Z_VW_SOLITEMS'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Demo of CDS'
define view Z_SZ_Sample_Demo_Soli
as select from sepm_isoi as SOLItems
{
key SOLItems.salesorderitemuuid,
SOLItems.salesorderuuid as SalesOrderID,
SOLItems.salesorderitem as ItemPosition,
SOLItems.productuuid as ProductID,
SOLItems.shorttextgroupuuid as NoteID,
SOLItems.transactioncurrency as CurrencyCode,
SOLItems.grossamountintransaccurrency as GrossAmount,
SOLItems.netamountintransactioncurrency as NetAmount,
SOLItems.taxamountintransactioncurrency as TaxAmount,
SOLItems.productavailabilitystatus as StatusAvailability,
SOLItems.opportunityitem as OpportunityItem
}
@AbapCatalog.sqlViewName: 'Z_VW_PRODUCTS'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Products'
@OData.publish: true
@UI.headerInfo:{
typeName: 'Product',
typeNamePlural: 'Products',
imageUrl: {value: 'PictureUrl'},
title: {value: 'Name'},
description: {value: 'Description'}
}
define view Z_Sample_Demo_Products
as select from sepm_iproduct as Products
association [1..*] to Z_SZ_Sample_Demo_Soli as _SOItems
on $projection.productuuid = _SOItems.ProductID
association [1..1] to sepm_iproductt as _ProductT
on $projection.productuuid = _ProductT.productuuid
and _ProductT.language = 'E'
association [1..1] to sepm_ibupa as _Supplier
on $projection.supplieruuid = _Supplier.businesspartneruuid
{
key Products.productuuid,
Products.product as ProductID,
Products.producttype as TypeCode,
Products.productcategory as Category,
_ProductT.productname as Name,
'EN' as NameLanguage,
_ProductT.productdescription as Description,
'EN' as DescriptionLanguage,
_Supplier.businesspartner as SupplierID,
_Supplier.companyname as SupplierName,
Products.productvalueaddedtax as TaxTarifCode,
Products.productbaseunit as MeasureUnit,
Products.weight as WeightMeasure,
Products.weightunit as WeightUnit,
Products.currency as CurrencyCode,
Products.price as Price,
Products.width as Width,
Products.depth as Depth,
Products.height as Height,
Products.dimensionunit as DimUnit,
Products.creationdatetime as CreatedAt,
Products.lastchangeddatetime as ChangedAt,
concat(concat('/webapp/images/',Products.product),'.jpg') as PictureUrl,
Products.supplieruuid,
_SOItems
}
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.