0

I want to check if a structure is there in se11 or not. There are classes to check for a class particularly and also to check for tables. But is there a way I can check whether a structure exists in se11 or not via code in ABAP?

  • Does this answer your question? [Class/Method to check if table exists in SE11 or not?](https://stackoverflow.com/questions/20350734/class-method-to-check-if-table-exists-in-se11-or-not) – Suncatcher Nov 18 '21 at 13:17

2 Answers2

2

The definition of a DDIC Structure is stored primarily in the tables DD02L (one line per structure) and DD03L (the components of the structures).

The structure name is in the column TABNAME of DD02L. This table contains also other types of objects; it's the column TABCLASS which distinguishes which type is each object. It has the value "INTTAB" for the structures.

You have several function modules to read these tables, one of them being DDIF_TABL_GET, but there are probably many more ones. I think that none is officially released.

There's also an official solution, which is to find if a type is a type in the dictionary, but it's not possible to distinguish if it's a structure, a table or a view. It's the class CL_ABAP_TYPEDESCR (RTTI). It has some ABAP Dictionary methods. The code is a little bit long to provide, so please confirm if that's a possible solution for you.

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
1

Structures in Data Dictionary have a lot in common with DB tables. Therefore this would answer your question too.

You can also use CHECK_TAB_NAME function module as suggested here.

Dorad
  • 3,413
  • 2
  • 44
  • 71