How to find table type for a data element?

4.5k views Asked by At

I create a new function modul in abap which should return a list of the data element AGVAL.

AFAIK there are two ways now:

  1. I use an already available table type
  2. I create a new table type

How to do this kind of introspection? I would like to now if there is already a table type with one column, which is of type AGVAL?

3

There are 3 answers

0
Sandra Rossi On

I don't know any option else but using SQL to query the ABAP dictionary directly.

For instance, this query extracts all table types having a structure whose first component has the data element SO_TEXT255 (and which is not embedded in a nested structure) :

SELECT * FROM DD40L
  WHERE ROWKIND = 'S'
    and ROWTYPE in (
      select TABNAME from DD03L
        where POSITION = 1
          and ROLLNAME = 'SO_TEXT255' )

Of course, it doesn't restrict to structures with only this one component but you may adapt it a little bit.

0
mxstml On

you can enter your element type in TA SE11 as Data Type. Go to display and use the Where-Used-List to search for table fields / strucure fields to find the usage of this data element.

Regards Max

0
Suncatcher On

If you do not stick purely to ABAP-way it is done via SE11 in a very simple way.

  1. Search by table types

enter image description here

  1. Choose search type as "by reference line"

enter image description here

  1. That's it!

enter image description here