Alias in CDS view

 * Data in SE11.



Create CDS view

1. Right click on object and select new. Click on other repository objects. Expand core data service and double click on data definition.
2. Give CDS entity name and description. Click on next select package/TR and select define view with parameters and click on finish.

3. Give SQL view name.

Code

@AbapCatalog.sqlViewName: 'ZAB_SQL_ALIAS'

@AbapCatalog.compiler.compareFilter: true

@AbapCatalog.preserveKey: true

@AccessControl.authorizationCheck: #NOT_REQUIRED

@EndUserText.label: 'Alias in cds views'

define view zab_cds_alias

with parameters p_dept : zst_dept

as select from zajay_zstu

{

key zst_id as Student_ID,

zst_name as Student_name,

zst_dept as Student_dept,

zst_fee as Student_fee

}

where zst_dept = :p_dept



Input




Output



*****************************Thank You**************************

Comments

Popular posts from this blog

New syntax for append- VALUE (new syntax 7.4+) in ABAP

Pf status and user command in factory method - OOPS ALV in ABAP

Add custom tab to me51n at item level in ABAP