2016 Aug 17 5:53 AM
Hi All,
I am using Read_Text FM and fetching some text from CRMD_ORDER. My Problem is, we need to have the text in the below format.
For Eg - ( Hi Good Morning
Have a nice day!!!
Thank You ).
The output of my program is Excel Sheet and the client wants to get the above text in one cell and in the same format of the excel sheet and not in the Rows.
Below image will help to understand more.
Kindly Help!!
Thanks and Regards.
2016 Aug 17 6:23 AM
Hi,
As I understand it all the three lines of text you mentioned are read from text as separate lines of text table correct? If so have you tried concatenating them with CL_ABAP_CHAR_UTILITIES=>NEWLINE before putting the content into cell?
Do you use XLSX or XML 2003 format of Excel file?
2016 Aug 17 6:52 AM
Hi Bartosz,
Thank you for your Reply,
Yes , you are right all the three lines are read as separated lines in the internal table.
As well I tried concatenating them with CL_ABAP_CHAR_UTILITIES=>NEWLINE, but it is converting it like below which they don't want it.
We are using .csv format to convert into excel.
Regards
2016 Aug 17 7:00 AM
If you want to use new line in a cell of CSV you must put its content between quotes " " - it should fix your issue.
2016 Aug 17 8:02 AM
Hi,
I tried using the Quotes ' " " ', but still it has not resolved my issue..
I am getting it in straight line.
2016 Aug 17 8:03 AM
CL_ABAP_CHAR_UTILITIES=>NEWLINE is kinda outdated, you can use |\n| instead,
see the example in the documentation.
2016 Aug 17 8:09 AM
Please open your CSV file using Notepad++ (or any other decent text editor) with option of displaying special characters and take a screenshot of that and paste it here.
Most probably there is some minor detail that corrupts the result.
2016 Aug 17 6:49 AM