Hi, ABAPers,
this is my first post in this forum.
I have a (to me) very strange problem which I can not figure out. BTW, SAP 4.6B with SAP-Gui 640, Windows XP Sp2
this is my program:
REPORT zhma_gprism .
TYPES: ty_line(1024) TYPE c.
TYPES: BEGIN OF ty_download,
zline TYPE ty_line,
END OF ty_download.
TYPES: tyt_downloads TYPE STANDARD TABLE OF ty_download.
DATA: tl_downloads TYPE tyt_downloads.
PARAMETERS: p_fname1 TYPE rlgrap-filename,
p_fname2 TYPE rlgrap-filename.
CLEAR tl_downloads. REFRESH tl_downloads.
BREAK-POINT.
PERFORM download_data TABLES tl_downloads
USING p_fname1.
BREAK-POINT.
PERFORM download_data TABLES tl_downloads
USING p_fname2.
BREAK-POINT.
PERFORM download_data TABLES tl_downloads
USING p_fname1.
BREAK-POINT.
PERFORM download_data TABLES tl_downloads
USING p_fname2.
FORM download_data TABLES pt_downloads TYPE tyt_downloads
USING value(p_fname) TYPE rlgrap-filename.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = p_fname
FILETYPE = 'ASC'
IMPORTING
FILELENGTH =
TABLES
data_tab = pt_downloads
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
OTHERS = 6.
IF sy-subrc EQ 0.
WRITE:/ 'OK', p_fname.
ELSE.
WRITE:/ 'Err', sy-subrc, p_fname.
ENDIF.
ENDFORM. " DOWNLOAD_DATA
and these are my files:
TEXT1.txt:
123456789a 1289b
123456789a 123456789b
123789a 123456789b
123456789a 1239b
123456789a 123456789b
123456789a 123456789b
1236789a 123456789b
123456789a 12349b
123456789a 123456789b123456789a 123456789b
123456789a 123456789b
123456789a 123489b
1234589a 123456789b
TEXT2.txt:
123456789_10 123456789_20
123456789_10 123456789_20
123456789_10 123456789_20
123456789_10 123456789_20
123456789_10 123456789_20
HéikoMáérz789_20
123456789_10 123456789_20
123456789_10 123456789_20
123456789_10 123456789_20
123456789_10 123456789_20
123456789_10 123456789_20
123456789_10 123456789_20
123456789_10 123456789_20
123456789_10 123456789_20
123456789_10 123456789_20
1234567HéikoMáérz6789_20
123456789_10 123456789_20
123456789_10 123456789_20
123456789_10 123456789_20
123456789_10 123456789_20
123456789_10 123456789_20
v
123456789_10 123456789_20
v
vHéikoMáérz
v
HéikoMáérzv
123456789_10 123456789_20
123456789_10 123456789_20
123456789_10 HéikoMáérz456789_20
123456789_10 123456789_20123456789_10 123456789_20
1234567HéikoMáérz_10 123456789_20
vHéikoMáérz
vHéikoMáérzHéikoMáérzHéikoMáérz
v
vv
and finally TEXT3.txt:
C490200604
0A0001E002;10276451244
0A0001E004;MyCompany
0A0001E005;5126
0A0001E006;HéikoMáérz
0A0001E007;MyCompany
0A0001E008;tér
0A0001E009;1
0A0001F001;20060101
0A0001F002;20060331
0A0001F006;1
and this is what happens: I can upload TEXT1.txt and TEXT2.txt as much as I like and in any order, no problem.
As soon as I include TEXT3.txt the subsequent upload of ANY file creates a short-dump
DATA_OFFSET_NEGATIVE
The system tried to access field "LINEBUFFER" with offset
"-2" in the current program "SAPLSFES ".
Partial field access is not allowed with negative offset specifications.
The termination occurred in the ABAP/4 program "SAPLSFES " in
"PUT_LINEBUFFER".
and I really don't know how to solve this problem.
I searched SAP Notes but did not find anything that seemed relevant to my problem.
Help!
Cheers,
Heiko