<?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: SAPScript to PDF in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-to-pdf/m-p/4517043#M1068075</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;After converting OTF to PDF format u elaborate the PDF data before sending the mail?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Oct 2008 16:17:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-10-07T16:17:09Z</dc:date>
    <item>
      <title>SAPScript to PDF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-to-pdf/m-p/4517034#M1068066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;my requirement is to send a Sapscript as an PDF attachement along with the email. I have done all required code and most of the part of the code seems to be working fine. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get a email and i have a PDF attachment and when i try to open the PDF attachement i am getting a error. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where am i going wrong? I searched the forum and found a post from RICH and copied the code as it is to my program and still the same issue. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any inputs?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Oct 2008 14:49:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-to-pdf/m-p/4517034#M1068066</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-07T14:49:22Z</dc:date>
    </item>
    <item>
      <title>Re: SAPScript to PDF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-to-pdf/m-p/4517035#M1068067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt;i try to open the PDF attachement i am getting a error. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what is the error.?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Oct 2008 14:50:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-to-pdf/m-p/4517035#M1068067</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-07T14:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: SAPScript to PDF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-to-pdf/m-p/4517036#M1068068</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;Which fm are u using to convert format from OTF to PDF?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U shoudl use CONVERT_OTF_2_PDF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Oct 2008 14:51:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-to-pdf/m-p/4517036#M1068068</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-07T14:51:57Z</dc:date>
    </item>
    <item>
      <title>Re: SAPScript to PDF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-to-pdf/m-p/4517037#M1068069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The error is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"There was an error processing a page.There was a problem reading this document(135)."&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Oct 2008 14:52:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-to-pdf/m-p/4517037#M1068069</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-07T14:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: SAPScript to PDF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-to-pdf/m-p/4517038#M1068070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using CONVERT_OTF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'CONVERT_OTF'
      EXPORTING
        format                = 'PDF'
      IMPORTING
        bin_filesize          = gv_filesize
      TABLES
        otf                   = gt_otfdata
        lines                 = gt_pdfdata
      EXCEPTIONS
        err_max_linewidth     = 1
        err_format            = 2
        err_conv_not_possible = 3
        err_bad_otf           = 4
        OTHERS                = 5.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Oct 2008 14:53:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-to-pdf/m-p/4517038#M1068070</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-07T14:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: SAPScript to PDF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-to-pdf/m-p/4517039#M1068071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i used the function moduled you have mentioned still the same issue. Same error message.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Oct 2008 14:58:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-to-pdf/m-p/4517039#M1068071</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-07T14:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: SAPScript to PDF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-to-pdf/m-p/4517040#M1068072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Oct 2008 15:07:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-to-pdf/m-p/4517040#M1068072</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-07T15:07:41Z</dc:date>
    </item>
    <item>
      <title>Re: SAPScript to PDF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-to-pdf/m-p/4517041#M1068073</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'm using release 46C and acrobat reader 8.0, this si my code and it works fine:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Close Form:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'CLOSE_FORM'
         TABLES
              OTFDATA                  = T_OTF
         EXCEPTIONS
              UNOPENED                 = 1
              BAD_PAGEFORMAT_FOR_PRINT = 2
              SEND_ERROR               = 3
              SPOOL_ERROR              = 4
              OTHERS                   = 5.
    IF SY-SUBRC &amp;lt;&amp;gt; 0.
      MESSAGE I208(00) WITH 'Errore chiusura stampa'(A02).
    ELSE.
      PERFORM DOWNLOAD_PDF.
      PERFORM SEND_MAIL.
    ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FORM DOWNLOAD_PDF.

  DATA: BIN_FILESIZE TYPE I.

  DATA: T_FILE_PDF     TYPE STANDARD TABLE OF TLINE,
        DOCTAB_ARCHIVE TYPE STANDARD TABLE OF  DOCS.

  DATA: FILE_TABLE     TYPE FILETABLE WITH HEADER LINE.

  DATA: RC          TYPE I,
        USER_ACTION TYPE I.

  DATA: TITLE    TYPE STRING,
        FILENAME TYPE STRING.

  CHECK P_PDF = 'X'.

  CALL FUNCTION 'CONVERT_OTF_2_PDF'
       IMPORTING
            BIN_FILESIZE           = BIN_FILESIZE
       TABLES
            OTF                    = T_OTF
            DOCTAB_ARCHIVE         = DOCTAB_ARCHIVE
            LINES                  = T_FILE_PDF
       EXCEPTIONS
            ERR_CONV_NOT_POSSIBLE  = 1
            ERR_OTF_MC_NOENDMARKER = 2
            OTHERS                 = 3.
  IF SY-SUBRC &amp;lt;&amp;gt; 0.
    MESSAGE I208(00) WITH 'Errore conversione PDF'(A03).
    EXIT.
  ENDIF.

  TITLE = 'Creare File'(T02).

  CALL METHOD CL_GUI_FRONTEND_SERVICES=&amp;gt;FILE_OPEN_DIALOG
     EXPORTING
       WINDOW_TITLE            = TITLE
       DEFAULT_EXTENSION       = '*.pdf'
    CHANGING
      FILE_TABLE              = FILE_TABLE[]
      RC                      = RC
      USER_ACTION             = USER_ACTION
    EXCEPTIONS
      FILE_OPEN_DIALOG_FAILED = 1
      CNTL_ERROR              = 2
      ERROR_NO_GUI            = 3
      OTHERS                  = 4
          .
  IF SY-SUBRC &amp;lt;&amp;gt; 0.
    MESSAGE I208(00) WITH 'Errore creazione PDF'(A04).
    EXIT.
  ELSE.
    IF USER_ACTION = 9. EXIT. ENDIF.
    IF RC = 1.
      READ TABLE FILE_TABLE INDEX 1.
    ENDIF.
  ENDIF.

  MOVE FILE_TABLE-FILENAME TO FILENAME.

  CALL METHOD CL_GUI_FRONTEND_SERVICES=&amp;gt;GUI_DOWNLOAD
    EXPORTING
       BIN_FILESIZE            = BIN_FILESIZE
       FILENAME                = FILENAME
       FILETYPE                = 'BIN'
    CHANGING
      DATA_TAB                = T_FILE_PDF
    EXCEPTIONS
      FILE_WRITE_ERROR        = 1
      NO_BATCH                = 2
      GUI_REFUSE_FILETRANSFER = 3
      INVALID_TYPE            = 4
      NO_AUTHORITY            = 5
      UNKNOWN_ERROR           = 6
      HEADER_NOT_ALLOWED      = 7
      SEPARATOR_NOT_ALLOWED   = 8
      FILESIZE_NOT_ALLOWED    = 9
      HEADER_TOO_LONG         = 10
      DP_ERROR_CREATE         = 11
      DP_ERROR_SEND           = 12
      DP_ERROR_WRITE          = 13
      UNKNOWN_DP_ERROR        = 14
      ACCESS_DENIED           = 15
      DP_OUT_OF_MEMORY        = 16
      DISK_FULL               = 17
      DP_TIMEOUT              = 18
      FILE_NOT_FOUND          = 19
      DATAPROVIDER_EXCEPTION  = 20
      CONTROL_FLUSH_ERROR     = 21
      OTHERS                  = 22
          .
  IF SY-SUBRC &amp;lt;&amp;gt; 0.
    MESSAGE I208(00) WITH 'Errore creazione PDF'(A04).
    EXIT.
  ELSE.
    MESSAGE S208(00) WITH 'File creato con successo'(S01).
  ENDIF.

  CHECK P_OPEN = 'X'.

  CALL FUNCTION 'CALL_BROWSER'
       EXPORTING
            URL                    = FILE_TABLE-FILENAME
       EXCEPTIONS
            FRONTEND_NOT_SUPPORTED = 1
            FRONTEND_ERROR         = 2
            PROG_NOT_FOUND         = 3
            NO_BATCH               = 4
            UNSPECIFIED_ERROR      = 5
            OTHERS                 = 6.

  IF SY-SUBRC &amp;lt;&amp;gt; 0.
    MESSAGE S208(00) WITH 'Impossibile aprire file'(A05).
  ENDIF.

