Skip to Content

Access to "me" from interface (static class)

Nov 27, 2017 at 05:12 PM


avatar image
Former Member


I have an interface with a number of methods. I also have two classes which implements these interface methods. In class A I want to call the interface-method implementation of the static class B. It works, but inside of the interface method implementation I can't access to the class A "me" to set my variables in class A.

Can someone help me?

Thanks in advance

10 |10000 characters needed characters left characters exceeded

I'm confused about the whole question.

What is a "static class"?

I guess your "variables in class A" are attributes; are these instance attributes?

What are the relationships you defined between A and B (in short, if I understand well, A first operates on B, and then B operates back on A, I am very perplex, is A passed as a parameter to the method to B). Could you explain more in details?

* Please Login or Register to Answer, Follow or Comment.

1 Answer

Horst Keller
Nov 27, 2017 at 06:01 PM

If you implement the methods of one interface in two classes they become methods of different classes/objects. That's what interfaces are made for (polymorphism).

Of course you cannot access attributes of class A in the implementation of class B.

Please try to understand the concept of interfaces first. It's not an ABAP specialty!

10 |10000 characters needed characters left characters exceeded