<?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: Pdf Attachment error. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-attachment-error/m-p/5727055#M1299230</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;&lt;/P&gt;&lt;P&gt;Call the FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' and pass the parameter commit_work = 'X'&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;Regards,&lt;/P&gt;&lt;P&gt;Jyothi CH.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 May 2009 05:11:36 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-05-26T05:11:36Z</dc:date>
    <item>
      <title>Pdf Attachment error.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-attachment-error/m-p/5727051#M1299226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created a email program,(smartform output OTF to PDF &amp;amp; download pdf working fine.)&lt;/P&gt;&lt;P&gt;now my problem is i need to send the converted pdf to mail.&lt;/P&gt;&lt;P&gt;but when i send mail, i see in my outbox the mail as &lt;STRONG&gt;still send in process&lt;/STRONG&gt;,,,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when i open the Pdf from there it cannot be open and i got a error "There was error in opening. File damaged &amp;amp; could not be repaired."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help me out what to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Dunlop&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2009 04:02:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-attachment-error/m-p/5727051#M1299226</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-26T04:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: Pdf Attachment error.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-attachment-error/m-p/5727052#M1299227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After using the FM to convert Smartform to PDF format.. the output which you get from the FM should be transferred from 132 - long strings to 255 long strings..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Transfer the 132-long strings to 255-long strings&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      LOOP AT g_t_pdf_output.&lt;/P&gt;&lt;P&gt;        TRANSLATE g_t_pdf_output USING ' ~'.&lt;/P&gt;&lt;P&gt;        CONCATENATE g_buffer g_t_pdf_output INTO g_buffer.&lt;/P&gt;&lt;P&gt;      ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      TRANSLATE g_buffer USING '~ '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      DO.&lt;/P&gt;&lt;P&gt;        IF g_flag = 'X'.&lt;/P&gt;&lt;P&gt;          CONCATENATE l_crlf g_buffer INTO g_t_con_bin-line.&lt;/P&gt;&lt;P&gt;          CONDENSE g_t_con_bin-line.&lt;/P&gt;&lt;P&gt;        ELSE.&lt;/P&gt;&lt;P&gt;          g_t_con_bin = g_buffer.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;        APPEND g_t_con_bin.&lt;/P&gt;&lt;P&gt;        SHIFT g_buffer LEFT BY 255 PLACES.&lt;/P&gt;&lt;P&gt;        IF g_buffer IS INITIAL.&lt;/P&gt;&lt;P&gt;          EXIT.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;      ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then after this you can use the FM to send email in PDF format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Total number of lines in the mail.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  DESCRIBE TABLE l_t_con_text LINES l_tablines1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Total number of lines in the attachment.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  DESCRIBE TABLE g_t_con_bin LINES l_tablines2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Creation of the entry for the compressed document&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CLEAR l_t_pack-transf_bin.&lt;/P&gt;&lt;P&gt;  l_t_pack-head_start = 1.&lt;/P&gt;&lt;P&gt;  l_t_pack-head_num   = 0.&lt;/P&gt;&lt;P&gt;  l_t_pack-body_start = 1.&lt;/P&gt;&lt;P&gt;  l_t_pack-body_num   = l_tablines1.&lt;/P&gt;&lt;P&gt;  l_t_pack-doc_size   = l_tablines1 * 255.&lt;/P&gt;&lt;P&gt;  l_t_pack-doc_type   = 'RAW'.&lt;/P&gt;&lt;P&gt;  APPEND l_t_pack.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Creation of the entry for the attachment document&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  l_t_pack-transf_bin = 'X'.&lt;/P&gt;&lt;P&gt;  l_t_pack-head_start =  1.&lt;/P&gt;&lt;P&gt;  l_t_pack-head_num   =  1.&lt;/P&gt;&lt;P&gt;  l_t_pack-body_start =  1.&lt;/P&gt;&lt;P&gt;  l_t_pack-body_num   =  l_tablines2.&lt;/P&gt;&lt;P&gt;  l_t_pack-doc_type   =  'PDF'.&lt;/P&gt;&lt;P&gt;  l_t_pack-doc_size   =  l_tablines2 * 255.&lt;/P&gt;&lt;P&gt;  l_t_pack-obj_descr  =  'TESTPDF'.&lt;/P&gt;&lt;P&gt;  APPEND l_t_pack.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Attached document's name&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  l_t_objhead-line = 'TESTPDF'.&lt;/P&gt;&lt;P&gt;  APPEND l_t_objhead.&lt;/P&gt;&lt;P&gt;&lt;/P&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              = l_t_doc_data&lt;/P&gt;&lt;P&gt;            put_in_outbox              = 'X'&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            packing_list               = l_t_pack&lt;/P&gt;&lt;P&gt;            object_header              = l_t_objhead&lt;/P&gt;&lt;P&gt;            contents_bin               = g_t_con_bin&lt;/P&gt;&lt;P&gt;            contents_txt               = l_t_con_text&lt;/P&gt;&lt;P&gt;            receivers                  = l_t_receivers&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;            document_type_not_exist    = 3&lt;/P&gt;&lt;P&gt;            operation_no_authorization = 4&lt;/P&gt;&lt;P&gt;            parameter_error            = 5&lt;/P&gt;&lt;P&gt;            x_error                    = 6&lt;/P&gt;&lt;P&gt;            enqueue_error              = 7&lt;/P&gt;&lt;P&gt;            OTHERS                     = 8.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    COMMIT WORK.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2009 04:56:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-attachment-error/m-p/5727052#M1299227</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-26T04:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: Pdf Attachment error.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-attachment-error/m-p/5727053#M1299228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  pass X to commit work parameter and check the document type parameter (eg: wa_objpack-doc_type = 'CSV')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ramesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2009 05:04:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-attachment-error/m-p/5727053#M1299228</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-26T05:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: Pdf Attachment error.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-attachment-error/m-p/5727054#M1299229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;solution : &lt;/P&gt;&lt;P&gt;If u are calling the FM :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'&lt;/P&gt;&lt;P&gt;          call function 'SO_DOCUMENT_SEND_API1'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;make the commit_work                = 'X' &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write this statement after sending the mail with pdf as attachment--&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;submit RSCONN01 with MODE = 'INT' and return. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or refer to the following link&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/mail" target="test_blank"&gt;https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/mail&lt;/A&gt;&lt;EM&gt;send&lt;/EM&gt;through&lt;EM&gt;output&lt;/EM&gt;controls&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds,&lt;/P&gt;&lt;P&gt;Madhuri&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: madhuri sonawane on May 26, 2009 10:38 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2009 05:08:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-attachment-error/m-p/5727054#M1299229</guid>
      <dc:creator>Madhurivs23</dc:creator>
      <dc:date>2009-05-26T05:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: Pdf Attachment error.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-attachment-error/m-p/5727055#M1299230</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;&lt;/P&gt;&lt;P&gt;Call the FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' and pass the parameter commit_work = 'X'&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;Regards,&lt;/P&gt;&lt;P&gt;Jyothi CH.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2009 05:11:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-attachment-error/m-p/5727055#M1299230</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-26T05:11:36Z</dc:date>
    </item>
    <item>
      <title>Re: Pdf Attachment error.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-attachment-error/m-p/5727056#M1299231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dunlop,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this sample code below.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT='PDF'