ENDFORM.                    " DOWNLOAD_PDF&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U can create an attachement using OPEN_FORM:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF _OPEN_FORM = SPACE.


      CASE 'X'.
        WHEN P_PRT.
          XDEVICE        = 'PRINTER'.
        WHEN P_PDF.
          XDEVICE        = 'PRINTER'.
          ITCPO-TDGETOTF = 'X'.
        WHEN P_MAIL.

          XPROGRAMM = SY-REPID.


          CALL FUNCTION 'ADDR_GET_NEXT_COMM_TYPE'
               EXPORTING
                    STRATEGY           = 'CS01'
                    ADDRESS_NUMBER     = T_KNA1-ADRNR
               IMPORTING
                    COMM_TYPE          = LVS_COMM_TYPE
                    COMM_VALUES        = LVS_COMM_VALUES
               EXCEPTIONS
                    ADDRESS_NOT_EXIST  = 1
                    PERSON_NOT_EXIST   = 2
                    NO_COMM_TYPE_FOUND = 3
                    INTERNAL_ERROR     = 4
                    PARAMETER_ERROR    = 5
                    OTHERS             = 6.

          IF SY-SUBRC &amp;lt;&amp;gt; 0.
            MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                   WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.


          CALL FUNCTION 'CONVERT_COMM_TYPE_DATA'
               EXPORTING
                    PI_COMM_TYPE              = LVS_COMM_TYPE
                    PI_COMM_VALUES            = LVS_COMM_VALUES
                    PI_COUNTRY                = T_KNA1-LAND1
                    PI_REPID                  = XPROGRAMM
               IMPORTING
                    PE_ITCPO                  = ITCPO
                    PE_DEVICE                 = XDEVICE
                    PE_MAIL_RECIPIENT         = LVS_RECIPIENT
                    PE_MAIL_SENDER            = LVS_SENDER
               EXCEPTIONS
                    COMM_TYPE_NOT_SUPPORTED   = 1
                    RECIPIENT_CREATION_FAILED = 2
                    SENDER_CREATION_FAILED    = 3
                    OTHERS                    = 4.

          IF SY-SUBRC &amp;lt;&amp;gt; 0.
            MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.


      ENDCASE.


      CALL FUNCTION 'OPEN_FORM'
           EXPORTING
                DEVICE                      = XDEVICE
                DIALOG                      = 'X'
                FORM                        = 'ZFI_CL_EC_MOVI'
                OPTIONS                     = ITCPO
                MAIL_SENDER                 = LVS_SENDER
                MAIL_RECIPIENT              = LVS_RECIPIENT
           EXCEPTIONS
                CANCELED                    = 1
                DEVICE                      = 2
                FORM                        = 3
                OPTIONS                     = 4
                UNCLOSED                    = 5
                MAIL_OPTIONS                = 6
                ARCHIVE_ERROR               = 7
                INVALID_FAX_NUMBER          = 8
                MORE_PARAMS_NEEDED_IN_BATCH = 9
                SPOOL_ERROR                 = 10
                OTHERS                      = 11.
      IF SY-SUBRC &amp;lt;&amp;gt; 0.
        EXIT.
      ENDIF.

      _OPEN_FORM = 'X'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Oct 2008 15:09:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-to-pdf/m-p/4517041#M1068073</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-07T15:09:19Z</dc:date>
    </item>
    <item>
      <title>Re: SAPScript to PDF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-to-pdf/m-p/4517042#M1068074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thanks again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But i noticed a strange issue. I copied the downlod code and i noticed that i am able to downlowd the PDF and open the PDF with no issues. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if i remove the downloc code and use the email sending logic then i am getting a PDF attachment which i am unable to open and i am getting the same error message. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So i can conclude that the problem is with the sending the email with attachement and not with the OTF to PDF conversion. Any idea what may be wrong in the email?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Oct 2008 15:52:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-to-pdf/m-p/4517042#M1068074</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-07T15:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: SAPScript to PDF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-to-pdf/m-p/4517043#M1068075</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;After converting OTF to PDF format u elaborate the PDF data before sending the mail?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Oct 2008 16:17:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-to-pdf/m-p/4517043#M1068075</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-07T16:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: SAPScript to PDF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-to-pdf/m-p/4517044#M1068076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am having the same issue described in this thread.....I am on ECC 6.0 and am converting SAPScript (OTF) to PDF.  I then send via SO_OBJECT_SEND.  The PDF views fine right from trxn SOST but when I send the email out and click on the PDF attachment in Outlook, I get &lt;/P&gt;&lt;P&gt;the following error:  'Adobe Reader could not open &amp;lt;file&amp;gt; because it is either not a supported&lt;/P&gt;&lt;P&gt;file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded).'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's my code:&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CLOSE_FORM'&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      otfdata = l_otfdata_tab&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      OTHERS  = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CONVERT_OTF'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    FORMAT                      = 'PDF'&lt;/P&gt;&lt;P&gt;    MAX_LINEWIDTH               = 134&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ARCHIVE_INDEX               = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  COPYNUMBER                  = 0&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ASCII_BIDI_VIS2LOG          = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PDF_DELETE_OTFTAB           = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;    BIN_FILESIZE                = l_binsize&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  BIN_FILE                    =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    OTF                         = l_otfdata_tab&lt;/P&gt;&lt;P&gt;    LINES                       = l_otfdata_tab1&lt;/P&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;P&gt;    ERR_MAX_LINEWIDTH           = 1&lt;/P&gt;&lt;P&gt;    ERR_FORMAT                  = 2&lt;/P&gt;&lt;P&gt;    ERR_CONV_NOT_POSSIBLE       = 3&lt;/P&gt;&lt;P&gt;    ERR_BAD_OTF                 = 4&lt;/P&gt;&lt;P&gt;    OTHERS                      = 5&lt;/P&gt;&lt;P&gt;          .&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;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'QCE1_CONVERT'&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      t_source_tab         = l_otfdata_tab1&lt;/P&gt;&lt;P&gt;      t_target_tab         = l_objbin&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      convert_not_possible = 1&lt;/P&gt;&lt;P&gt;      OTHERS               = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Add the Email Body to MAIL_CONTENT table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  MOVE 'Thank you for your order' TO mail_content-line.&lt;/P&gt;&lt;P&gt;  APPEND mail_content.&lt;/P&gt;&lt;P&gt;  MOVE 'See attached PDF for your Order Confirmation' TO mail_content-line.&lt;/P&gt;&lt;P&gt;  APPEND mail_content.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  packing_list-transf_bin = 'X'.&lt;/P&gt;&lt;P&gt;  packing_list-head_start = 1.&lt;/P&gt;&lt;P&gt;  packing_list-head_num = 2.&lt;/P&gt;&lt;P&gt;  packing_list-body_start = 1.&lt;/P&gt;&lt;P&gt;  DESCRIBE TABLE l_objbin[] LINES packing_list-body_num.&lt;/P&gt;&lt;P&gt;  packing_list-body_num = 9999.&lt;/P&gt;&lt;P&gt;  packing_list-objtp = 'PDF'.&lt;/P&gt;&lt;P&gt;  packing_list-objnam = 'Order Confirmation'.&lt;/P&gt;&lt;P&gt;  packing_list-OBJDES = 'Order Confirmation'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; packing_list-file_ext = 'PDF'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  APPEND packing_list.&lt;/P&gt;&lt;P&gt;  CLEAR packing_list&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'SO_OBJECT_SEND'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      object_hd_change           = tsood1&lt;/P&gt;&lt;P&gt;      object_type                = 'RAW'&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      objcont                    = mail_content&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     objcont                    = l_objbin&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      receivers                  = receivers&lt;/P&gt;&lt;P&gt;      att_cont                   = l_objbin&lt;/P&gt;&lt;P&gt;      packing_list               = packing_list&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    note_text                  = mail_content&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      active_user_not_exist      = 1&lt;/P&gt;&lt;P&gt;      communication_failure      = 2&lt;/P&gt;&lt;P&gt;      component_not_available    = 3&lt;/P&gt;&lt;P&gt;      folder_not_exist           = 4&lt;/P&gt;&lt;P&gt;      folder_no_authorization    = 5&lt;/P&gt;&lt;P&gt;      forwarder_not_exist        = 6&lt;/P&gt;&lt;P&gt;      note_not_exist             = 7&lt;/P&gt;&lt;P&gt;      object_not_exist           = 8&lt;/P&gt;&lt;P&gt;      object_not_sent            = 9&lt;/P&gt;&lt;P&gt;      object_no_authorization    = 10&lt;/P&gt;&lt;P&gt;      object_type_not_exist      = 11&lt;/P&gt;&lt;P&gt;      operation_no_authorization = 12&lt;/P&gt;&lt;P&gt;      owner_not_exist            = 13&lt;/P&gt;&lt;P&gt;      parameter_error            = 14&lt;/P&gt;&lt;P&gt;      substitute_not_active      = 15&lt;/P&gt;&lt;P&gt;      substitute_not_defined     = 16&lt;/P&gt;&lt;P&gt;      system_failure             = 17&lt;/P&gt;&lt;P&gt;      too_much_receivers         = 18&lt;/P&gt;&lt;P&gt;      user_not_exist             = 19&lt;/P&gt;&lt;P&gt;      x_error                    = 20&lt;/P&gt;&lt;P&gt;      originator_not_exist       = 21&lt;/P&gt;&lt;P&gt;      OTHERS                     = 22.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Oct 2008 04:13:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-to-pdf/m-p/4517044#M1068076</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-31T04:13:26Z</dc:date>
    </item>
  </channel>
</rss>

