Skip to Content
Technical Articles
Author's profile photo ramu karanam

Using Select Options to build an CDS View in SAP HANA STUDIO

Hi All,

Hope every one is doing Good:)

INTRODUCTION:

A CDS view is defined for existing database tables and views, or for other CDS views in ABAP Dictionary, using the ABAP CDS statement DEFINE VIEW . A CDS view serves to define the structure of an SQL view and represents a projection onto one or several Dictionary tables or Dictionary views.

We have been seeing many questions in SCN and other forums regarding how to use select options in AMDP , CDS etc. SELECT OPTIONS is not an SQL feature . Its an ABAP ( or OPEN SQL ) feature which SQL script does not understand

In Select-Options What can  we do ? Only filtering technique SQL can understand is using a where clause . In select options ,we have many choices of passing inputs , like EQ , NE , CP , BETWEEN etc.

1. Open the SAP HANA STUDIO/ECLIPSE in your Desktop. Create a service definition and maintain the CDS View Name and description.


2.Click on Next button below template screen will display.


3.Maintain the code as per the below screenshot.

4.Once the code has done and activate the View and execute. Will Navigate into Selection screen
there we can enter max and min in between then the records will fetch as per the below screenshot.

5.After enter the parameter values and click on OK button.

Hope this blog will helps

Thank You..

 

 

Assigned Tags

      3 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Sadullah TANRIKULU
      Sadullah TANRIKULU

      Excellent, now it's in my bag 😃, thanks a lot.

      Author's profile photo ramu karanam
      ramu karanam
      Blog Post Author

      Thank You..

      Author's profile photo sachin shinde
      sachin shinde

      Thank you Ramu for this blog.

      I have query, what if I have list of few values instead of range ? Also how to handle exclusions ?