Skip to Content
0
Apr 18, 2007 at 04:04 AM

How to Upload a text file with a header.

961 Views

Dear all,

I use FM <b>GUI_UPLOAD </b>to upload a tab delimited file into an internal table and it works well. In this case, text file just consists of content only.

Now, That file consists of<b> header and content</b>. Using GUI_UPLOAD is useless.

I made reference on this thread:

how-to-upload-text-file

They told to delete the first row after uploading. But<b> the problem</b> is after calling the function, there is just HEADER on the internal table. Please be noticed that, my internal table has many fields with different data types.

Here is my code

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

filename = f_name " a variable to hold file name

has_field_separator = 'X'

TABLES

data_tab = itab

EXCEPTIONS

<< list of exceptions here>>

.

Everyone has any solutions?