Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3441

Why I can't find a mail in SOST?

$
0
0

By using the following coding, I expect to find a internet-mail in SOST (unsent, because it's a test system, but it has to be there).

 

What I'm doing wrong???

 

DATA: ex_bcs TYPE REF TO cx_bcs.

TRY.
     " create mail document
     DATA(mail) = cl_document_bcs=>create_document(
      i_text    = VALUE #( ( CONV so_text255( 'Testmail' ) ) )
      i_type    = 'RAW'
      i_subject = 'Testsubject' ).

     DATA(send_request) = cl_bcs=>create_persistent( ).
     send_request->set_document( mail ).
     send_request->set_sender( i_sender = cl_cam_address_bcs=>create_internet_address( 'test@test.de' ) ) ##NO_TEXT.
     send_request->add_recipient( i_recipient = cl_cam_address_bcs=>create_internet_address( 'test@test.de' ) ).

   CATCH  cx_address_bcs
          cx_send_req_bcs
          cx_bcs
          INTO ex_bcs.
     MESSAGE ID ex_bcs->msgid TYPE ex_bcs->msgty NUMBER ex_bcs->msgno
     WITH ex_bcs->msgv1 ex_bcs->msgv2 ex_bcs->msgv3 ex_bcs->msgv4.
ENDTRY.

" do not forget to commit, otherwise the mail will not be sent!
IF send_request->send( i_with_error_screen = abap_true ) = abap_true.
   COMMIT WORK.
ENDIF.

" I expect to find an SOST entry, now.


Viewing all articles
Browse latest Browse all 3441

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>