Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Need to insert line feed for a text file

Former Member
0 Kudos
208

Hi all,

I am sending a text file as an attachment.

There is one particular line which is more than 255 characters.

So, I have taken the strlen of this line. If it is more than 255, I have put it into the next line and have inserted a '- into the 255th character'. Now I have used c_cret TYPE x VALUE '0D' as the line feed. This has caused an extra carriage return (0D) on the same line in character 256 to appear. This caused some problem because it will cause the remaining data to be ‘carriage return’ to a line and the record position will reset from 1 instead of continuing with char 257,258,259.

Please let me know if I can remove the carriage return (0D) character.

I suppose 0D and 09 are used for excel attachment. However, in my case it is a text file.

Please help.

Thanks and regards,

Anishur

3 REPLIES 3

Former Member
0 Kudos
104

Use

class CL_ABAP_CHAR_UTILITIES

Use attributes minchar ,maxchar CR_LF attributes .

Please reward if useful.

0 Kudos
104

Hi Dinesh,

But I am on 4.6C.

I suppose this will not work here.

Please respond.

Thanks and regards,

Anishur

Former Member
0 Kudos
104

Hi,

Can you please check whether you can use:

CONSTANTS C_LF TYPE X VALUE '0A'.

CONSTANTS C_CR TYPE X VALUE '0D'.

Regards,

Lakshmi.