IMPORTING
BIN_FILESIZE = V_LEN_IN
TABLES
OTF          = I_OTF
LINES        = I_TLINE.


LOOP AT I_TLINE.
TRANSLATE I_TLINE USING ' ~'.      " Replacing space by ~
CONCATENATE WA_BUFFER I_TLINE INTO WA_BUFFER.

ENDLOOP.
TRANSLATE WA_BUFFER USING '~ '.      " Replacing space by ~

DO.
LT_OBJBIN = WA_BUFFER.
APPEND LT_OBJBIN. " Appending 255 characters as a record

SHIFT WA_BUFFER LEFT BY 255 PLACES.
IF WA_BUFFER IS INITIAL.
EXIT.
ENDIF.
ENDDO.

DESCRIBE TABLE LT_OBJBIN LINES L_TAB_LINES.

* Pack to main body as RAW.

CLEAR LT_OBJPACK-TRANSF_BIN.
LT_OBJPACK-HEAD_START = 1.
LT_OBJPACK-HEAD_NUM   = 0.
LT_OBJPACK-BODY_START = 1.
LT_OBJPACK-BODY_NUM   = L_LINES.
LT_OBJPACK-DOC_TYPE   = TEXT-012.   "RAW

APPEND LT_OBJPACK.
* Packing as PDF.
LT_OBJPACK-TRANSF_BIN = 'X'.
LT_OBJPACK-HEAD_START = 1.
LT_OBJPACK-HEAD_NUM   = 1.
LT_OBJPACK-BODY_START = 1.
LT_OBJPACK-BODY_NUM   = L_TAB_LINES.
LT_OBJPACK-DOC_TYPE   = TEXT-010.        "PDF
LT_OBJPACK-OBJ_NAME   = TEXT-011.        "SmartForm
LT_OBJPACK-OBJ_DESCR  = PDF_NAME.
LT_OBJPACK-DOC_SIZE   = L_TAB_LINES * 255.

APPEND LT_OBJPACK.

&amp;amp; Call the Final FM....
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards,&lt;/P&gt;&lt;P&gt;Dileep .C&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2009 07:48:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-attachment-error/m-p/5727056#M1299231</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-26T07:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: Pdf Attachment error.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-attachment-error/m-p/5727057#M1299232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ramesh / Madhuri&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;pass X to commit work parameter &lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;works fine (but takes little time)&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;submit RSCONN01 with MODE = 'INT' and return. &lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;works instantly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have already refered to that link madhuri, but still have some little problems, and posted in little threads,&lt;/P&gt;&lt;P&gt;Thanks for your valuble replies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi Dileep&lt;/P&gt;&lt;P&gt;That solves 80 % of my problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Dunlop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Dunlop Raz on May 26, 2009 11:33 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2009 09:32:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-attachment-error/m-p/5727057#M1299232</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-26T09:32:11Z</dc:date>
    </item>
  </channel>
</rss>

