03-09-2011 10:02 AM
Hi,
We have a weird problem. We are able to download a csv file using standard FM HTTP_GET. We want to parse the file and upload the data into our SAP CRM system. However, the file downloaded, has the carriage return replaced and the character # replaces it and everything seems like its one line.
I understand that the system replaces the Carriage return with the charater #. My question is, if I try to pass this file into my program to parse for the data, will there be any issues in the system recognizing that "#" that it is a carriage return and that the data in the file is not 1 record but multiple records?
03-09-2011 10:21 AM
Hi
'#' is what you see in the SAP. But the actuall ascii associated will be of carraige return itself. So to identify if you have multiple records of not don't use hard coded '#' but instead use the constant CL_ABAP_CHAR_UTILITIES=>CR_LF.
Regards
Ranganath
03-09-2011 11:46 AM
Hi,
what is the way you are uploading file? I usually use FM GUI_UPLOAD and I didn't noticed problems with different end-of-line characters. Try to upload file using this FM, then you can use FM TEXT_CONVERT_TEX_TO_SAP to convert CSV data to internal table.
Pavel