Skip to Content
author's profile photo
Former Member

ABAP OO - Creating/copying interface

Dear,

I've lots of experience in 'native' ABAP, but I'm new to OO, hence these 2, perhaps somewhat strange questions.

1. When I look at a standard SAP interface using SE24 (e.g. IF_BCM_SAVE), I see it contains some methods, but I expect to be able to double-click and see the source-code of the method; why can't I get there?

2. When I want to copy this interface to one of my own (e.g.ZIF_BCM_SAVE) because I want to add some functionality, will the underlying code of the used methods be copied as well? If not, what is the way forward?

Thanx a lot for your reply!

Regards,

Marco

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • Best Answer
    author's profile photo
    Former Member
    Sep 30, 2005 at 02:52 PM

    Hello Marco,

    Interfaces is just the skeleton of the class definition.

    If you want to have your own code for all or any of the methods that interface is havings then you can create an instance of that interface and implement those methods with you own code.

    That is the advantage of object oriented programming. And if you want to use the standard method or original method's functionality then you have call the method along with the class which implemented it like below

    class => method1

    Thanks

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Sep 30, 2005 at 02:45 PM

    Hi,

    Accourding OO concept interfaces don't contain any inmlementation.

    Svetlin

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Sep 30, 2005 at 03:02 PM
    Add comment
    10|10000 characters needed characters exceeded

  • Sep 30, 2005 at 02:44 PM

    It seems that you may be a little confused about interfaces. Interfaces are like gateways to classes. Methods that you see in the interfaces do not actually hold the code. The classes in which the interface is implemented will hold the code. I don't work with them often, so I'm afraid that I can not offer you more than that. Anyone else, please?

    Regards,

    Rich Heilman

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 30, 2005 at 02:54 PM

    Create a class (in Se24 Usual class/Non final) and add IF_BCM_SAVE to the interface tab.

    Then you will have the mentods from this interface.

    Double click on the method you want to implement and you can add your logic there.

    Just tested in 46C and it worked like this.

    Peter

    Add comment
    10|10000 characters needed characters exceeded