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: 

Email body charecters limited upto 255 charecters

geethan-10
Member
0 Kudos
510

Hello all,

currently we are doing mail sending program,

in body content of the mail we are send more than 255 characters but it is not allowing as there is restriction up to 255 char

we are currently using,

TRY.

CALL METHOD cl_document_bcs=>create_document
EXPORTING
i_type = 'RAW'
i_subject = gv_subject
i_text = lt_text
RECEIVING
result = lo_document.

but over here i_text(Body content) is limited to 255 characters,

need to extent more..... also tried

so_new_document_att_send_api1 function module

kindly help me with any suggestions

thank you.....


4 REPLIES 4

FredericGirod
Active Contributor
447

It is a table, and the line of the table is limited to 255. You just have to split the text.

check class CL_BCS_CONVERT

matt
Active Contributor
447

Don't use so_new_document_att_send_api1

Use the CL_BCS classes.

raymond_giuseppi
Active Contributor
0 Kudos
447

In method create_document, parameter i_text is an internal table, so split your long text into multiple records.

There are multiple tools from FM CONVERT_ITF_TO_STREAM_TEXT to methods such as STRING_TO_SOLI of class CL_BCS_CONVERT depending on how you built your long text.

ThorstenHoefer
Active Contributor
447

Hi geethan_10,

for unicode reason, you should check this solution:

  DATA: lt_text   TYPE solix_tab,
DATA: lr_buf TYPE REF TO cl_abap_conv_out_ce.
lr_buf = cl_abap_conv_out_ce=>create( ).
lr_buf->write('<HTML><HEAD><:/HEAD><BODY>').
lr_buf->write( 'Dieses ist Blindtext' ).
lr_buf->write('</BODY></HTML>').
lt_text = cl_bcs_convert=>xstring_to_solix( lr_buf->get_buffer( ) ).
lr_doc = cl_document_bcs=>create_document(
i_type = 'HTM'
i_subject = CONV #( l_subject )
i_hex = lt_text
).