Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Extending BADI Implementation class

Former Member
0 Likes
1,672

Hello,

I extended a class C1 implementing my BADI interface I1 obtaining class C2.

I redefined a interface I1 method method in C2.

I created a new BADI implementation for my class C2.

However, for this new BADI implementation the BADI builder does not show the interface methods from I1 for my implementation class c2?

Is it not possible to extend a BADI implementation class and use it as a new implementation?

If so, why?

Thanks Matthias

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
802

hi fricke,

i am providing some links pls go thru them.They can provide you enough information about your requirement.

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9cd334f3-0a01-0010-d884-f5612003...

https://www.sdn.sap.com/irj/sdn/advancedsearch?query=extendingBADIImplementation+class&cat=sdn_all

thanks

karthik

3 REPLIES 3
Read only

Former Member
0 Likes
803

hi fricke,

i am providing some links pls go thru them.They can provide you enough information about your requirement.

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9cd334f3-0a01-0010-d884-f5612003...

https://www.sdn.sap.com/irj/sdn/advancedsearch?query=extendingBADIImplementation+class&cat=sdn_all

thanks

karthik

Read only

Former Member
0 Likes
802

Hi,

In badi's you can have multiple implementations.

but you have only one definition.

Using interfaces you can reuser methods in other class.

Whatever methods are available in inteface you can have in c1 and c2 if you are using same interface.

you hace to write method:x definition redefinition.

syntax in coding part.

Read only

0 Likes
802

Hello,

thanks for your input.

I might not have made my question clear enaugh:

I have created a BADI definition D1. There I de-activated option "multiple use' in the usability options.

1) I have a BADI Interface I1 for D1 and a standard Implementation of this interface for which I use class C1.

2) I need a second BADI implementaion in which I only want to redefine one method M1 of class C1.

3) I created a class C2 which has class C1 as superclass and redefined method M1.

4) I created a second BADI implementation for which I specified class C2 as implementation class.

As C2 extends C1 which implements the BADI interface I1 everything went fine in the BADI builder for this second implementation.

The BADI builder seems to be buggy there, as it would not display the business methods of the interface I1, and this really confused me.

However, I have now tested my second implementation and it works!

Thanks

Matthias