Skip to Content
0
Sep 06, 2011 at 06:59 AM

How to insert Newline in text file thr CL_ABAP_CHAR_UTILITIES

2144 Views

Hi,

I need to send a mail with TEXT file attachment which has many records in it. It is working fine. But the only problem is, all records are displayed in the 1st line itself. So i need to separate the records by inserting new line.

constants: c_new type c value CL_ABAP_CHAR_UTILITIES=>NEWLINE.

LOOP AT it_final INTO wa_final.

lv_menge = wa_final-menge.
CONCATENATE  wa_final-ebeln
           wa_final-bukrs
           wa_final-lifnr
           wa_final-ebelp
           wa_final-matnr
           wa_final-werks
           lv_menge
           c_new    " Newline
           INTO lv_txt SEPARATED BY CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB. 
APPEND lv_txt to text.
CLEAR: lv_txt, lv_menge.

ENDLOOP.

For this code, i'm not getting the new line for each record.

Plz help me out for the same.

Thanks,

Ramesh