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

UPLOAD - GUI_UPLOAD problem

Former Member
0 Likes
616

Hi!

I have a flat file, which is a TXT, separated with tabulators ("09" ASCII code character). It has 10 columns.

With the UPLOAD fm I could easily process it, using the 'DAT' filetype.

Due to some codepage issue, I have to use GUI_UPLOAD, instead of the UPLOAD.

GUI_UPLOAD does not support 'DAT' filetype. (in 4.7)

I wanted to use the GUI_UPLOAD with a table, which contains one 500 char column. However when I wanted to process this table using SPLIT, the SPLIT command does not recognize the tabulators. I've tried all of the other string processing routines (REPLACE, SEARCH, etc), but all of them failed with the tabulators.

Is there a way to process this file and split the 500 char line into the other fields?

Thank you

Tamá

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
524

Hello,

Did you use the HAS_FIELD_SEPARATOR parameter?

Columns Separated by Tabs in Case of ASCII Upload

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.

4 REPLIES 4
Read only

Former Member
0 Likes
525

Hello,

Did you use the HAS_FIELD_SEPARATOR parameter?

Columns Separated by Tabs in Case of ASCII Upload

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.

Read only

Former Member
0 Likes
524

Hi,

Is that you want to split 500 char line?

Thanks

Vikranth

Read only

Former Member
0 Likes
524

Hi,

try the attributes from class CL_ABAP_CHAR_UTILITIES

use SPLIT .. AT CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB

Read only

former_member194669
Active Contributor
0 Likes
524

Try this way


LOOP AT it_data INTO wa_data.

SPLIT wa_data-record AT cl_abap_char_utilities=>horizontal_tab INTO wa_input-field0
wa_input-field1
wa_input-field2
wa_input-field3.

append wa_input to it_input.

endloop.

a®