Skip to Content

Code completion and ABAP Element Info not working when ABAP CDS View Entity is referenced

Hi Community,

I created a new ABAP CDS view and activated it. Now I am running into 2 issues when referencing the view entity:

  1. When I write a SELECT statement to select from the CDS view entity, code completion does not suggest the view entity as an object I can select from. E.g. If I create a CDS view with an entity name of Z_CDS_VIEW_ENTITY and a SQL view name of Z_CDS_VIEW, when I am writing the SELECT statement and start typing 'Z_CDS_V...', code completion will suggest the SQL view (Z_CDS_VIEW), but not the view entity (Z_CDS_VIEW_ENTITY). This is strange, since SAP recommends always selecting from the view entity.
  2. I created an interface that will be the basis for an object that will contain all of my SQL accesses to the view entity. In that interface, I defined a table type based on the view entity (e.g. TYPES gty_cds_view_t TYPE TABLE OF z_cds_view_entity.). There is no syntax error in the interface and it activates fine. I then implemented that interface in a class. If while editing the class I try to pull up the ABAP Element Info (F2 in ADT), it causes a short dump with the reason "Access using a 'ZERO' object reference is not possible." If I change the interface so that the structure of the table type is explicitly defined in another TYPES statement in the interface (instead of referencing the view entity), ABAP Element Info works fine.

I am working on a NW 7.40 SP13 system on DB2, using ADT version 2.89 on Eclipse Oxygen.

Has anyone else ever encountered these issues? I have tried searching SCN and Google with no luck so far.


Scott Lawton

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Apr 11, 2018 at 04:24 PM

    Yes, I also had these at some point. Not sure if all of them were fixed but implementing this note helped:

    2530996 Runtime error for code completion in ADT

    Add comment
    10|10000 characters needed characters exceeded