Skip to Content

Hello everyone,

After some research I’ve managed to find an answer to my own question here:

and I would like to share this with you.

Basically, in oder to find the types of all fields of a given table, just make the following query to table DD03L:

SELECT tabname fieldname rollname

     INTO TABLE some_table

     FROM DD03L

     WHERE tabname = some_name.

BUT, sometimes, fields might be either a structure, or a table as well (deep table\structure). In those cases, we need to select the field type from tables DD03M (if structure) or DD40L (if table). Here are examples:

SELECT typename rowtype

     INTO TABLE some_other_table

     FROM DD40L

     WHERE typename = some_row_from_some_table-rollname.


SELECT tabname fieldname rollname domname

     INTO TABLE some_other_different_table

     FROM DD03M

     WHERE tabname = some_row_from_some_table-rollname.

Note the differences between the two queries.

Any additions, corrections, or maybe a name of an existing function that does all that faster and easier, will be appericiated!

Hope that helps someone 🙂

To report this post you need to login first.


You must be Logged on to comment or reply to a post.

  1. Former Member

    Hi Daniel,

    Great topic to highlight, there is one framework class CL_ABAP_TYPEDESCR for the same. and i would suggest that one could use Classes to read the meta data instead of using the tables directly.


    Anurag Chopra

  2. Former Member

    FM “DDIF_TABL_GET” can also be used to get the field name, domain name, data type and length. not only these fields it fetches more data about the given table.

    1. Former Member Post author

      Hi Syed,

      This does the first step of finding the types and domains of a table fields.

      Though, if a certain field is also a table, it doens’t show the types of its components…

      1. Former Member

        yah it doesn’t show the fields of the table types, but the value in the data type field will be TTYP. and you can use the same FM with TTYP name

        1. Former Member Post author

          That’s exactly the thing – that it doesn’t. I’ve tried with an example of my own table with tables in it…that’s why the need for a program like mine came up…


Leave a Reply