<?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 To send mails to different users from 1 program in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/to-send-mails-to-different-users-from-1-program/m-p/3243570#M774188</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to send a mail to different users...Depending upon the conditions.&lt;/P&gt;&lt;P&gt;I have one internal Table Having  10 fields .&lt;/P&gt;&lt;P&gt;Suppose i have 6 records in the internal table ITAB.&lt;/P&gt;&lt;P&gt;I am passing this internal table to function module &lt;/P&gt;&lt;P&gt;'REUSE_ALV_GRID_DISPLAY'.&lt;/P&gt;&lt;P&gt;and I am getting 6 records in the output having 10 fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose this is the format:-&lt;/P&gt;&lt;P&gt;AAA      A    C&lt;/P&gt;&lt;P&gt;AAA      B    D&lt;/P&gt;&lt;P&gt;AAA      C    E&lt;/P&gt;&lt;P&gt;BBB      A    C&lt;/P&gt;&lt;P&gt;CCC      A    C&lt;/P&gt;&lt;P&gt;DDD      A    C&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case we need to send first 3 records to 1 person&lt;/P&gt;&lt;P&gt;4th record to another person&lt;/P&gt;&lt;P&gt;5th record to someone&lt;/P&gt;&lt;P&gt;6th record to someone else&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We need to send the mail in below format:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From: Mamta&lt;/P&gt;&lt;P&gt;To: (Name of the requestor)&lt;/P&gt;&lt;P&gt;subject: sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;some text                                                Jan 4, 2008&lt;/P&gt;&lt;P&gt;========================================&lt;/P&gt;&lt;P&gt;===&lt;/P&gt;&lt;P&gt;Field1 : AAA&lt;/P&gt;&lt;P&gt;Field4  : some text&lt;/P&gt;&lt;P&gt;Field5  : some text &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------------------------------" /&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;Field3         field6           field7            field8         field 9&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------------------------------" /&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;  Value        Value           Value          Value          Value &lt;/P&gt;&lt;P&gt;of Field3     of Field6      of Field7      of Field8      of Field9&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------------------------------" /&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;some text&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thankyou,&lt;/P&gt;&lt;P&gt;Mamta Gupta&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please tell me how to do this...&lt;/P&gt;&lt;P&gt;I need this as soon as possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Mamta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Jan 2008 14:46:06 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-04T14:46:06Z</dc:date>
    <item>
      <title>To send mails to different users from 1 program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/to-send-mails-to-different-users-from-1-program/m-p/3243570#M774188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to send a mail to different users...Depending upon the conditions.&lt;/P&gt;&lt;P&gt;I have one internal Table Having  10 fields .&lt;/P&gt;&lt;P&gt;Suppose i have 6 records in the internal table ITAB.&lt;/P&gt;&lt;P&gt;I am passing this internal table to function module &lt;/P&gt;&lt;P&gt;'REUSE_ALV_GRID_DISPLAY'.&lt;/P&gt;&lt;P&gt;and I am getting 6 records in the output having 10 fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose this is the format:-&lt;/P&gt;&lt;P&gt;AAA      A    C&lt;/P&gt;&lt;P&gt;AAA      B    D&lt;/P&gt;&lt;P&gt;AAA      C    E&lt;/P&gt;&lt;P&gt;BBB      A    C&lt;/P&gt;&lt;P&gt;CCC      A    C&lt;/P&gt;&lt;P&gt;DDD      A    C&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case we need to send first 3 records to 1 person&lt;/P&gt;&lt;P&gt;4th record to another person&lt;/P&gt;&lt;P&gt;5th record to someone&lt;/P&gt;&lt;P&gt;6th record to someone else&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We need to send the mail in below format:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From: Mamta&lt;/P&gt;&lt;P&gt;To: (Name of the requestor)&lt;/P&gt;&lt;P&gt;subject: sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;some text                                                Jan 4, 2008&lt;/P&gt;&lt;P&gt;========================================&lt;/P&gt;&lt;P&gt;===&lt;/P&gt;&lt;P&gt;Field1 : AAA&lt;/P&gt;&lt;P&gt;Field4  : some text&lt;/P&gt;&lt;P&gt;Field5  : some text &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------------------------------" /&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;Field3         field6           field7            field8         field 9&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------------------------------" /&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;  Value        Value           Value          Value          Value &lt;/P&gt;&lt;P&gt;of Field3     of Field6      of Field7      of Field8      of Field9&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------------------------------" /&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;some text&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thankyou,&lt;/P&gt;&lt;P&gt;Mamta Gupta&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please tell me how to do this...&lt;/P&gt;&lt;P&gt;I need this as soon as possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Mamta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jan 2008 14:46:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/to-send-mails-to-different-users-from-1-program/m-p/3243570#M774188</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-04T14:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: To send mails to different users from 1 program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/to-send-mails-to-different-users-from-1-program/m-p/3243571#M774189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sending an email to the Microsoft Inbox is a way of interacting with a non SAP system through ABAP code and hence is very interesting. A fair knowledge of UNIX shell scripting is assumed here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ABAP code to send an email to Microsoft inbox revolves around following UNIX script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Echo "From:" "&amp;lt;"$1"&amp;gt;" &amp;gt; &amp;lt;unix file path name&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Echo "To:" "&amp;lt;"$2"&amp;gt;" &amp;gt;&amp;gt; &amp;lt;unix file path name&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Echo "Subject:" "&amp;lt;"$3"&amp;gt;" &amp;gt;&amp;gt; &amp;lt;unix file path name&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cat $4 &amp;gt;&amp;gt; &amp;lt;unix file path name&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Uuencode $5 $6 &amp;gt;&amp;gt; &amp;lt;unix file path name&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cat &amp;lt;unix file path name&amp;gt; | /usr/sbin/sendmail &amp;#150;f $fraddr $toaddr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Note : the commands in the above script can be case sensitive. Check the actual case on the unix installation in question)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let us understand the various parts of the above script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$1 = Sender email address&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$2 = Recipient email address&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$3 = Subject of the email&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$4 = Path of unix server file having email body&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Form email body as an internal table in ABAP program, download it to a unix server file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$5 = Path of unix server file to be sent as email attachment&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$6 = Name to be given to the attachment (like test1.doc, test1.xls). The corresponding Microsoft icon &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;will be shown in the email for the type of file attached ( Word document, excel document etc)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The script builds a temporary file and pipes the file to the sendmail command to achieve the mission.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This script can be invoked from SAP to send the mail to the intended recipient. Store this small script on the unix server. (Assume script name is sndmail )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To do this we should define a link in the SAP system between a customized command and this unix script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The FM to define a customized command in SAP system has the following pattern.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'SXPG_CALL_SYSTEM' &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;exporting &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;commandname = &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS = ' ' &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;importing &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;status = &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;exec_protocol = &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;exceptions &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;no_permission = 1 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;command_not_found = 2 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters_too_long = 3 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;security_risk = 4 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wrong_check_call_interface = 5 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;program_start_error = 6 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;program_termination_error = 7 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_error = 8 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameter_expected = 9 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;too_many_parameters = 10 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;illegal_command = 11 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;others = 12.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below an EXAMPLE:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZTSAPMAIL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: X_OBJECT_TYPE LIKE SOOD-OBJTP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF X_OBJECT_HD_CHANGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INCLUDE STRUCTURE SOOD1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: END OF X_OBJECT_HD_CHANGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF X_OBJCONT OCCURS 10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INCLUDE STRUCTURE SOLI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: END OF X_OBJCONT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF X_OBJHEAD OCCURS 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INCLUDE STRUCTURE SOLI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: END OF X_OBJHEAD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF RAW_HEAD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INCLUDE STRUCTURE SORH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: END OF RAW_HEAD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF X_RECEIVERS OCCURS 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INCLUDE STRUCTURE SOOS1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: END OF X_RECEIVERS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: RECEIVER LIKE X_RECEIVERS-RECNAM. " Name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*BUILD MESSAGE HEADER&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE 'Sort field goes here' TO X_OBJECT_HD_CHANGE-OBJSRT. " Sort field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE 'Name of the object goes here' TO X_OBJECT_HD_CHANGE-OBJNAM. " Name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE 'Document title goes here' TO X_OBJECT_HD_CHANGE-OBJDES. " Title&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE 'F' TO X_OBJECT_HD_CHANGE-OBJSNS. " Functional OBJECT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE 'E' TO X_OBJECT_HD_CHANGE-OBJLA. " Language&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Object type of the new document&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE 'RAW' TO X_OBJECT_TYPE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR X_OBJCONT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE 'Contents of mail' TO X_OBJCONT-LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND X_OBJCONT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR X_OBJCONT-LINE. APPEND X_OBJCONT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE 'More contents' TO X_OBJCONT-LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND X_OBJCONT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE 'Still more contents'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to x_objcont-line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND X_OBJCONT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE ' ' TO X_OBJCONT-LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND X_OBJCONT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Specific header (Dependent on the object type, here RAW)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REFRESH X_OBJHEAD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DESCRIBE TABLE X_OBJCONT LINES RAW_HEAD-RAWSIZ.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE RAW_HEAD TO X_OBJHEAD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND X_OBJHEAD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*RECEIVERS table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR X_RECEIVERS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REFRESH X_RECEIVERS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE RECEIVER TO X_RECEIVERS-RECNAM. " Name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE 'B' TO X_RECEIVERS-RECESC. " Receiver type&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE 'X' TO X_RECEIVERS-SNDCP. " Send as a copy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE 'X' TO X_RECEIVERS-SNDEX. " EXPRESS DOCUMENT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND X_RECEIVERS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'SO_OBJECT_SEND'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;folder_id = 'OUTBOX'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;forwarder = x_forwarder&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;object_fl_change = x_object_fl_change&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OBJECT_HD_CHANGE = X_OBJECT_HD_CHANGE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;object_id = x_object_id&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OBJECT_TYPE = X_OBJECT_TYPE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OUTBOX_FLAG = 'X'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OWNER = SY-UNAME&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;store_flag = x_store_flag&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;importing&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;object_id_new = x_object_id_new&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;sent_to_all = x_sent_to_all "May need to use&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OBJCONT = X_OBJCONT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OBJHEAD = X_OBJHEAD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;objpara = x_objpara&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;objparb = x_objparb&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RECEIVERS = X_RECEIVERS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;if helpful reward points are appreciated !&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jan 2008 14:58:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/to-send-mails-to-different-users-from-1-program/m-p/3243571#M774189</guid>
      <dc:creator>former_member239282</dc:creator>
      <dc:date>2008-01-04T14:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: To send mails to different users from 1 program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/to-send-mails-to-different-users-from-1-program/m-p/3243572#M774190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need this without using unix script. It is possible without using unix script also.&lt;/P&gt;&lt;P&gt;Please help me in this regard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mamta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jan 2008 15:20:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/to-send-mails-to-different-users-from-1-program/m-p/3243572#M774190</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-04T15:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: To send mails to different users from 1 program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/to-send-mails-to-different-users-from-1-program/m-p/3243573#M774191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The ABAP code to send a sap mail is built around the FM SO_OBJECT_SEND &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The main parameters and table interfaces of the FM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Import Parameters Name and Description Field name Field function&lt;/EM&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Object_hd_change (structure)&lt;/STRONG&gt;Contains the process to be done when SAP mail is marked for execution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the Execute Icon in the SAP mail is clicked the corresponding object is executed&lt;/P&gt;&lt;P&gt; vmtyp &amp;#145;D&amp;#146; for dialog module&lt;/P&gt;&lt;P&gt;&amp;#145;F&amp;#146; for function module&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#145;R&amp;#146; for report&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#145;T&amp;#146; for transaction&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#145;U&amp;#146; for transaction with export&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  Acnam Name of the object which is to be executed, like name of transaction/report &lt;/P&gt;&lt;P&gt;  Skips &amp;#145;X&amp;#146; to execute first screen in background &lt;/P&gt;&lt;P&gt;  Objsns Indicates sensitivity of the object.&lt;/P&gt;&lt;P&gt;&amp;#145;P&amp;#146; for private object&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#145;F&amp;#146; for functional object&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#145;O&amp;#146; for confidential object&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#145;C&amp;#146; for company confidential object&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sensitivity level is restricted to &amp;#145;O&amp;#146; for documents in shared folders&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;Objla&lt;/STRONG&gt; Language of the document&lt;/P&gt;&lt;P&gt;&amp;#145;E&amp;#146; for English&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sy-langu for system language&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;Objnam&lt;/STRONG&gt; Name of the document &lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;Objdes&lt;/STRONG&gt; Short description (Title) of the document &lt;/P&gt;&lt;P&gt;  Objsrt Name of the sort field. This is used to group documents based on certain criteria &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Object_type&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Type of document to be sent with mail&lt;/P&gt;&lt;P&gt;   &amp;#145;RAW&amp;#146; for raw text (default)&lt;/P&gt;&lt;P&gt;&amp;#145;DOC&amp;#146; for word file &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#145;XLS&amp;#146; for excel file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All classes can be used except for folders (&amp;#145;FOL&amp;#146;) and distribution lists (&amp;#145;DLI&amp;#146;)&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Outbox_flag   &amp;#145;X&amp;#146; to indicate that mail should also be stored in outbox of the user after sending (default &amp;#145; &amp;#145;) &lt;/P&gt;&lt;P&gt;Owner   Sap login of the user responsible for transmission &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Table Parameters Name and Description Field Name Field function&lt;/EM&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Objcont&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Table to hold the body of the mail&lt;/P&gt;&lt;P&gt; Line Text lines up to 255 characters &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Objhead&lt;/STRONG&gt;Table to hold number of lines in the body of the mail, i.e size of the table in lines&lt;/P&gt;&lt;P&gt; Line Text lines up to 255 characters &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Objpara&lt;/STRONG&gt;Table to hold the set/get parameters to be transferred to the processing element&lt;/P&gt;&lt;P&gt; Name Name of the parameter. Only first three characters are used &lt;/P&gt;&lt;P&gt;  Option Not used &lt;/P&gt;&lt;P&gt;  Low Value of the parameter in name &lt;/P&gt;&lt;P&gt;  High Not used &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Objparb&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Table to hold information for mails to which a certain processing type is assigned. For a report or transaction with transfer of values to global memory, the table has to contain the parameters with relevant values. The memory id is taken from the first row. For a FM or dialog module, data in table will be transferred as table parameter msgdial&lt;/P&gt;&lt;P&gt; Name For report or transaction with transfer of values to global memory, the field for first row should hold the name of the memory id used for export and the other rows should hold the parameter names. For FM or dialog module this field should hold the values as per the usage of the module &lt;/P&gt;&lt;P&gt;  Value For report or transaction with transfer of values to global memory, the field for first row should remain empty and the other rows should hold values of the parameters. For FM or dialog module this field should hold the values as per the usage of the module &lt;/P&gt;&lt;P&gt;Receivers&lt;/P&gt;&lt;P&gt;Table to hold recipient details&lt;/P&gt;&lt;P&gt; Recnam SAP login of the recipient. Append all the recipients to this table &lt;/P&gt;&lt;P&gt;  Sndcp X for sending mail as a copy &lt;/P&gt;&lt;P&gt;  Sndex X for sending as express document. This will prompt a logged on recipient saying that he or she has received an express mail &lt;/P&gt;&lt;P&gt;  Recesc &amp;#145;B&amp;#146; for SAP user&lt;/P&gt;&lt;P&gt;&amp;#145;E&amp;#146; for external email address&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#145;U&amp;#146; for unix address&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;EM&gt;Export Parameters Name and Description Field name Field function&lt;/EM&gt; Object_id_new&lt;/P&gt;&lt;P&gt;Contains object id of document created during send process &lt;/P&gt;&lt;P&gt;     &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sent_to_all&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;X indicates that document was sent to all recipients. Flag is not activated if sending fails in one or more cases&lt;/P&gt;&lt;P&gt;     &lt;/P&gt;&lt;P&gt;Main Exceptions Name and Description Description &lt;/P&gt;&lt;P&gt;Too_much_receivers  Number of recipients is greater than number for which sender is authorised to send &lt;/P&gt;&lt;P&gt;Object_not_sent Document was not delivered to any of the recipients  &lt;/P&gt;&lt;P&gt;Object_not_exist Document class specified does not exist or cannot be sent &lt;/P&gt;&lt;P&gt;Object_no_authorisation Document could not be sent as one of the required authorisations does not exist &lt;/P&gt;&lt;P&gt;Parameter_error Invalid combination of parameter values transferred to FM &lt;/P&gt;&lt;P&gt;X_error Internal error occurred &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once all the parameters and table interfaces are properly filled, call the function module to send the SAP mail to the recipient inbox.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jan 2008 15:38:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/to-send-mails-to-different-users-from-1-program/m-p/3243573#M774191</guid>
      <dc:creator>former_member239282</dc:creator>
      <dc:date>2008-01-04T15:38:14Z</dc:date>
    </item>
  </channel>
</rss>

