Skip to Content

This will be my shortest blog ever (but c’mon its only 10 points worth anyway).

You can make the implementation of interface methods optional now.


All you need to know is documented, what should I write more  😎 .

To report this post you need to login first.


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

  1. Former Member


    with all of the new functions that are being added to the ABAP language, would it be possible to also introduce an IS INSTANCE OF operator? This could be very handy:

    IF lr_object IS INSTANCE OF if_printable.

      lr_printable ?= lr_object.

      lr_printable->print( ).


      lr_generic_printer->print( lr_object ).


    At the moment, we have to rely on RTTI (cumbersome to write) or TRY-CAST-CATCH-CRASH-implementations which are not really clean either.



    1. Horst Keller
      Post author

      Hi Volker,

      You asked that  before and before 😕 .

      In the moment, the shortest way to write it is:

      DATA oref TYPE REF TO object.

      oref = NEW some_class( ).

      IF CAST cl_abap_classdescr(
           cl_abap_typedescr=>describe_by_name( ‘some_class’ )
             )->applies_to( oref ) = ‘X’.

      I’d like to have an INSTANCE OF too.  I’m not in a position to demand it but I’ll ask for it again 😉 .



      1. Former Member

        Hi Horst,

        Yes, I’ve asked that before and I will keep asking for it. 🙂

        I don’t particularly like the implicit variable declarations that some of the new constructs allow for – with the first example from ABAP News for 7.40, SP08 – Open SQL–open-sql,  it’s hard to tell what type result actually is. Personally, I don’t want to maintain stuff like that. I figured, if so much cool stuff that somehow violates some basic long-standing principles like explicit variable declaration is being added, why not keep pushing for “my” feature requests?



      2. Peter Inotai

        I’d like to have an INSTANCE OF too.  I’m not in a position to demand it but I’ll ask for it again

        It would be great. Currently we also use a helper method for this.

        If it is implemented in kernel, it would be even faster.



Leave a Reply