ABAP CDS Entity
To define an ABAP CDS entity it is required that a you create a DDL source as the appropriate ABAP development object.
SAP NetWeaver 7.4 provides a basic DDL support as part of a Core Date Services (CDS) layer for defining CDS (view) entities for views as projections onto relational database tables or as projections onto other views. For each ABAP CDS entity defined in the DDL source code, an SQL view is generated in the ABAP Dictionary. Like views created by means of Dictionary tools (transaction SE11), ABAP CDS entities can be accessed in ABAP using Open SQL statements.
Defining Entities
In ABAP Development Tools, the text-based DDL editor is used to write source code of ABAP CDS entities. A DDL source is exactly the development object that allows you to define ABAP CDS entities. The CDS entity defines the structure of the SQL view that is generated in the ABAP Dictionary.

Figure: Defining the CDS entity in the DDL editor
Example@AbapCatalog.sqlViewName: 'CUSTOMER_VW'
DEFINE VIEW cust_book_view_entity AS SELECT FROM scustom
JOIN sbook
ON scustom.id = sbook.customid
{
scustom.id,
scustom.name,
sbook.bookid
}
The CDS entity cust_book_view_entity defines a projection onto the database tables scustom and sbook by joining both tables. The generated SQL view (CUSTOMER_VW) comprises the ID, the name, and the booking ID of all customers for which the bookings exist.
Accessing CDS Entities in ABAP
Like regular Dictionary projection views, ABAP CDS entities can be used in ABAP Open SQL for data selection. The following method lists all a customer's booking data that is stored in the underlying database tables. The CDS entity (in this case: cust_book_view_entity) is used for data selection in ABAP.
ExampleCLASS cl_demo_access_cds_entity IMPLEMENTATION.
...
METHOD get_data.
SELECT id name bookid
FROM cust_book_view_entity
INTO TABLE @DATA(result_data)
WHERE ... .
ENDMETHOD.
...
ENDCLASS.