CDS View with Input Parameters and calling it throgh SE38

CDS View with Prameters:

@AbapCatalog.sqlViewName: 'ZV_CDS_IP_PARAM'

@AbapCatalog.compiler.compareFilter: true

@AbapCatalog.preserveKey: true

@AccessControl.authorizationCheck: #NOT_REQUIRED

@EndUserText.label: 'View with parameters'

define view ZAB_CDS_WITH_PARAMETERS

with parameters

P_MTART : mtart,

P_MATKL : matkl

as select from mara

{

key matnr as MATERIAL,

mtart as MAT_TYPE,

matkl as MAT_GROUP

}

where

mtart = :P_MTART

and matkl = :P_MATKL

 

 

Calling CDS View through SE38:

 

Program: REPORT zvb_test. 

PARAMETERS:p_mtype  TYPE mtart,
           p_mgroup TYPE matkl.
SELECT  *   FROM zab_cds_with_parametersp_mtart @p_mtypep_matkl @p_mgroup )   INTO TABLE @DATA(lt_data).
 

 

Calling CDS View in another CDS View: 

 

@AbapCatalog.sqlViewName: 'ZV_CALL_CDS'

@AbapCatalog.compiler.compareFilter: true

@AbapCatalog.preserveKey: true

@AccessControl.authorizationCheck: #NOT_REQUIRED

@EndUserText.label: 'Call CDS in another CDS'

define view ZAB_CALL_CDS

with parameters

P_MTYPE : mtart,

P_MGROUP : matkl

as select from ZAB_CDS_WITH_PARAMETERS(P_MTART:$parameters.P_MTYPE, P_MATKL: $parameters.P_MGROUP )

{

MATERIAL as MATERIAL,

MAT_TYPE,

MAT_GROUP

}


  

 


Comments

Popular posts from this blog

CDS Views: Table Functions with Example

Passing Dynamic Variables to SO10 TEXT

Adobe Form/PDF Form Introduction