02-05-2008 11:53 AM
Hello guys!!!
I'm trying to send email through CL_BCS class, and it's work fine!
But, always sent with high priority, and I need to send whith normal priority.
I tried this:
DATA: o_send_request TYPE REF TO cl_bcs,
o_document TYPE REF TO cl_document_bcs.
o_document = cl_document_bcs=>create_document(
i_type = 'HTM'
i_text = msgbody
i_subject = subject
i_importance = '5' ).
And this:
CALL METHOD o_send_request->send_request->setu_priority
EXPORTING
i_priority = o_send_request->cp_priority_normal.
Unfortunately, don't works.
Any idea?
Thanks!!!
Kleber S. Kiefer
02-05-2008 3:03 PM
May be try this way
data : y_send type ref to cl_bcs.
try.
call method y_send->set_status_attributes
exporting
i_requested_status = 'N'.
y_send->set_send_immediately( '' ).
call method y_send->set_document
exporting
i_document = y_doc.
y_send->set_priority( i_priority = '9' ). "<<<<< Set priority low
catch cx_send_req_bcs into l_send.
y_save y_str_msg l_send 'E'.
return.
endtry.
a®
04-14-2011 4:27 PM
set_priority( i_priority = '9' ) does not work.
Is there an other way to send emails without high priority?
05-13-2011 7:50 AM
I met the same problem. Is there any solutions for the email priority?
Thanks,
Miao
05-13-2011 9:17 AM
Hi,
Please try the following solution:
* set mail importance to normal
TRY.
lo_document ?= lo_send_request->document( ).
lo_document->set_importance( i_importance = '5' ).
CATCH cx_sy_move_cast_error.
ENDTRY.
In addition, in the Alert framework, which send emails with high priority, it controls the document's importance and then send out the emails with high priority.
* ---------------------------------------------------------------------
* create send request, document etc..
* ---------------------------------------------------------------------
TRY.
lo_document = cl_document_bcs=>create_document(
i_type = l_texttype
i_text = lt_text
i_importance = '1'
i_language = ls_langu_recipient-langu
i_subject = l_subject_short
i_length = l_so_obj_len ).