{"id":2715,"date":"2013-07-22T11:06:49","date_gmt":"2013-07-22T09:06:49","guid":{"rendered":"http:\/\/www.karadere.com\/blog\/?p=2715"},"modified":"2013-07-22T11:06:49","modified_gmt":"2013-07-22T09:06:49","slug":"sap-abap-cl_bcs-class-ile-mail-gonderme-no_rec_bcs-hatasi","status":"publish","type":"post","link":"https:\/\/www.karadere.com\/blog\/sap-abap-cl_bcs-class-ile-mail-gonderme-no_rec_bcs-hatasi.html","title":{"rendered":"Sap Abap CL_BCS class ile mail g\u00f6nderme. NO_REC_BCS  hatas\u0131."},"content":{"rendered":"<p><a href=\"http:\/\/www.karadere.com\/blog\/uploads\/\/2010\/02\/sap-abap-logo.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-309\" alt=\"sap-abap-logo\" src=\"http:\/\/www.karadere.com\/blog\/uploads\/\/2010\/02\/sap-abap-logo.png\" width=\"230\" height=\"121\" \/><\/a><\/p>\n<pre>\n\n*&amp;-------------------------------------------------------------*\n\n*&amp;\u00a0Report\u00a0\u00a0ZEMAIL_CL_BCS\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0*\n\n*&amp;-------------------------------------------------------------*\n\n*&amp;\u00a0Mauricio\u00a0Lauffer\n\n*&amp;-------------------------------------------------------------*\n\n \u00a0REPORT\u00a0\u00a0zemail_cl_bcs.\n\n \u00a0CONSTANTS:\n \u00a0\u00a0\u00a0gc_subject\u00a0TYPE\u00a0so_obj_des\u00a0VALUE\u00a0'ABAP\u00a0Email\u00a0with\u00a0CL_BCS',\n \u00a0\u00a0\u00a0gc_raw\u00a0\u00a0\u00a0\u00a0\u00a0TYPE\u00a0char03\u00a0VALUE\u00a0'RAW'.\n\n \u00a0DATA:\n \u00a0\u00a0\u00a0gv_mlrec\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0TYPE\u00a0so_obj_nam,\n \u00a0\u00a0\u00a0gv_sent_to_all\u00a0\u00a0\u00a0TYPE\u00a0os_boolean,\n \u00a0\u00a0\u00a0gv_email\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0TYPE\u00a0adr6-smtp_addr,\n \u00a0\u00a0\u00a0gv_subject\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0TYPE\u00a0so_obj_des,\n \u00a0\u00a0\u00a0gv_text\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0TYPE\u00a0bcsy_text,\n \u00a0\u00a0\u00a0gr_send_request\u00a0\u00a0TYPE\u00a0REF\u00a0TO\u00a0cl_bcs,\n \u00a0\u00a0\u00a0gr_bcs_exception\u00a0TYPE\u00a0REF\u00a0TO\u00a0cx_bcs,\n \u00a0\u00a0\u00a0gr_recipient\u00a0\u00a0\u00a0\u00a0\u00a0TYPE\u00a0REF\u00a0TO\u00a0if_recipient_bcs,\n \u00a0\u00a0\u00a0gr_sender\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0TYPE\u00a0REF\u00a0TO\u00a0cl_sapuser_bcs,\n \u00a0\u00a0\u00a0gr_document\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0TYPE\u00a0REF\u00a0TO\u00a0cl_document_bcs.\n\n \u00a0TRY.\n \u00a0\u00a0\u00a0\u00a0\u00a0\"Create\u00a0send\u00a0request\n \u00a0\u00a0\u00a0\u00a0\u00a0gr_send_request\u00a0=\u00a0cl_bcs=&gt;create_persistent(\u00a0).\n\n \u00a0\u00a0\u00a0\u00a0\u00a0\"Email\u00a0FROM...\n \u00a0\u00a0\u00a0\u00a0\u00a0gr_sender\u00a0=\u00a0cl_sapuser_bcs=&gt;create(\u00a0sy-uname\u00a0).\n \u00a0\u00a0\u00a0\u00a0\u00a0\"Add\u00a0sender\u00a0to\u00a0send\u00a0request\n \u00a0\u00a0\u00a0\u00a0\u00a0CALL\u00a0METHOD\u00a0gr_send_request-&gt;set_sender\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0EXPORTING\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0i_sender\u00a0=\u00a0gr_sender.\n\n \u00a0\u00a0\u00a0\u00a0\u00a0\"Email\u00a0TO...\n \u00a0\u00a0\u00a0\u00a0\u00a0gv_email\u00a0=\u00a0'burhan.karadere@alanadi.com'.\n \u00a0\u00a0\u00a0\u00a0\u00a0gr_recipient\u00a0=\u00a0cl_cam_address_bcs=&gt;create_internet_address(\u00a0gv_email\u00a0).\n \u00a0\u00a0\u00a0\u00a0\u00a0\"Add\u00a0recipient\u00a0to\u00a0send\u00a0request\n \u00a0\u00a0\u00a0\u00a0\u00a0CALL\u00a0METHOD\u00a0gr_send_request-&gt;add_recipient\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0EXPORTING\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0i_recipient\u00a0=\u00a0gr_recipient\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0i_express\u00a0\u00a0\u00a0=\u00a0'X'.\n\n \u00a0\u00a0\u00a0\u00a0\u00a0\"Email\u00a0BODY\n \u00a0\u00a0\u00a0\u00a0\u00a0APPEND\u00a0'Hello\u00a0world!\u00a0My\u00a0first\u00a0ABAP\u00a0email!'\u00a0TO\u00a0gv_text.\n \u00a0\u00a0\u00a0\u00a0\u00a0gr_document\u00a0=\u00a0cl_document_bcs=&gt;create_document(\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0i_type\u00a0\u00a0\u00a0\u00a0=\u00a0gc_raw\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0i_text\u00a0\u00a0\u00a0\u00a0=\u00a0gv_text\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0i_length\u00a0\u00a0=\u00a0'12'\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0i_subject\u00a0=\u00a0gc_subject\u00a0).\n \u00a0\u00a0\u00a0\u00a0\u00a0\"Add\u00a0document\u00a0to\u00a0send\u00a0request\n \u00a0\u00a0\u00a0\u00a0\u00a0CALL\u00a0METHOD\u00a0gr_send_request-&gt;set_document(\u00a0gr_document\u00a0).\n\n \u00a0\u00a0\u00a0\u00a0\u00a0\"Send\u00a0email\n \u00a0\u00a0\u00a0\u00a0\u00a0CALL\u00a0METHOD\u00a0gr_send_request-&gt;send(\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0EXPORTING\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0i_with_error_screen\u00a0=\u00a0'X'\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0RECEIVING\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0result\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0=\u00a0gv_sent_to_all\u00a0).\n \u00a0\u00a0\u00a0\u00a0\u00a0IF\u00a0gv_sent_to_all\u00a0=\u00a0'X'.\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0WRITE\u00a0'Email\u00a0sent!'.\n \u00a0\u00a0\u00a0\u00a0\u00a0ENDIF.\n\n \u00a0\u00a0\u00a0\u00a0\u00a0\"Commit\u00a0to\u00a0send\u00a0email\n \u00a0\u00a0\u00a0\u00a0\u00a0COMMIT\u00a0WORK.\n\n \u00a0\u00a0\u00a0\u00a0\u00a0\"Exception\u00a0handling\n \u00a0\u00a0\u00a0CATCH\u00a0cx_bcs\u00a0INTO\u00a0gr_bcs_exception.\n \u00a0\u00a0\u00a0\u00a0\u00a0WRITE:\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'Error!',\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'Error\u00a0type:',\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0gr_bcs_exception-&gt;error_type.\n \u00a0ENDTRY.<\/pre>\n<p>&nbsp;<\/p>\n<p>Sources &#8211; Kaynaklar :<\/p>\n<p><a href=\"http:\/\/wiki.sdn.sap.com\/wiki\/display\/ABAP\/Sending+Mails+-+Home+Page#SendingMails-HomePage-Introduction\">http:\/\/wiki.sdn.sap.com\/wiki\/display\/ABAP\/Sending+Mails+-+Home+Page#SendingMails-HomePage-Introduction<\/a><\/p>\n<p><a href=\"http:\/\/wiki.sdn.sap.com\/wiki\/display\/Snippets\/Send+email+from+ABAP+with+class+CL_BCS\">http:\/\/wiki.sdn.sap.com\/wiki\/display\/Snippets\/Send+email+from+ABAP+with+class+CL_BCS<\/a><\/p>\n<p><a href=\"http:\/\/benxbrain.com\/en\/sap\/class\/CX_SEND_REQ_BCS-BCS-Send-Request-Exceptions--code.htm\">http:\/\/benxbrain.com\/en\/sap\/class\/CX_SEND_REQ_BCS-BCS-Send-Request-Exceptions&#8211;code.htm<\/a><\/p>\n<p><a href=\"http:\/\/help.sap.com\/saphelp_crm40\/helpdata\/FR\/2d\/1c5d3aebba4c38e10000000a114084\/content.htm\">http:\/\/help.sap.com\/saphelp_crm40\/helpdata\/FR\/2d\/1c5d3aebba4c38e10000000a114084\/content.htm<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sap abap, BSP, webdynpro ile mail g\u00f6nderme i\u00e7in en yeni netweaver 6.0 ve \u00fcst\u00fc ile gelen<br \/>\n CL_BCS class\u0131  ile mail g\u00f6nderme kod \u00f6rne\u011fini sizlerle payla\u015f\u0131yorum.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":"","_links_to":"","_links_to_target":""},"categories":[87,41],"tags":[395,687,1050,1103,1424,1570,1837,1841,1879],"class_list":["post-2715","post","type-post","status-publish","format-standard","hentry","category-advanced-business-application-programming","category-programlama-software","tag-abap","tag-cl_bcs","tag-gonderme","tag-hata","tag-mail","tag-no_rec_bcs","tag-sap","tag-sap-ile-mail","tag-send-mail","has-post-title","has-post-date","has-post-category","has-post-tag","has-post-comment","has-post-author",""],"aioseo_notices":[],"views":3687,"_links":{"self":[{"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/posts\/2715","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/comments?post=2715"}],"version-history":[{"count":0,"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/posts\/2715\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/media?parent=2715"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/categories?post=2715"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/tags?post=2715"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}