Вы находитесь на странице: 1из 7

9/30/2018 ABAP on HANA – Step by step procedure to create a CDS view using input parameters to display multiple records.

multiple records. | SAP Blogs

Products
Products Industries
Industries Support
Support Training
Training Community
Community Developer
Developer Partner
Partner About
About  
Ask a Question Write a Blog Post Login

ABAP on HANA – Step by step procedure to create a


CDS view using input parameters to display multiple
records.
November 29, 2016 | 4,902 Views |

Sharmila Gurubelli
more by this author

ABAP Development

share
0 share tweet share

Follow

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

1. Go to Dic onary => ABAP DDL Sources => New Data Defini on

2. Create a New Data Defini on

https://blogs.sap.com/2016/11/29/abap-on-hana-step-by-step-procedure-to-create-a-cds-view-using-input-parameters-to-display-multiple-records./ 1/7
9/30/2018 ABAP on HANA – Step by step procedure to create a CDS view using input parameters to display multiple records. | SAP Blogs

3. Load the template and click on finish

https://blogs.sap.com/2016/11/29/abap-on-hana-step-by-step-procedure-to-create-a-cds-view-using-input-parameters-to-display-multiple-records./ 2/7
9/30/2018 ABAP on HANA – Step by step procedure to create a CDS view using input parameters to display multiple records. | SAP Blogs

4. Source Code

5. Output

https://blogs.sap.com/2016/11/29/abap-on-hana-step-by-step-procedure-to-create-a-cds-view-using-input-parameters-to-display-multiple-records./ 3/7
9/30/2018 ABAP on HANA – Step by step procedure to create a CDS view using input parameters to display multiple records. | SAP Blogs

Alert Moderator

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

Former Member

December 1, 2016 at 2:58 am

Useful..

Former Member

December 8, 2016 at 8:06 am

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.

https://blogs.sap.com/2016/11/29/abap-on-hana-step-by-step-procedure-to-create-a-cds-view-using-input-parameters-to-display-multiple-records./ 4/7
9/30/2018 ABAP on HANA – Step by step procedure to create a CDS view using input parameters to display multiple records. | SAP Blogs

Sharmila Gurubelli Post author

December 8, 2016 at 12:18 pm

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;

https://blogs.sap.com/2016/11/29/abap-on-hana-step-by-step-procedure-to-create-a-cds-view-using-input-parameters-to-display-multiple-records./ 5/7
9/30/2018 ABAP on HANA – Step by step procedure to create a CDS view using input parameters to display multiple records. | SAP Blogs

Output:

This may help you

Former Member

December 14, 2016 at 6:48 am

This is a work around and will not work in real time as we are not sure how much many values the user needs
for input

Share & Follow

Privacy Terms of Use

https://blogs.sap.com/2016/11/29/abap-on-hana-step-by-step-procedure-to-create-a-cds-view-using-input-parameters-to-display-multiple-records./ 6/7
9/30/2018 ABAP on HANA – Step by step procedure to create a CDS view using input parameters to display multiple records. | SAP Blogs

Legal Disclosure Copyright

Trademark Cookie Preferences

Sitemap Newsletter

https://blogs.sap.com/2016/11/29/abap-on-hana-step-by-step-procedure-to-create-a-cds-view-using-input-parameters-to-display-multiple-records./ 7/7

Вам также может понравиться