2015 Jun 11 1:45 PM
Hi Team,
I am using CL_BCS / CL_DOCUMENT_BCS to send an-email with an attachment, however, I am facing below issue-
When line of the attachment is complete(all columns are filled) then next line is coming without any additional line feed, if previous line is not having all the columns filled (specially last one) then an additional line feed is coming. Let me take one example below-
ABAP content-
Field1 Field2 Field3
ABC 123 CDE
BCD 456 KDD
BCP
ABC 012 TYY
Excel content
ABC 123 CDE
BCD 456 KDD
BCP
<<<<<<< This extra lines comes in the excel attachment, and I observed that previous line had last column empty.
ABC 012 TYY
I have used CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB for column tabs and CL_ABAP_CHAR_UTILITIES=>CR_LF for line feed and converted entire content in STRING format, then I used string_to_solix method of CL_BCS_CONVERT to convert the contents in solix format, which ,later, is used in add_attachment method of CL_DOCUMENT_BCS
Kindly help.
Mohit
Hi Team,
I am using CL_BCS / CL_DOCUMENT_BCS to send an-email with an attachment, however, I am facing below issue-
When line of the attachment is complete(all columns are filled) then next line is coming without any additional line feed, if previous line is not having all the columns filled (specially last one) then an additional line feed is coming. Let me take one example below-
ABAP content-
Field1 Field2 Field3
ABC 123 CDE
BCD 456 KDD
BCP
ABC 012 TYY
Excel content
ABC 123 CDE
BCD 456 KDD
BCP
<<<<<<< This extra lines comes in the excel attachment, and I observed that previous line had last column empty.
ABC 012 TYY
I have used CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB for column tabs and CL_ABAP_CHAR_UTILITIES=>CR_LF for line feed and converted entire content in STRING format, then I used string_to_solix method of CL_BCS_CONVERT to convert the contents in solix format, which ,later, is used in add_attachment method of CL_DOCUMENT_BCS
Kindly help.
Mohit
2015 Jun 11 4:56 PM
It is weird.
Can you share how you are concatenating the string from the data? Also, which code page you use when calling cl_bcs_convert=>string_to_solix( ) ?
Regards,
Naimesh Patel
2015 Jun 12 12:51 PM
Hi Naimesh,
Loop at gt_datatabwithfields INTO gs_datatabwithfields.
concatenate all fields into gv_string separated by cl_abap_char_utilities=>horizontal_tab.
concatenate gv_string cl_abap_char_utilities=>cr_lf INTO gv_string.
ENDLOOP.
Codepage used is '4103'.
Thanks
Mohit
2015 Jun 19 12:26 PM
The issue is resolved now. we have now used CL_ABAP_CHAR_UTILITIES=>NEWLINE instead of CR_LF.
Thanks ...