Uploading data from a flat file,which has delimiters other than tab.
FM GUI_UPLOAD supports flat files which are TAB delimited.other than TAB, if any other delimiters is used, then following programming technique used to upload data into internal table.
for example if the flat file have values like
1317,0001,0001
1318,0001,0001
1319,0001,0001
REPORT ZUPLOAD.
DATA : BEGIN OF ITAB1 OCCURS 1,
FLD(80),
END OF ITAB1.
DATA : BEGIN OF ITAB OCCURS 1,
F1 TYPE LIFNR,
F2 TYPE EKORG,
F3 TYPE KTOKK,
END OF ITAB.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'D:\ VENDORS1.TXT'
FILETYPE = 'ASC'
HAS_IELD_SEPRATOR = ITAB1.
LOOP AT ITAB1.
WRITE :/ ITAB1-FLD.
ENDLOOP.
SKIP.
LOOP AT ITAB1.
SPLIT ITAB1-FLD AT ',' INTO ITAB-F1 ITAB-F2 ITAB-F3.
APPEND ITAB.
ENDLOOP.
SKIP.
LOOP AT ITAB.
WRITE :/ ITAB-F1, ITAB-F2, ITAB-F3.
ENDLOOP.
OUTPUT.
1317 0001 0001
1318 0001 0001
1319 0001 0001
Regards.
RV Karthikeyan