Hi ABAP gurus!
I've a strange effect when writing a string (loaded in a BSP application as xstring) to the application server (OPEN DATASET in binary mode for output, TRANSFER mytext TO DATASET):
All <b>line breaks</b> of the windows text file mytext (CR/LF (Hex 0D0A)), which are correct when watching in debugger, arrive as CR/CR/LF (Hex 0D0D0A) at the server file.
Any hint what's the reason for that?
I'm not completely sure, but I think that it worked correctly last week. Can this happen due to server settings?
Thanks for your answers,
kind regards,
Martin
Hi Martin,
have you the whole code of your program ?
Maybe the error is in your table/structure.
Rgd
Frédéric
Hi Frédéric,
thanks for your answer!
Unfortunately I haven't the source code at the moment. But the string seems to be ok, because I just load a text file from the local PC (via a BSP app, with help of the uploadFile component) and write it to the app server without changes.
When I watch the string in the debugger when it's written to the "database" (transfer mystring to ...), it has the correct line breaks (0D0A). When inspecting the written file via AL11, the additional CR (0D) appear, displayed as #.
Thanks for your help!
Greetings,
Martin
You speak about line break ?
maybe it's because your computer is Microsoft and your server Unix system.
The line break is different in the two system, it's why when you transfert file between this two system with ftp, you have to specify to use ASCII transfert.
This action modify the line break.
If you have a software like UltraEdit, it could repare this kind of problem
Rgd
Frédéric
Editing will not help me, since I want to <b>upload</b> a file to the server.
BTW: It works correctly when transferring the file with SXDB to the app server (without conversion).
Kind regards,
Martin
You can try to open in text mode instead of binary... so the crlf convertion is managed by operating system
bye
sambarza
Tried it in text mode too, but same result...
(receiving xstring from http upload, converting it to a string and opening dataset in text mode).
Kind regards,
Martin
Hi all,
thanks for your suggestions.
I solved the problem now by replacing CR/LF by LF before transfering the string to the application server.
The file finally contains CR/LF again, that's what I need.
Kind regards,
Martin