Application Development and Automation 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: 
Read only

Problem in creating notepad file with mail

Former Member
0 Likes
670

Dear all,

I have create a notepad file at run time and attached with mail...

But notepad file is not properly created.. It display 1 space between 2 letter and also facing problem if there are more than 1 line..

2nd line is not started in new line.. it started after 1st line...

Thanx...

Dear all,

I have create a notepad file at run time and attached with mail...

But notepad file is not properly created.. It display 1 space between 2 letter and also facing problem if there are more than 1 line..

2nd line is not started in new line.. it started after 1st line...

Thanx...

4 REPLIES 4
Read only

Former Member
0 Likes
605

Hi,

You can use CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB for seperating the data in a formatted fashion.

Eg: LOOP AT T_OUT_SUBSCRIBER.

CONCATENATE T_OUTPUT-FIELD1

T_OUTPUT-FIELD2

T_OUTPUT-FIELD3

T_OUTPUT-FIELD4

INTO WA_T_OUT_TABLE

SEPARATED BY CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.

CONCATENATE WA_T_OUT_TABLE

CL_ABAP_CHAR_UTILITIES=>CR_LF

INTO WA_T_OUT_TABLE.

Hope this helps.

Regards

Adesh

Read only

Former Member
0 Likes
605

Hi,

You can use the below code.

CONSTANTS: gc_crlf type char1 value cl_bcs_convert=>gc_crlf,

gc_htab type char1 value cl_abap_char_utilities=>horizontal_tab.

LOOP AT gi_tab INTO gw_tab.

*/.. Sepearting fields by horizontal tab.

CONCATENATE gw_tab-col1 gw_tab-col2 INTO gv_string SEPERATED BY gc_htab.

*/.. Store data row wise

CONCATENATE gv_string gc_crlf INTO gv_string.

ENDLOOP.

<begging removed by moderator>

Regrads,

Gaurav.

Edited by: Thomas Zloch on Feb 14, 2012

Read only

JackGraus
Active Contributor
0 Likes
605

Hi, I had a simular problem when using cl_document_bcs. Most examples that use this class use i_type = 'RAW'. But then blanks will be added at the end of each text line in i_text. Using i_type = 'TXT' works fine.

Regards Jack

CALL METHOD cl_document_bcs=>create_document
  EXPORTING
    i_type    = 'TXT'
    i_subject = zlv_objdes
    i_text    = zlt_soli
  RECEIVING
    result    = zlr_document_bcs.

Read only

Former Member
0 Likes
605

Hi,

Use the following statement while creating notepad attachment

concatenate cl_abap_char_utilities=>newline <contents> into <attachment> SEPARATED by horizontal tab.

Regards,

Aravind