Skip to Content

This blog shows how to display multiple records by using input PARAMETERS keyword, As there is no provision to use ABAP keyword SELECT-OPTIONS which display multiple records in CDS View.

1. Go to Dictionary => ABAP DDL Sources => New Data Definition

2. Create a New Data Definition

3. Load the template and click on finish


4. Source Code

5. Output

To report this post you need to login first.

4 Comments

You must be Logged on to comment or reply to a post.

  1. Ibrahim Khan

    Hi Sharmila,
    We can have ranges parameter using the between operator, but how do we provide multiple values for a input parameter in the same way we do in select options,. please advice.

    (0) 
    1. Sharmila Gurubelli Post author

      Hi Ibrahim,

      In CDS Views (ABAP on HANA) we don’t have any functionality like select-options as in ABAB.

      Here we can get the multiple values by using multiple input parameters and assign to where condition.

      define view Zcds_View with  parameters 
                                 p_ebeln1:ebeln,
                                 p_ebeln2:ebeln,
                                 p_ebeln3:ebeln,
                                 p_ebeln4:ebeln,
                                 p_ebeln5:ebeln
      
      as select from ekko
              join ekpo 
              on ekko.ebeln = ekpo.ebeln
      {
        ekko.ebeln as purchasing_docu,
        ekko.bukrs,
        ekko.ernam,
        ekpo.ebelp,
        ekpo.aedat,
        ekpo.meins
      }
      
      where ekpo.ebeln= :p_ebeln1 or 
            ekpo.ebeln= :p_ebeln2 or 
            ekpo.ebeln= :p_ebeln3 or 
            ekpo.ebeln= :p_ebeln4 or 
            ekpo.ebeln= :p_ebeln5;

      Output:

      This may help you 🙂

      (0) 

Leave a Reply