2023 Jan 05 4:03 PM
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.
2023 Jan 05 4:37 PM
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
2023 Jan 05 4:37 PM
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
2023 Jan 05 6:53 PM
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.