Application Development and Automation 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: 
Read only

import flat file dynamically

Former Member
0 Likes
454

Hi all

I understand that i need to create an internal table to hold the fields from the flat file. Later using the internal table to write a insert statement to save to database.

Now my problem come. How to create this dynamic internal table for every different flat file import since diff flat file have diff field. Later that this insert statement mus also be dynamic enough to retrieve the info from the internal table.

Hw can i do it?

3 REPLIES 3
Read only

Former Member
0 Likes
415

Hi ,

Try using different files.

For example if you have three different files and you need to update three different database tables.

Use FM gui_upload thrice with different file names and get data in 3 different tables.Use all the three internal tables to update the tables

Read only

Former Member
0 Likes
415

Hi Gary,

I can suggest one thing that standardize the fiat file format; that number of fields and sequence will be same. because without knowing the number of fields and sequence internal table can not be standardize.

so tell your client to give one type of file.

Hope it will be useful.

Regards

Krishnendu

Read only

0 Likes
415

The flat file format will not be standardize due to that my program is doing data migration. The client will select this flat file today and another different flat file tml. This 2 flat file will nv hav the same data format. So my concerm is hw to make it dynamic for the internal table structure as well as the insert sql statement. Any help?