<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Read Email Content in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-email-content/m-p/1465897#M219419</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to create a RFC function module that will check all the emails send in correspondence to the Sales order. The Sales order number will be a part of the email subject to that will be the search criteria.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can get these details from table SOOD but I am unable to get the email address of the sender and the email address of the recipients of that email. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From where I can fetch the email address of the email recipients?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once I got that then how can i read the content of the email?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;/Manik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Sep 2006 12:21:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-04T12:21:14Z</dc:date>
    <item>
      <title>Read Email Content</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-email-content/m-p/1465897#M219419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to create a RFC function module that will check all the emails send in correspondence to the Sales order. The Sales order number will be a part of the email subject to that will be the search criteria.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can get these details from table SOOD but I am unable to get the email address of the sender and the email address of the recipients of that email. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From where I can fetch the email address of the email recipients?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once I got that then how can i read the content of the email?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;/Manik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Sep 2006 12:21:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-email-content/m-p/1465897#M219419</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-04T12:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: Read Email Content</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-email-content/m-p/1465898#M219420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check the code behind the tcode SOST.. you might find the relevant tables..( SOST,SOOS etc)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~Suresh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Suresh Datti&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Sep 2006 12:51:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-email-content/m-p/1465898#M219420</guid>
      <dc:creator>suresh_datti</dc:creator>
      <dc:date>2006-09-04T12:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: Read Email Content</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-email-content/m-p/1465899#M219421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manik, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;recipient you can find in the table SOES (using creation time SNDDAT + SNDTIM), field MSGV1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get a mail content I am using the class CL_DOCUMENT_BCS, certain objno from tables SOST/SOOS is precondition. Try following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: document TYPE REF TO CL_DOCUMENT_BCS.&lt;/P&gt;&lt;P&gt;DATA: mail_content TYPE BCSS_DBPC.&lt;/P&gt;&lt;P&gt;DATA: im_soodk TYPE SOODK.&lt;/P&gt;&lt;P&gt;DATA: line(255) TYPE C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;im_soodk-objtp = 'RAW'.&lt;/P&gt;&lt;P&gt;im_soodk-objyr = '31'.&lt;/P&gt;&lt;P&gt;im_soodk-objno = '000000001000'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD cl_document_bcs=&amp;gt;GETU_INSTANCE_BY_KEY&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    i_sood_key   = im_soodk&lt;/P&gt;&lt;P&gt;    i_no_enqueue = 'X'&lt;/P&gt;&lt;P&gt;  RECEIVING&lt;/P&gt;&lt;P&gt;    result       = document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*now getting mail text in mail_content&lt;/P&gt;&lt;P&gt;CALL METHOD document-&amp;gt;IF_DOCUMENT_BCS~GET_BODY_PART_CONTENT&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    im_part    = '1'&lt;/P&gt;&lt;P&gt;  RECEIVING&lt;/P&gt;&lt;P&gt;    re_content = mail_content.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT mail_content-cont_text INTO line.&lt;/P&gt;&lt;P&gt;  WRITE: / line.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Advantage:  no IMPORT FROM DATABASE, raw fields, cluster table handling necessary. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Alex&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Alexander Ippa&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Nov 2006 10:35:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-email-content/m-p/1465899#M219421</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-21T10:35:09Z</dc:date>
    </item>
    <item>
      <title>Re: Read Email Content</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-email-content/m-p/1465900#M219422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi manik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u can use the following code to get an email id.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: p_objid TYPE swhactor-objid,&lt;/P&gt;&lt;P&gt;            w_email     TYPE ad_smtpadr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR w_email.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;To determine the email ids&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'FTR_CORR_CHECK_EMAIL_SAP_USER'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_user              = p_objid   "(User ID)&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      e_email_address     = w_email&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      mail_address        = 1&lt;/P&gt;&lt;P&gt;      determination_error = 2&lt;/P&gt;&lt;P&gt;      OTHERS              = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF  sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    write:  w_email .&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Nov 2006 11:18:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-email-content/m-p/1465900#M219422</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-21T11:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: Read Email Content</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-email-content/m-p/1465901#M219423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alexander, do you know how to do that without using BCS?&lt;/P&gt;&lt;P&gt;My release doesn't have it and I have to read the contents of some emails too...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2007 14:01:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-email-content/m-p/1465901#M219423</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-13T14:01:35Z</dc:date>
    </item>
  </channel>
</rss>

