cancel
Showing results for 
Search instead for 
Did you mean: 

CSV attachment in Mail with CRLF

former_member193466
Participant
0 Kudos

Hello Experts

We have recently migrated from PI7.0 to PO7.4 which is on Windows.

But got an issue with interface which is file to mail in which we are sending CSV file as an attachement by reading the file.

But while generating the attachment through PI- UDF we have added "/r/n" to produce CRLF at the end of line in CSV attachement, but the attachment is having only Line Feed : "LF" not "CRLF"

Can some one please suggest any approach to achieve this.

We have tried many ways on changing encoding , text but the requred CRLF is not coming.

Thanks

VR

Accepted Solutions (0)

Answers (3)

Answers (3)

Ryan-Crosby
Active Contributor
0 Kudos

Hi VR,

We had one such scenario in our 7.11 system and were able to use this sample adapter module to achieve it that requirement (checked our 7.4 system as we are in the process of migrating and it is there):

Regards,

Ryan Crosby

stefan_grube
Active Contributor
0 Kudos

I had this issue in a project as well. After I did not find a solution for this issue, I found that the receiver could work with the different file, as Microsoft Excel and most other programs do not care.

Harish
Active Contributor
0 Kudos

Hi VR,

you can use hex values for CRLF

'0x0D''0x0A'


reference - http://scn.sap.com/thread/64686


regards,

Harish

former_member193466
Participant
0 Kudos

Hi Harish

No, i have already tried in putting this in UDF but not worked. It has just concatenated the string.

Please let me know if there is any other way to add CRLF in udf.

Below is the code used in our udf which is not working though we have replaced the \r\n with hexa values or anything.

for(int i=0;i<attachmentdata.length;i++)

newLines_attach = newLines_attach + a[i] + "\r\n";

Thanks

VR