on 2005 Nov 18 9:05 AM
Hi Everybody,
Could any one say me how could i find whether the file has a tabspace seprator or space as seprator.
i am using gui_upload where the parameter HAS_FIELD_SEPARATOR say's me splits with tab during ASCII,
whether i should give 9 as parameter value for tab or give '' empty?
Regards.
Hi
Give
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME =
FILETYPE = 'ASC'
<b>* HAS_FIELD_SEPARATOR = 'X'</b>
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
IMPORTING
FILELENGTH =
HEADER =
TABLES
DATA_TAB =
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.
Regards
Vijay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi open the input file and check its contnets and format.
if it has the field separator then pass 'X' to HAS_FIELD_SEPARATOR otherwise just pass a blank space '' to it. it should work fine.
satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You just pass X to the paramater HAS_FIELD_SEPARATOR of GUI_UPLOAD.
THanks,
Ramakrishna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Aima,
There is now ay to find it in the program itself, whether or not the file is tab delimited or otherwise.
One way is to declare a flat data type for the internal table and see in the debug mode for yourself.
In whatever case, the HAS_FIELD_SEPARATOR value should be space or 'X'.
if HAS_FIELD_SEPARATOR is space, then that doesn't mean that the field seperator is space. It means, we are telling the FM that the fields are not delimeited by tabs.
If HAS_FIELD_SEPARATOR = 'x' then we are telling the FM that the file is tab delimited.
Thanks,
Ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check this explanation for the parameter you asked and kindly reward points by clicking the star on the left of reply,if it helps.
Description
Specifies whether the fields in the file are separated by a TAB. This is recommended if the structure passed contains several components. CR/LF occurs instead of a tab after the last field of a row.
Value range
<b>'X': Fields are separated by tabs
SPACE: Fields are not separated by tabs. In this case, the table must contain only one column or all columns must be contained in the file in their entire length.</b>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Aima,
Depending on your requirement you need to pass.
If you have tab dilimited text file then give tab as
separater.
First checl the input file and depending on that pass the value.
Thanks & Regards,
Siri.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
104 | |
10 | |
8 | |
7 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.