Hi ,
I HAVE A COMMA DELIMITED FILE on my desktop i want to upload the file into internal table
i used the below function module with file type txt as on desktop it is txt but iam getting dump please suggest tbl_infile1 is file will be like this
20090203,1145561,0,2,4,12,4
20090203,1145946,0,1,1,5,2
DATA: BEGIN OF tbl_infile1 OCCURS 0,
budat(10) TYPE c,
Aufnr(12) type c,
srap(13) type c,
tubes(13) type c,
batches(13) type c,
runmin(13) type c,
stopmin(13) type c,
END OF tbl_infile1.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = p_pcfile
FILETYPE = 'TXT'
HAS_FIELD_SEPARATOR = ','
DATA_TAB = tbl_infile1
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.