‎2008 Dec 24 11:28 AM
Hi All,
I want to upload a file which have some special character as separator like | (pipe symbol).
where can i mention that it is some symbol not tab separator.
Do we have any funtion module for that.
Regards,
Rohith.
‎2008 Dec 24 12:28 PM
Hi Rohit,
Give some more details like
1. what type of file, text, excel or binary etc.
2. Also if the file needs a separator which character you are supposed to use. (eg excel files use tab as separator).
Regards
Barada
‎2008 Dec 24 12:31 PM
hi,
In FM GUI_UPLOAD you have the parameter HAS_FIELD_SEPARATOR for separator.
‎2008 Dec 24 12:34 PM
Hi
You can use GUI_UPLOAD, in that keep the Field Seperator commented:
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = V_FNAME
FILETYPE = 'ASC'
* HAS_FIELD_SEPARATOR = 'X'
* HEADER_LENGTH = 0
READ_BY_LINE = 'X'
* DAT_MODE = ' '
* IMPORTING
* FILELENGTH =
* HEADER =
TABLES
DATA_TAB = I_DATA_RED
* EXCEPTIONS
* FILE_OPEN_ERROR = 1
* FILE_READ_ERROR = 2
* NO_BATCH = 3
* GUI_REFUSE_FILETRANSFER = 4
* INVALID_TYPE = 5
* NO_AUTHORITY = 6
* UNKNOWN_ERROR =
* BAD_
SPLIT I_DATA_RED-LINE AT P_FSEPA INTO "here in P_fsepa give the symbol u have in flat file.
I_VEND-LIFNR
I_VEND-BUKRS
I_VEND-EKORG
I_VEND-KTOKK
I_VEND-ANRED
I_VEND-NAME1
I_VEND-LAND1
I_VEND-AKONT
I_VEND-WAERS.Vishwa.
‎2008 Dec 25 8:26 AM
Hi ,
in this case u must specify the has_field _separator as 'X'.. then split.
‎2009 Jan 15 9:14 AM