Skip to Content
author's profile photo Former Member
Former Member

uploading in internal table through upload function

Hi friends,

I am facing problem while uploading a data from flat file. It is in text format. data writen in file do not follows tabs instead of it there is a spaces between two words in the row.

While uploading through upload FM the data is fetch by the first field only (it takes whole row as a string).

Thanks & Regards,

Himanshu

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 13, 2008 at 02:34 PM

    Hi,

    If u are using GUI_UPLOAD, then just use the separator paramter (HAS_FIELD_SEPARATOR) = <Value range below> (In ur case ' ' two spaces)

    Description

    Specifies if the fields in the file are separated by a tab. This is necessary if the structure passed contains several components. CR/LF occurs instead of a tab after the last field of a row.

    Value range

    'X': Fields are separated by tabs.

    SPACE: Fields are not separated by tabs. In this case, the table must contain either only one single column or all columns must be contained in the file in their full length.

    Regards

    Shiva

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 13, 2008 at 02:39 PM

    You can read the file into table with one field, and then use the SPLIT statement to split that field into a second table at spaces.

    Itab1 will have only one field with width say 255 chars.

    itab2 will have all the flields.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.