Application Development 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: 

Get a list of the technical details of a table

sas70
Explorer
0 Kudos

Hello everybody

I am trying to loop on all structure's fields of table T000 (as an example) and get the technical names of the fields and their attributes. I found some code in an old post but it is erroring out as tabname is not recognized.

Any help is appreciated.

Here is the original post : https://answers.sap.com/questions/2284467/looping-on-abap-structure%27s-fields.html

Thanks

Omar

REPORT ZMY_ALV_9.
data: lst_dd07l LIKE dd07l,<br>lt_dd07l LIKE STANDARD TABLE OF lst_dd07l INITIAL SIZE 0.<br>field-symbols: <lfs_field>.<br>select * from dd07l into table lt_dd07l where tabname = T000.<br>loop at lt_dd07l into lst_dd07l.<br>ASSIGN (lst_dd07l-fieldname) OF STRUCTURE T000 TO <lfs_field>.<br>endloop.
1 ACCEPTED SOLUTION

Jelena
Active Contributor

In the question linked one of the replies says: "oh..and replace all reference to dd07l with dd03". I guess that would solve this specific issue?

That question is from 2007 though and so many things changed in ABAP since then. We have RTTS now, for example: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenrtti.htm

2 REPLIES 2

Jelena
Active Contributor

In the question linked one of the replies says: "oh..and replace all reference to dd07l with dd03". I guess that would solve this specific issue?

That question is from 2007 though and so many things changed in ABAP since then. We have RTTS now, for example: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenrtti.htm

Jelena- Thank you for taking the time to answer this trivial question 🙂

I appreciated the heads up about the timing of the old post and its relevance compared to RTTS.