Skip to Content

Hi everyone!

here we go with another “Spotlight on …” blog! ūüôā

This time I would like to put the light on the modification-free enhancement of ABAP Core Data Services (CDS) views which is supported starting with AS ABAP 7.4 SP8.

The modification-free enhancement of development objects is necessary, in order to avoid conflicts when a new release of the related application program is to be imported into a system. To avoid such conflicts in the context of ABAP CDS views, developers now have the possibility to create so-called CDS view extensions which allow the extension of the existing SELECT list in modification-free manner.

One or more view extensions can be created for a CDS view, with each of them having its own CDS source code. The SELECT list of the view extension can have all elements of a SELECT list with the exception of input parameters, path expressions, and aggregate expressions. A field cannot be defined as key field using the keyword KEY in the view extensions.

Watch the compact video tutorial below and learn how to create CDS view enhancements and call the enhanced CDS views in ABAP.

Note that currently following views cannot be enhanced using CDS view extensions:

  • CDS views with an explicit name list
  • CDS views with a  GROUP BY clause
  • CDS views with a UNION clause for union sets

Find more detailed information on this topic in the ABAP Keyword Documentation.

To report this post you need to login first.

10 Comments

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

  1. Paul Hardy

    Hello

    When I try to activate a CDS extension view I get the cryptic message in Eclipse “An internal exception was raised, view definition and extend do”.

    I have to say the error messages in Eclipse are even more obscure than the ones in the SE80 editor.

    How do I go about finding out what that means?

    I was trying to extend view CDS_KNA1_NAME1, adding some Z fields from KNA1 on the end. Something is wrong with the standard view I had chosen, maybe it cannot be extended for some reason (it does not seem to have any of the three special cases mentioned above) but the system does not want to tell me what.

    Cheersy Cheers

    Paul

    (0) 
    1. Kilian Kilger

      Hi Paul,

      you always have to read the activation log. You can access it easily via the dropdown menu in Eclipse. The collegues really try to improve the error messages though.

      Can you post a screenshot of the error message for my collegues to analyze.

      Best regards,
      Kilian.

      (0) 
      1. Paul Hardy

        Hello,

        I managed to call up the activation log as you suggested. Sadly it was not as much help as I might have wished for.

        Activation Log.GIF

        (0) 
        1. Kilian Kilger

          Hi Paul,

          please click on the link:

          “See log HARDY…”

          This is the long log. The short log is not useful.

          Best regards,
          Kilian.

          (0) 
          1. Paul Hardy

            Sorry, I tried to click on the blue link but nothing happened. I trued again just now, and discovered you have to have the control key pressed down and then click on the blue link and the extended log appears. I imagine the clue is somewhere in the success/information messages before the error message.

            The error message itself is no more or less detailed than before.

            Cheersy Cheers

            Paul

            eclilpse log.GIF

            (0) 
            1. Kilian Kilger

              Hi Paul,

              can you please open a ticket? I know that it is more cumbersome than writing an SCN entry, but without a “working” example it is very hard to reproduce and track these issues. Many people are not satisfied with many error messages, but without tickets, nothing will ever change. Our developers don’t have the time to read SCN regulary. But with a ticket, you get a feedback and we can track these issues internally.

              It would be good, if the ticket contained a copy of the view / extend.

              Best reagards,
              Kilian.

              (0) 
  2. Ben Li

    Hello,

    Thanks for the demo.

    Here I have one question is, I see it uses SELECT * to get enhanced fields, but SELECT * may not be always good to performance. e.g. in some cases I need enhanced fields but not good in performance to fetch all standard columns(with big standard view).

    Is there any other syntax in ABAP SQL support to get enhanced CDS fields but not *?  Or any other hints?

    Best regards,

    Ben

    (0) 
  3. Jonathan Choi

    What about the SAP enhancement framework?¬†¬†I’ve always used BAPI for external integration such as using Java or dotnet¬†application.¬† BAPI contains SAP¬†enhancements so we don’t have to worry about¬†it; even for reading SAP objects for reporting, we¬†should use BAPI.¬†¬†Within the CDS view, we should add¬†way to¬†call BAPI to validate results, update and so on.

    (0) 

Leave a Reply