Skip to Content

SAP NetWeaver AS ABAP 7.5 delivers many new features in the area of ABAP Core Data Services (ABAP CDS). In addition to the new CDS language features there are also many new CDS tools in ABAP in Eclipse. Here is a short overview of some of the tooling highlights.

Project Explorer

If you’re looking for your DDL sources in 7.5 you will now find them in your ABAP package under Core Data Services > Data Definitions. The CDS objects have been re-organised in the Project Explorer to make accessing your objects easier.

ProjectExplorer.png

Code Completion

Code completion in ADT and in the context of the CDS text editor is certainly nothing new. What is new is that you can now insert all the elements of the data sources into the select list of your CDS view definition with one completion. Trigger the code completion with CTRL+SPACE and choose “Insert all elements”. In addition to the fields, any public associations defined in the data sources are also added to the select list. The completion takes into consideration all data sources, including the joined data sources. After the insertion you can easily delete individual elements from the select list with the Eclipse keyboard shortcut CTRL+D (delete line).

InsertAllElements.png

There is also code completion support for the CDS predefined functions (SQL, conversion, date and time functions).

CodeCompletionPredefinedFunctions.png

On Clause Wizard

Code completion is great, but sometimes a wizard just gets the job done better. With the On Clause Wizard you can easily create the ON clauses of your SQL joins and your association definitions. To start the wizard place the cursor on the ON keyword and use the keyboard shortcut CTRL+1.  Choose “Define ON conditions”. Create the conditions by mapping the fields of the source data sources (left hand side) with the target data source (right hand side) using drag & drop. Use the Filter to quickly find corresponding fields in the data sources by name or by type. The wizard also offers some pre-defined strategies to automatically generate the mappings. The mappings can be generated “By Name” or, if your sources are database tables, “By Foreign Key”. In this case, any foreign key definitions stored in the ABAP Dictionary for the database tables can be used to generate the mappings.

OnClauseWizard.png

Active Annotations View

In addition to the “core” annotations supported in SAP NetWeaver AS ABAP 7.4, there are now many more domain-specific annotations which you can use in your CDS view definitions. These annotations can be used for OData exposure and analytical consumption of CDS views. If you have defined view hierarchies (“view on view”) then the element annotation values are propagated from the underlying views to the view above. If you want to know which annotations your view contains (including the propagated annotations) and where the individual annotation values originated from, then you can use the Active Annotations View. Start the view in the context menu of the DDL source: Open With > Active Annotations. For each annotation the value and the origin is displayed. Navigate to the origin by double clicking on the  data source or data element name.

ActiveAnnotationsView.png

Show SQL CREATE Statement

If you want to see which SQL joins were generated in the database system for the path expressions in your view definitions or if you want to see the order of the generated joins, then you can easily display the CREATE statement for the corresponding SQL view directly in ADT. Select “Show SQL CREATE Statement” in the context menu of the DDL source.

ShowSQLCreateStatement.png

Dependency Analyzer

Another useful tool to help you analyze the dependencies of your CDS view is the Dependency Analyzer. While the CREATE statement only displays the direct dependencies, the Dependency Analyzer recursively analyzes the data sources and also displays the indirect dependencies to other database objects in the SQL Dependency Tree. In the Dependency Analyzer you can see which database tables are used by your query to select data from the database and you can easily identify redundant joins which might negatively affect the performance of your query. Start the Dependency Analyzer in the context menu of the DDL source: Open With > Dependency Analyzer. Search for database objects by entering the SQL name in the Search Toolbar. Navigate to the objects by double clicking on the SQL name. Finally, you can export the contents of the SQL Dependency Tree to a CSV file to analyze the dependencies in another external tool.

DependenyAnalyzer.png

To report this post you need to login first.

7 Comments

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

  1. Valentino Paderni

    Hello Chritiaan, the display of active annotation gave me a hint to sole a dilemma, but i’m having bardo time to understand how annotation file is deployed on back end.

    righ now on nw750 sp0 i get to work odiata service on actuvation of cds but no annotation file is retrivable… Than the issue is propagating at web ide weh ere no ann file is selectable

    until i solve The missini pièce i was hoping to download the ann xml from eclipse

    thank you for any other hint

    (0) 
    1. Christiaan Edward Swanepoel Post author

      Hi Valentino,

      the CDS OData exposure is done via SADL and SAP Gateway. To my knowledge, no persistent annotation file is created in this scenario, but I might be wrong. You might consider posting this question in the BOPF Application Framework space: BOPF Application Framework or SAP Gateway space: SAP Gateway .

      On the other hand, why don’t you simply capture the HTTP responses when using/testing your OData Service and copy the required content into your own local file?

      Regards

      Chris

      (0) 
  2. Gaurav Gaurav

    Hi Christiaan,

    How can i use the ABAP CDS view with analysis for office.. I am not able to see the view that i have created, does any special role is required to view that.

    Kindly help on this. I have posted the question but no reply yet. Need this little urgent.

    SAP ABAP CDS

    Thanks in advance

    Gaurav

    (0) 
  3. Ceyhun Alp

    Thank you for the information.

    Though I have ABAP in Eclipse version 2.68.5, I cant see “insert all elements” when i press ctrl + space. SAP_ABA Component is 7.40 SP12, do you think this is the case?

    (0) 

Leave a Reply