CDS view with input parameters
* 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_IP_STU'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'input parameters in cds views'
define view zab_cds_ip_stu
with parameters p_dept : zst_dept
as select from zajay_zstu
{
key zst_id as ZstId,
zst_name as ZstName,
zst_dept as ZstDept,
zst_fee as ZstFee
}
where zst_dept = :p_dept
4. Check and activate. Run as ABAP application.
Input
Output
*****************************Thank You**************************
Comments
Post a Comment