‎2008 Jun 23 6:54 PM
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á
‎2008 Jun 23 7:01 PM
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.
‎2008 Jun 23 7:01 PM
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.
‎2008 Jun 23 7:01 PM
‎2008 Jun 23 7:02 PM
Hi,
try the attributes from class CL_ABAP_CHAR_UTILITIES
use SPLIT .. AT CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB
‎2008 Jun 23 7:03 PM
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®