Application Development 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: 

uploading in internal table through upload function

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

2 REPLIES 2

Former Member
0 Kudos

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

Former Member
0 Kudos

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.