2022 Sep 08 7:19 PM
Hi,
I have a requirement where the values come via a flat file:

The first row has the column names and the subsequent rows the values. I want to create a internal table where the column names of the internal table are the first row of the flat file and then the values are assigned accordingly. Please let me know how to achieve this.
Thanks,
Ashok
Hi,
I have a requirement where the values come via a flat file:

The first row has the column names and the subsequent rows the values. I want to create a internal table where the column names of the internal table are the first row of the flat file and then the values are assigned accordingly. Please let me know how to achieve this.
Thanks,
Ashok
2022 Sep 08 8:10 PM
Had you spent 30 seconds making a google search instead of writing this you'd have your solution by now, but anyway...
Dynamic table creation is a very broad topic and has plenty of documentation, you can take a look at this for reference.
2022 Sep 09 6:59 AM
Be careful, a column name doesn't accept lots of characters, so be careful to catch the exceptions so that to reject the file gently.
2022 Sep 09 4:03 PM
Hi All,
Thanks for the answers. I have created dynamic internal tables and work areas based on the RTTS classes where I have taken DD tables as reference. But in this new requirement of mine data (including field names) comes from an external application in the form of a string. I created a flat structure and stored the data in it by appending the data. The data now comes in the following format:

From this I have to create a dynamic internal table where the first row becomes the column headings and the subsequent rows have values. My main issue is how do I transpose the first row as the new column name of the dynamic internal table.
2022 Sep 12 1:49 PM
If you are expanding on the original problem, you should edit your question instead of posting additional information as an aswer.