2008 Sep 15 9:18 AM
Dear Experts,
I have to upload a text file into an application server file.My text file is having special characters like " ä " in some of the lines of the text file.After uploading the data into an application server these special characters are replaced by '#'.
If any body knows pls. help me on this to avoid these replacements.
and as well when i am reading this text file from AS into an internal table using read dataset statement when the system encounters this character '#' system is going for short dump.
Below statement i have used to read the AS file.
-
-
OPEN DATASET d_file_dir FOR INPUT IN TEXT MODE ENCODING DEFAULT WITH SMART LINEFEED.
IF sy-subrc <> 0.
MESSAGE e101(yz) WITH d_file_dir.
ENDIF.
DO.
READ DATASET d_file_dir INTO i_format_file.
IF sy-subrc <> 0.
EXIT.
ENDIF.
APPEND i_format_file.
ENDDO.
so, please help me on this issue if anyone faced.
Thanks in advance
babu
Dear Experts,
I have to upload a text file into an application server file.My text file is having special characters like " ä " in some of the lines of the text file.After uploading the data into an application server these special characters are replaced by '#'.
If any body knows pls. help me on this to avoid these replacements.
and as well when i am reading this text file from AS into an internal table using read dataset statement when the system encounters this character '#' system is going for short dump.
Below statement i have used to read the AS file.
-
-
OPEN DATASET d_file_dir FOR INPUT IN TEXT MODE ENCODING DEFAULT WITH SMART LINEFEED.
IF sy-subrc <> 0.
MESSAGE e101(yz) WITH d_file_dir.
ENDIF.
DO.
READ DATASET d_file_dir INTO i_format_file.
IF sy-subrc <> 0.
EXIT.
ENDIF.
APPEND i_format_file.
ENDDO.
so, please help me on this issue if anyone faced.
Thanks in advance
babu
2008 Sep 15 9:23 AM
hi,
use the binary mode instead of text mode and remove encoding all those things
hope it will work
try this
with regards
s.janagar
2008 Sep 15 11:34 AM
I am using ECC6.0 so if i remove those encoding keywords its giving the syntax error when i run the UCCHECK transaction.
2008 Sep 15 9:25 AM
Are you doing cross platform transfers?
I mean is the file comming from a UNIX sytem to a Windows system or vice versa. read dataset normally doesnt read the end of line character unless the file was transfered incorrectly. IF you are doing cross platfor transfers you have to select the appropriate transfer mode so that the unix end of line character is replaced by windows end of line character or vice versa.
If the above statement is true for you then the hash you see is not actually a hash, instead it is the end of line character.
Just use the right transfer mode.
regards
vivek
2008 Sep 15 9:55 AM
Try FMs,
ARCHIVFILE_CLIENT_TO_SERVER
ARCHIVFILE_SERVER_TO_CLIENT
Regards,
Jeet K Bhatt
2008 Sep 15 10:04 AM
Try FMs,
ARCHIVFILE_CLIENT_TO_SERVER
ARCHIVFILE_SERVER_TO_CLIENT
Regards,
Jeet K Bhatt
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |