Skip to Content
Former Member
Mar 19, 2009 at 12:04 PM

Help needed with Carriage Return in Unicode system


Hi Experts,

we have an issue with one of our programs regarding the carriage return that is used when creating a csv file. This issue has only came about because of the recent upgrade to ECC6.

The main change to the program was the redefinition of the line feed variable.

Existing statement was --> DATA: v_lf TYPE x VALUE '0D'.

This was then replaced with

New statement --> DATA: v_lf type c VALUE cl_abap_char_utilities=>cr_lf.

Since this change has been implemented, the csv file that is created and sent on as an attachment via the function SO_NEW_DOCUMENT_ATT_SEND_API1 is now not displayed correctly.

When looking at the attachment in trn SOST, a message is also displayed saying the file is not in a recognizable format when selecting the file to view.

The hex value for cl_abap_char_utilities=>cr_lf is 000D000A and this seems to be causing the issue.

I've also tried using Function FI_DME_CHARATERS as I only really want to use the CR. However, the hex value for this is 000D and not 0D.

Is there any way of converting this to have a hex value of 0D?

Thanks in advance,