2008 Jul 15 3:30 PM
HI all
I am downloading some data into file(.TXT) from SAP sever and uploading into other UNIX server.
Here in the file(.TXT) we are having MAKTX is: Vendor needs to pay##
Eg: 1202 789654 vendor needs to pay## 10000245623654
When I was uploaded this file into UNIX server we are getting 2 lines.
Eg: 1202 789654 vendor needs to pay^M
10000245623654
If you observe here we are getting u2018^Mu2019 this special word we donu2019t know how we are geeting. Due that ^M the u201810000245623654u2019 it is going to next line.
I think in unix ^M is taking enter action .
So can any body tell me what is the problem what I need to do.
2008 Jul 15 3:51 PM
'##' Seems to be Carriage return or line feed.
CL_ABAP_CHAR_UTILITIES=>CR_LF or
CL_ABAP_CHAR_UTILITIES=>NEWLINEThese functions are represented by '##' in ABAP, so its pushing your characters to the next line.
Amandeep
'##' Seems to be Carriage return or line feed.
CL_ABAP_CHAR_UTILITIES=>CR_LF or
CL_ABAP_CHAR_UTILITIES=>NEWLINEThese functions are represented by '##' in ABAP, so its pushing your characters to the next line.
Amandeep
2008 Jul 15 3:34 PM
hi use this replace all occurances ..after getting the file name..
then condense it
data:char(25) value '5#4#2#&1#'.
replace all occurrences of '#' in char with space .
write: char.
2008 Jul 15 3:42 PM
2008 Jul 15 3:49 PM
HI venkat,
take my example,
Here I_TEXT-TSGTXT is--> vendor needs to pay##
IF I_TEXT-TSGTXT CA '#'.
REPLACE ALL OCCURRENCES OF '#' IN I_TEXT-TSGTXT WITH ' '.
ENDIF.
But wonder here is sy-subrc = 4
So it means it was not considering these ##.
Some thing problem.
This is very urjent guys
2008 Jul 15 3:56 PM
try using TRANSLATE instead of REPLACE...
=> TRANSLATE I_TEXT-TSGTXT USING '# '.
replace doesn't works fine with spaces...
regards,
Edited by: Sebasti Bustamante on Jul 15, 2008 4:59 PM
2008 Jul 15 3:51 PM
'##' Seems to be Carriage return or line feed.
CL_ABAP_CHAR_UTILITIES=>CR_LF or
CL_ABAP_CHAR_UTILITIES=>NEWLINEThese functions are represented by '##' in ABAP, so its pushing your characters to the next line.
Amandeep
2008 Jul 15 5:27 PM
2008 Jul 15 4:03 PM
Do this Way.
REPLACE ALL OCCURENCES OF cl_abap_char_utilities=>cr_lf IN maktxt WITH space.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |