Skip to Content
avatar image
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 comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    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 comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    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 comment
    10|10000 characters needed characters exceeded