Skip to Content
author's profile photo Former Member
Former Member

BOR with supertype : inheritance possibility ?

Hi all,

sorry for the following question but...is it possible to create a new BOR (named ZOBJECT for my example) with a supertype, with a new method and after i would like that this method is inherited in the supertype.

Strange but a guy with whom i work told me that it was possible in previous versions of SAP.

Other question, i create a new BOR with supertype, i would like to add some controls for a method. If i redefine this method, i must rewrite all the code, i can't call the mother method of the supertype ?

Thanks for help.

Edited by: CECG on Jan 28, 2008 5:57 PM

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 28, 2008 at 05:16 PM

    Hi CECG,

    - I tried to do this with a BO of my own "Z_WFCUSTOM". WHen i tried to delegate this to a supertype (e.g. BUS1001) I got an errormessage that the delegationtype is not allowed. So I think it is not possible. If it is, i would also be interested.

    - If you want to redefine an existing method, just create a Z-BO and delegate it to your supertype. With this all the existing SAP-methods are displayed in your Z-BO. Position your cursor on the existing method and press the button Redefine (F6). The SAP-method is now copied with the existing content and modifiable in your Z-BO.

    Kind regards,

    Joost van Poppel

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks for your answer.

      For the first point, i'm not surprising.

      For the second point, and you redefine the method, the SAP-method ABAP code is copied and i can modify it ? i tried and the content is empty.

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2008 at 04:50 AM

    is it possible to create a new BOR (named ZOBJECT for my example) with a supertype, with a new method and after i would like that this method is inherited in the supertype.

    This is done in transaction SWO6 right? Once entries are made here all the elements of your new BOR bust be available in your supertype! Or am i missing something in the question!

    Other question, i create a new BOR with supertype, i would like to add some controls for a method. If i redefine this method, i must rewrite all the code, i can't call the mother method of the supertype ?

    Redefine option allows you to enter new code only. Alternatively instead of redefining the method you can create a new method and call the original method using the macro "SWC_CALL_METHOD" - you can insert all necessary controls before and after this method call.

    Thanks,

    Prasath N

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Kjetil Kilhavn

      Oh my God Kjetil, you are so nervous !!! i just ask the following question "Is it possible to create a new class from BOR ? OO is more flexible but i would like to start from an existing BOR." and you get on one's high horse.

      I don't think that all my question are no sense and you know it's difficult to grasp all the SAP techniques.

      Sincerely

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.