<?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 Re: Send attachment though mail using FM SO_NEW_DOCUMENT_ATT_SEND_API1 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-attachment-though-mail-using-fm-so-new-document-att-send-api1/m-p/2512399#M568226</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;refer to this link.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/abap+general&amp;amp;" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/abap+general&amp;amp;&lt;/A&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;go through the answer of the question "How do I send e-mail?"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be you will be able to find a better way to send your attachment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if helpful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Jul 2007 06:21:49 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-12T06:21:49Z</dc:date>
    <item>
      <title>Send attachment though mail using FM SO_NEW_DOCUMENT_ATT_SEND_API1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-attachment-though-mail-using-fm-so-new-document-att-send-api1/m-p/2512398#M568225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me with the mail sending attachment(excel file) using FM SO_NEW_DOCUMENT_ATT_SEND_API1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the actual problem.&lt;/P&gt;&lt;P&gt;I am using the FM SO_NEW_DOCUMENT_ATT_SEND_API1 in my prog.&lt;/P&gt;&lt;P&gt;My attachment(excel sheet which is taken from internal table) contains the 10 records with one header description and data related to that description.&lt;/P&gt;&lt;P&gt;I am able to send the attachment but the records in the attachment has more than 255 characters nearly 700 character length.&lt;/P&gt;&lt;P&gt;So I spilt up each internal table record(with structure type solisti1) into 3 internal table records and populated it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is showing the entire record in the attached file but I am not able to see some fields which are embeded deeply inside the cells.&lt;/P&gt;&lt;P&gt;And they are not having any proper allignment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please do help me.&lt;/P&gt;&lt;P&gt;Promise to reward points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mac&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jul 2007 06:13:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-attachment-though-mail-using-fm-so-new-document-att-send-api1/m-p/2512398#M568225</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-12T06:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: Send attachment though mail using FM SO_NEW_DOCUMENT_ATT_SEND_API1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-attachment-though-mail-using-fm-so-new-document-att-send-api1/m-p/2512399#M568226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;refer to this link.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/abap+general&amp;amp;" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/abap+general&amp;amp;&lt;/A&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;go through the answer of the question "How do I send e-mail?"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be you will be able to find a better way to send your attachment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if helpful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jul 2007 06:21:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-attachment-though-mail-using-fm-so-new-document-att-send-api1/m-p/2512399#M568226</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-12T06:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: Send attachment though mail using FM SO_NEW_DOCUMENT_ATT_SEND_API1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-attachment-though-mail-using-fm-so-new-document-att-send-api1/m-p/2512400#M568227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is the sample code....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: OBJPACK LIKE SOPCKLSTI1 OCCURS  2 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA: OBJHEAD LIKE SOLISTI1   OCCURS  1 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA: OBJBIN  LIKE SOLISTI1   OCCURS 10 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA: OBJTXT  LIKE SOLISTI1   OCCURS 10 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA: RECLIST LIKE SOMLRECI1  OCCURS  5 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA: DOC_CHNG LIKE SODOCCHGI1.&lt;/P&gt;&lt;P&gt;DATA: TAB_LINES LIKE SY-TABIX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Creating the document to be sent&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DOC_CHNG-OBJ_NAME = 'OFFER'.&lt;/P&gt;&lt;P&gt;DOC_CHNG-OBJ_DESCR = 'Auction of a Picasso jr'.&lt;/P&gt;&lt;P&gt;OBJTXT = 'Reserve price : $250000'.&lt;/P&gt;&lt;P&gt;APPEND OBJTXT.&lt;/P&gt;&lt;P&gt;OBJTXT = 'A reproduction of the painting to be auctioned'.&lt;/P&gt;&lt;P&gt;APPEND OBJTXT.&lt;/P&gt;&lt;P&gt;OBJTXT = 'is enclosed as an attachment.'.&lt;/P&gt;&lt;P&gt;APPEND OBJTXT.&lt;/P&gt;&lt;P&gt;DESCRIBE TABLE OBJTXT LINES TAB_LINES.&lt;/P&gt;&lt;P&gt;READ TABLE OBJTXT INDEX TAB_LINES.&lt;/P&gt;&lt;P&gt;DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Creating the entry for the compressed document&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CLEAR OBJPACK-TRANSF_BIN.&lt;/P&gt;&lt;P&gt;OBJPACK-HEAD_START = 1.&lt;/P&gt;&lt;P&gt;OBJPACK-HEAD_NUM   = 0.&lt;/P&gt;&lt;P&gt;OBJPACK-BODY_START = 1.&lt;/P&gt;&lt;P&gt;OBJPACK-BODY_NUM   = TAB_LINES.&lt;/P&gt;&lt;P&gt;OBJPACK-DOC_TYPE   = 'RAW'.&lt;/P&gt;&lt;P&gt;APPEND OBJPACK.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Creating the document attachment&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;(Assume the data in OBJBIN are given in BMP format)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;OBJBIN = ' \O/ '. APPEND OBJBIN.&lt;/P&gt;&lt;P&gt;OBJBIN = '     '. APPEND OBJBIN.&lt;/P&gt;&lt;P&gt;OBJBIN = ' / \ '. APPEND OBJBIN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DESCRIBE TABLE OBJBIN LINES TAB_LINES.&lt;/P&gt;&lt;P&gt;OBJHEAD = 'picasso.bmp'. APPEND OBJHEAD.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Creating the entry for the compressed attachment&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;OBJPACK-TRANSF_BIN = 'X'.&lt;/P&gt;&lt;P&gt;OBJPACK-HEAD_START = 1.&lt;/P&gt;&lt;P&gt;OBJPACK-HEAD_NUM   = 1.&lt;/P&gt;&lt;P&gt;OBJPACK-BODY_START = 1.&lt;/P&gt;&lt;P&gt;OBJPACK-BODY_NUM   = TAB_LINES.&lt;/P&gt;&lt;P&gt;OBJPACK-DOC_TYPE   = 'BMP'.&lt;/P&gt;&lt;P&gt;OBJPACK-OBJ_NAME   = 'ATTACHMENT'.&lt;/P&gt;&lt;P&gt;OBJPACK-OBJ_DESCR = 'Reproduction object 138'.&lt;/P&gt;&lt;P&gt;OBJPACK-DOC_SIZE   = TAB_LINES * 255.&lt;/P&gt;&lt;P&gt;APPEND OBJPACK..&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Entering names in the distribution list&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;RECLIST-RECEIVER = '&amp;lt;name&amp;gt;@yahoo.com'.&lt;/P&gt;&lt;P&gt;RECLIST-REC_TYPE = 'U'.&lt;/P&gt;&lt;P&gt;APPEND RECLIST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RECLIST-RECEIVER = 'DLI-NEUREICH'.&lt;/P&gt;&lt;P&gt;RECLIST-REC_TYPE = 'P'.&lt;/P&gt;&lt;P&gt;APPEND RECLIST.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Sending the document&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;         DOCUMENT_DATA = DOC_CHNG&lt;/P&gt;&lt;P&gt;         PUT_IN_OUTBOX = 'X'&lt;/P&gt;&lt;P&gt;         COMMIT_WORK   = 'X'&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;         PACKING_LIST  = OBJPACK&lt;/P&gt;&lt;P&gt;         OBJECT_HEADER = OBJHEAD&lt;/P&gt;&lt;P&gt;         CONTENTS_BIN  = OBJBIN&lt;/P&gt;&lt;P&gt;         CONTENTS_TXT  = OBJTXT&lt;/P&gt;&lt;P&gt;         RECEIVERS     = RECLIST&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;         TOO_MANY_RECEIVERS = 1&lt;/P&gt;&lt;P&gt;         DOCUMENT_NOT_SENT  = 2&lt;/P&gt;&lt;P&gt;               OPERATION_NO_AUTHORIZATION = 4&lt;/P&gt;&lt;P&gt;               OTHERS = 99.&lt;/P&gt;&lt;P&gt;     CASE SY-SUBRC.&lt;/P&gt;&lt;P&gt;       WHEN 0.&lt;/P&gt;&lt;P&gt;         WRITE: / 'Result of the send process:'.&lt;/P&gt;&lt;P&gt;         LOOP AT RECLIST.&lt;/P&gt;&lt;P&gt;           WRITE: / RECLIST-RECEIVER(48), ':'.&lt;/P&gt;&lt;P&gt;           IF RECLIST-RETRN_CODE = 0.&lt;/P&gt;&lt;P&gt;             WRITE 'sent successfully'.&lt;/P&gt;&lt;P&gt;           ELSE.&lt;/P&gt;&lt;P&gt;             WRITE 'not sent'.&lt;/P&gt;&lt;P&gt;           ENDIF.&lt;/P&gt;&lt;P&gt;         ENDLOOP.&lt;/P&gt;&lt;P&gt;       WHEN 1.&lt;/P&gt;&lt;P&gt;     WRITE:&lt;/P&gt;&lt;P&gt;     / 'no authorization to send to the specified number recipients!'.&lt;/P&gt;&lt;P&gt;       WHEN 2.&lt;/P&gt;&lt;P&gt;         WRITE: / 'document could not be sent to any of the recipient'.&lt;/P&gt;&lt;P&gt;       WHEN 4.&lt;/P&gt;&lt;P&gt;         WRITE: / 'no authorization to send !'.&lt;/P&gt;&lt;P&gt;       WHEN OTHERS.&lt;/P&gt;&lt;P&gt;         WRITE: / 'error occurred during sending !'.&lt;/P&gt;&lt;P&gt;     ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pavan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jul 2007 06:25:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-attachment-though-mail-using-fm-so-new-document-att-send-api1/m-p/2512400#M568227</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-12T06:25:54Z</dc:date>
    </item>
  </channel>
</rss>

