2006 Nov 28 7:57 AM
Hi,
using file upload into internal table i've got '#' signs. In the main body of the table they are separators and are always on specific places.
In the header of the table they are at different places (and they are varying).
Exampleline:
0024 Company XYZ #Summary report November 2006
I've tried REPLACE, but the '#'-sign is not recognized
I've tried TRANSLATE, but it doesn't work
So the '#' sign is NOT equal with the one from your keyboard. It's a control character within files.
Any clues?
Regards
Olaf
2006 Nov 28 8:26 AM
Hi Olaf
I guess the "#" is tab character.
Please use the below method and check if it works:
data: tab(1) type c value cl_abap_char_utilities=>horizontal_tab,
str type string.
open dataset <dsn> for input in text mode encoding default.
if sy-subrc eq 0.
do.
read dataset <dsn> into str.
if sy-subrc ne 0.
exit.
else.
split str at tab into <wa>-fld1 <wa>-fld2....
append <wa> to <itab>.
endf.
enddo.
close dataset <dsn>.
endif.Hope this helps.
Kind Regards
Eswar
Hi,
using file upload into internal table i've got '#' signs. In the main body of the table they are separators and are always on specific places.
In the header of the table they are at different places (and they are varying).
Exampleline:
0024 Company XYZ #Summary report November 2006
I've tried REPLACE, but the '#'-sign is not recognized
I've tried TRANSLATE, but it doesn't work
So the '#' sign is NOT equal with the one from your keyboard. It's a control character within files.
Any clues?
Regards
Olaf
2006 Nov 28 8:17 AM
2006 Nov 28 8:17 AM
2006 Nov 28 8:26 AM
Hi Olaf
I guess the "#" is tab character.
Please use the below method and check if it works:
data: tab(1) type c value cl_abap_char_utilities=>horizontal_tab,
str type string.
open dataset <dsn> for input in text mode encoding default.
if sy-subrc eq 0.
do.
read dataset <dsn> into str.
if sy-subrc ne 0.
exit.
else.
split str at tab into <wa>-fld1 <wa>-fld2....
append <wa> to <itab>.
endf.
enddo.
close dataset <dsn>.
endif.Hope this helps.
Kind Regards
Eswar
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |