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

Reading inherting classes

JosefKoenig
Explorer
0 Likes
759

There are many function modules to read/update/create classes with SEO_CLASS*.

It is also possible to read the super class of a class. But i haven't found a function module that gives back a list if sub classes from a given class.

I debugged se80 and it looks they do a select in table vseoextend in function module WB_TREE_SELECT_CLASS.

  • subclass

SELECT clsname FROM vseoextend

INTO TABLE inheri_tab

WHERE refclsname = h_clsname.

SORT inheri_tab.

DELETE ADJACENT DUPLICATES FROM inheri_tab.

1 ACCEPTED SOLUTION
Read only

former_member182670
Contributor
0 Likes
670

You can use SEO_CLASS_GET_ALL_SUBS to read all subclasses

There are many function modules to read/update/create classes with SEO_CLASS*.

It is also possible to read the super class of a class. But i haven't found a function module that gives back a list if sub classes from a given class.

I debugged se80 and it looks they do a select in table vseoextend in function module WB_TREE_SELECT_CLASS.

  • subclass

SELECT clsname FROM vseoextend

INTO TABLE inheri_tab

WHERE refclsname = h_clsname.

SORT inheri_tab.

DELETE ADJACENT DUPLICATES FROM inheri_tab.

3 REPLIES 3
Read only

former_member182670
Contributor
0 Likes
671

You can use SEO_CLASS_GET_ALL_SUBS to read all subclasses

Read only

0 Likes
670

Thank you Tomasz!

Read only

uwe_schieferstein
Active Contributor
0 Likes
670

Hello Josef

Obviously SAP provides us with standard means to read classes and their relatives.

Since you have posted your question in the ABAP Objects forum my suggestion is to use class CL_OO_CLASS.

Create an instance of the class with your requested class name and call either of its methods:

- GET_SUBCLASSES

- GET_SUPERCLASS

Needless to say that there is the corresponding class CL_OO_INTERFACE for interfaces.

Regards

Uwe