Error while sending PDF file by Email

Hi All,
I have a requirement to send multiple files by Email attachement from SAP to internet address.
All files sent correctly, except one PDF file.
I have 2 spools, and I am using FM CONVERT_OTFSPOOLJOB_2_PDF to get PDF data for Spool.
Then I am converting the 134 length PDF data to 255 Email Attachement binary table.
Now I have 2 file F1.PDF and F2.PDF, in SAP Office outbox and in receivers email, F2.PDF opening fine, however for F1.PDF I am getting some error no 109 in Adobe, which says "There was an error processing a page.There was a problem reading this document. (109)".
Please help in figuring out the reason for this.
Additional Information F2.PDF has some text data (SAP Script output) and F1.PDF has some text data with logo (SAP Script Output)
Thanks in advance

hi check out following code..
REPORT ZRICH_0003.
DATA: ITCPO LIKE ITCPO,
TAB_LINES LIKE SY-TABIX.
Variables for EMAIL functionality
DATA: MAILDATA LIKE SODOCCHGI1.
DATA: MAILPACK LIKE SOPCKLSTI1 OCCURS 2 WITH HEADER LINE.
DATA: MAILHEAD LIKE SOLISTI1 OCCURS 1 WITH HEADER LINE.
DATA: MAILBIN LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
DATA: MAILTXT LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
DATA: MAILREC LIKE SOMLREC90 OCCURS 0 WITH HEADER LINE.
DATA: SOLISTI1 LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE.
PERFORM SEND_FORM_VIA_EMAIL.
FORM SEND_FORM_VIA_EMAIL *
FORM SEND_FORM_VIA_EMAIL.
CLEAR: MAILDATA, MAILTXT, MAILBIN, MAILPACK, MAILHEAD, MAILREC.
REFRESH: MAILTXT, MAILBIN, MAILPACK, MAILHEAD, MAILREC.
Creation of the document to be sent File Name
MAILDATA-OBJ_NAME = 'TEST'.
Mail Subject
MAILDATA-OBJ_DESCR = 'Subject'.
Mail Contents
MAILTXT-LINE = 'Here is your file'.
APPEND MAILTXT.
Prepare Packing List
PERFORM PREPARE_PACKING_LIST.
Set recipient - email address here!!!
MAILREC-RECEIVER = '[email protected]'.
MAILREC-REC_TYPE = 'U'.
APPEND MAILREC.
Sending the document
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = MAILDATA
PUT_IN_OUTBOX = ' '
TABLES
PACKING_LIST = MAILPACK
OBJECT_HEADER = MAILHEAD
CONTENTS_BIN = MAILBIN
CONTENTS_TXT = MAILTXT
RECEIVERS = MAILREC
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
OPERATION_NO_AUTHORIZATION = 4
OTHERS = 99.
ENDFORM.
Form PREPARE_PACKING_LIST
FORM PREPARE_PACKING_LIST.
CLEAR: MAILPACK, MAILBIN, MAILHEAD.
REFRESH: MAILPACK, MAILBIN, MAILHEAD.
DESCRIBE TABLE MAILTXT LINES TAB_LINES.
READ TABLE MAILTXT INDEX TAB_LINES.
MAILDATA-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( MAILTXT ).
Creation of the entry for the compressed document
CLEAR MAILPACK-TRANSF_BIN.
MAILPACK-HEAD_START = 1.
MAILPACK-HEAD_NUM = 0.
MAILPACK-BODY_START = 1.
MAILPACK-BODY_NUM = TAB_LINES.
MAILPACK-DOC_TYPE = 'RAW'.
APPEND MAILPACK.
Creation of the document attachment
This form gets the OTF code from the SAPscript form.
If you already have your OTF code, I believe that you may
be able to skip this form. just do the following code, looping thru
your SOLISTI1 and updating MAILBIN.
PERFORM GET_OTF_CODE.
LOOP AT SOLISTI1.
MOVE-CORRESPONDING SOLISTI1 TO MAILBIN.
APPEND MAILBIN.
ENDLOOP.
DESCRIBE TABLE MAILBIN LINES TAB_LINES.
MAILHEAD = 'TEST.OTF'.
APPEND MAILHEAD.
Creation of the entry for the compressed attachment
MAILPACK-TRANSF_BIN = 'X'.
MAILPACK-HEAD_START = 1.
MAILPACK-HEAD_NUM = 1.
MAILPACK-BODY_START = 1.
MAILPACK-BODY_NUM = TAB_LINES.
MAILPACK-DOC_TYPE = 'OTF'.
MAILPACK-OBJ_NAME = 'TEST'.
MAILPACK-OBJ_DESCR = 'Subject'.
MAILPACK-DOC_SIZE = TAB_LINES * 255.
APPEND MAILPACK.
ENDFORM.
Form GET_OTF_CODE
FORM GET_OTF_CODE.
DATA: BEGIN OF OTF OCCURS 0.
INCLUDE STRUCTURE ITCOO .
DATA: END OF OTF.
DATA: ITCPO LIKE ITCPO.
DATA: ITCPP LIKE ITCPP.
CLEAR ITCPO.
ITCPO-TDGETOTF = 'X'.
Start writing OTF code
CALL FUNCTION 'OPEN_FORM'
EXPORTING
FORM = 'ZTEST_FORM'
LANGUAGE = SY-LANGU
OPTIONS = ITCPO
DIALOG = ' '
EXCEPTIONS
OTHERS = 1.
CALL FUNCTION 'START_FORM'
EXCEPTIONS
ERROR_MESSAGE = 01
OTHERS = 02.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
WINDOW = 'MAIN'
EXCEPTIONS
ERROR_MESSAGE = 01
OTHERS = 02.
Close up Form and get OTF code
CALL FUNCTION 'END_FORM'
EXCEPTIONS
ERROR_MESSAGE = 01
OTHERS = 02.
MOVE-CORRESPONDING ITCPO TO ITCPP.
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT = ITCPP
TABLES
OTFDATA = OTF
EXCEPTIONS
OTHERS = 1.
Move OTF code to structure SOLI form email
CLEAR SOLISTI1. REFRESH SOLISTI1.
LOOP AT OTF.
SOLISTI1-LINE = OTF.
APPEND SOLISTI1.
ENDLOOP.
ENDFORM.

Similar Messages

  • Trouble send PDF file by email

    Hi I down loaded the new ios7 app and since then I have had trouble sending PDF files via email can any 1put any light in it?

    Just like any other file...
    On Sat, Mar 7, 2015 at 12:16 AM, larrys19338374 <[email protected]>

  • Internal error while creating pdf files

    Good morning.
    I have problems while creating pdf files from FM documents,using FM9: I get an internal error, see here an example:
    === Header Begin ===
    Internal Error: 9004, 6921628, 9677518, 0
    FrameMaker 9.0.0 for Intel
    Build: 9.0p255
    Window System: MSWindows
    Operating System: Windows NT 5.1 (major.minor.build: 5.1.2600 Service Pack 3)
    Generated on: venerdì 30 marzo 2012 11.38.51
    To file: C:\Documents and Settings\itgzeanlo\Dati applicazioni\Adobe\FrameMaker\9\FrameLog_12.03.30_11.38.51.txt
    === Header End ===
    === Stack Trace Begin ===
    $699d9c
    $93aace
    === Stack Trace End ===
    === Open Window List Begin ===
    # not implemented
    === Open Window List End ===
    === Recent Commands Begin ===
    === Recent Commands End ===
    === Recent API Calls Begin ===
    # not implemented
    === Recent API Calls End ===
    === Windows Relocation Information Begin ===
    Application: 00400000
    FrameMaker.exe: 00400000 00979000
    ntdll.dll: 7c910000 000b8000
    I don't have a clue of what's wrong. I tried to uninstall the software and then to install it again, with the same result.
    Can you please help me?
    Kind regards.
    Antonio Locati

    > Getting back to your issue - how are you trying to create a PDF? Save As or printing to the AdobePDF printer instance?
    I've tried in both ways, and it's exactly the same: I get the error.
    > If XP, have you installed the MS hotfix?
    Windows is regularly updated through Windows Update.
    > What's in your FM doc?
    The document is based on some tables (it's a pricelist for our products), there are also some links to some .eps files (which are correctly displayed on screen, so the path is correct).
    > Did it work before or has it changed and now errors out?
    The file (or better the book made of about fifteen FM files) was created by someone else, on another PC. When I open it, I get the error. When I send my files to another person, he can create pdf files without any problem.
    > Does it update without any errors?
    Yes, I regularly update Framemaker without any error.
    Thanks for your help!!

  • TS3276 Can't send PDF files by email

    I can't send PDF files of photo from my email. ??

    Dropbox
    A simple and popular way to copy files and share files amoung your devices.
    https://www.dropbox.com/
    copy to Share folder & email them that they have access
    copy to Public folder & email them the link.
    Robert

  • I cant send pdf file to email

    Hi '
    I have a acrobat pro 9 and when i tray to send the file to email i get that i dont have an email defualt set .
    I have set the outlook as the defualt program and still get the same message .
    what can i do ?

    The problem may be related to the OS you have, the mail client being used, or whether mapi is properly activated on a Windows machine.

  • Error while opening PDF file downloaded  from database Blob column

    Hi All,
    I am working on jdev 11.1.1.4.0.
    In my use-case I am using filedownload Actionlistner on a link to get the PDF file stored in the database in blob field. These files are being uploaded from other use-case in adf only.
    After getting the dialog box to open/save/cancel for the PDF file when i click on open then i am getting an error *'Adobe Reader could not open 'abc.pdf' because it is either not a supported file type*
    or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly docoded)' for some files , and to my surprise I am able to open some files.
    When I open these PDF files separately from desktop I am able to view the content of each and every file in adobe reader.
    I dont know where the problem exactly lies , while uploading/downloading the file . Any ideas/thoughts to resolve this issue?
    Thanks
    Kanika

    Thanks a lot Timo...!!!
    I checked the PDF file downloaded directly from the blob column in DB, there only it is corrupted so must be the problem in uploading the file. I am checking the code line by line,, but no problem in setting the file content type,size etc.
    Here is the code snippet ..
    byte[] buff;
    buff = new byte[(int)length]; -- Length is the file size
    int bytesRead = is.read(buff);
    for (int i = 0; bytesRead < buff.length; i++) {
    // int b = is.read();
    int b = is.read();
    if (b == -1)
    break;
    buff[i] = (byte)b;
    BlobDomain blobDomian = new BlobDomain((buff));
    TestVORow = (TestVORow Impl)TestVO.createRow();
    if(blobDomian != null) {
    TestVORow.setAttachment(blobDomian);
    am.getTransaction().commit();
    This seems to be Ok to me..the same issue, file is still corrupting.
    Any thoughts from your side ???
    Thanks
    Kanika
    The problem is resolved.
    Changes made are instead of
    InputStream is;
    used ... BufferedInputStream bis ;
    and after
    for (int i = 0; bytesRead < buff.length; i++) {
    // int b = bis.read();
    int b = bis.read();
    if (b == -1)
    break;
    buff[i] = (byte)b;
    bis.close(); // use this close bufferedInput Stream.
    Able to open each and every file now..Thanks for your suggestions Timo and Frank.
    Edited by: Kanika on Mar 6, 2012 3:15 AM

  • Error While Opening PDF File in SAP Inbox

    Hello Experts,
    I am facing a weird error in SAP Inbox while opening a PDF files (both created by custom ABAP programs as well as the one attached to a new SAP Inbox message from my desktop & sent to my Inbox as a test).
    The error states that "This file does not have a program associated with it for performing this action. Please install program or, if one is already installed, create an association in the Default Programs control panel.".
    I checked TCode DC30 also & found an appropriate program is already maintained for PDF.
    I couldn't make out more out of this error message. Any inputs in this regard will be highly appreciable.
    Regards,
    Shaurya

    Hi,
      Find out the FM that's generating the actual error through de-bug and analyze the same by looking in OSS and or SDN.
    Regards
    Narasimhan

  • Error while opening .PDF files in document library sharepoint 2013

    Hi
    I am getting an error while opening a .pdf file,
    Please help me find the solution.
    Thanks
    Paru

    Launch IE -> Click on Gear (settings) -> Manage Add-ons -> Show: All Add-ons ->
    There are 2 Adobe Add-ons:
    Adobe PDF Reader  &  Adobe Acrobat Sharepoint Open Document
    Double-click both and be sure to click the button "ALLOW ON ALL SITES"
    (An * will appear in the field)
     http://crowdsupport.telstra.com.au/t5/T-Suite-Applications/There-was-an-error-opening-this-document-The-filename-directory/td-p/197425
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/ae2eea40-9fa6-46be-bca1-ac5eb5597d5e/sharepoint-2010-adobe-reader-error-opening-pdf-files?forum=sharepointgeneralprevious
    http://community.office365.com/en-us/f/154/t/46204.aspx?PageIndex=2
    disable the Mcafee Firewall Plug In.  This is after of course I ran superantispyware to remove some malware.  uninstalled and reinstalled the Adobe Reade
    https://forums.adobe.com/message/1776202?tstart=0

  • Error while sendinf pdf file as attachment

    hi all.,
    am trying to send the pdf file of a smartform as attachment thru mail .. but its getting failed am getting error (sy-subrc = 6 ) after calling the fm so_new_document_att_send_api1 .. pls. suggest the possible cause of errors.
    CALL FUNCTION 'CONVERT_OTF_2_PDF'
            IMPORTING
              bin_filesize           = lv_bin_filesize
            TABLES
              otf                    = ls_job_output_info-otfdata
              doctab_archive         = it_docs
              lines                  = it_lines
            EXCEPTIONS
              err_conv_not_possible  = 1
              err_otf_mc_noendmarker = 2
              OTHERS                 = 3.
          IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
    *--- Get filename to store DYNAMIC
          IF p_lsdir IS NOT INITIAL.
            MOVE p_lsdir  TO lv_path.
          ENDIF.
          CONDENSE wa_kna1-kunnr.
          CONCATENATE 'SOA' wa_kna1-kunnr  '.pdf' INTO lv_name.
          CONCATENATE  lv_path lv_name INTO  lv_fullpath.
          break ibm_prasad.
          CLEAR wa_buffer.
          LOOP AT it_lines.
            TRANSLATE it_lines USING '~'.
            CONCATENATE wa_buffer it_lines INTO wa_buffer.
          ENDLOOP.
          TRANSLATE wa_buffer USING '~'.
          DO.
            i_record = wa_buffer.
            APPEND i_record.
            SHIFT wa_buffer LEFT BY 255 PLACES.
            IF wa_buffer IS INITIAL.
              EXIT.
            ENDIF.
          ENDDO.
          REFRESH: i_reclist,
                   i_objtxt,
                   i_objbin,
                   i_objpack.
          CLEAR wa_objhead.
          i_objbin[] = i_record[].
          i_objtxt = 'SOA test with pdf-Attachment!'.
          APPEND i_objtxt.
          DESCRIBE TABLE i_objtxt LINES v_lines_txt.
          READ TABLE i_objtxt INDEX v_lines_txt.
          wa_doc_chng-obj_name = 'SOA'.
          wa_doc_chng-expiry_dat = sy-datum + 10.
          wa_doc_chng-obj_descr = 'SOA'.
          wa_doc_chng-sensitivty = 'F'.
          wa_doc_chng-doc_size = v_lines_txt * 255.
    *     Maint Text
          CLEAR i_objpack-transf_bin.
          i_objpack-head_start = 1.
          i_objpack-head_num = 0.
          i_objpack-body_start = 1.
          i_objpack-body_num = v_lines_txt.
          i_objpack-doc_type = 'RAW'.
          APPEND i_objpack.
    * Attachment (pdf-Attachment)
          i_objpack-transf_bin = 'X'.
          i_objpack-head_start = 1.
          i_objpack-head_num = 0.
          i_objpack-body_start = 1.
          DESCRIBE TABLE i_objbin LINES v_lines_bin.
          READ TABLE i_objbin INDEX v_lines_bin.
          i_objpack-doc_size = v_lines_bin * 255 .
          i_objpack-body_num = v_lines_bin.
          i_objpack-doc_type = 'PDF'.
          i_objpack-obj_name = 'SOA Eail'.
          i_objpack-obj_descr = 'test'.
          APPEND i_objpack.
          CLEAR i_reclist.
          i_reclist-receiver =  <mail id>
          i_reclist-rec_type = 'U'.
          APPEND i_reclist.
          CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
            EXPORTING
              document_data              = wa_doc_chng
              put_in_outbox              = 'X'
              commit_work                = 'X'
            TABLES
              packing_list               = i_objpack
              object_header              = wa_objhead
              contents_bin               = i_objbin
              contents_txt               = i_objtxt
              receivers                  = i_reclist
            EXCEPTIONS
              too_many_receivers         = 1
              document_not_sent          = 2
              document_type_not_exist    = 3
              operation_no_authorization = 4
              parameter_error            = 5
              x_error                    = 6
              enqueue_error              = 7
              OTHERS                     = 8.
    thanks
    suresh

    u need to use this SO_NEW_DOCUMENT_ATT_SEND_API1
    check this code tutorial on how to add pdf file as an attachment
    u need to modify the code to read the pdf from directory then rest of code is same
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/mailsendthroughoutputcontrols
    кu03B1ятu03B9к
    Edited by: kartik tarla on Mar 9, 2009 7:31 PM

  • Getting an error while copying pdf file into RMS enabled document library using copyTo() method

    In SharePoint 2010, I am trying to copy pdf file programmatically from a non-RMS protected document library into RMS protected library using copyTo() method.
    But I am getting an error while doing so. it gives error as mentioned below -
    This library does not accept files of the given type. You must either upload a
    new, unprotected file that supports rights management or re-upload a document
    that was previously downloaded from this library.
    Please suggest some solution.
    Thanks,

    Are You sure that you have give 'PDF' in caps in your program? and check whether you are getting all the datas before calling the method.
    in my program, i have used like this and it is working fine for me,
    I am getting PDF content from the form...
    DATA  ls_formoutput     TYPE fpformoutput.
      DATA  pdf_content        TYPE solix_tab.
      DATA  lp_pdf_size        TYPE so_obj_len.
    DATA  lv_mail_title      TYPE so_obj_des.
    *Attach the PDF .
          lp_pdf_size = XSTRLEN( ls_formoutput-pdf ).
          pdf_content = cl_document_bcs=>xstring_to_solix(
              ip_xstring = ls_formoutput-pdf ).
          document->add_attachment(
            i_attachment_type     = 'PDF'
            i_att_content_hex     = pdf_content
            i_attachment_size     = lp_pdf_size
            i_attachment_subject  = lv_mail_title ) .

  • Error while opening PDF file created in SAP System

    Dear Friends,
    We have customized transaction through which a Inspection Lot gets generated with predeifned Inspection Characteristics data. User enters the reading in that Inspection Lot and SAVE. In another customized transaction, this Inspection Lots gets Released and when released, SAP System generates PDF file through this custmized program and send it to repspective Mangers through SAP Inbox for view. Before 07.10.2010, this was working correctly. On 08.10.2010, our Basis team has applied patches provided by SAP. Afte that the generated PDF file can not be open. Error message shows that this file is damaged OR corrupted.
    We wrote to SAP support but they advise to contact DAP Forum for the customized program, SAP supprt will not help.
    We need help to overcome this issue.
    Regards,
    Jayant Joshi - Bahrain

    Hi,
      Find out the FM that's generating the actual error through de-bug and analyze the same by looking in OSS and or SDN.
    Regards
    Narasimhan

  • Error while Generating PDF file from Datagridview .

    Hi every one,
         I'm trying to generate pdf file from datagridview,while executing my code getting nullvalue exception..
    Here is my code:
    private void btnexportPDF_Click(object sender, EventArgs e)
                //Creating iTextSharp Table from the DataTable data
                PdfPTable pdfTable = new PdfPTable(dataGridView1.ColumnCount);
                pdfTable.DefaultCell.Padding = 3;
                pdfTable.WidthPercentage = 30;
                pdfTable.HorizontalAlignment = Element.ALIGN_LEFT;
                pdfTable.DefaultCell.BorderWidth = 1;
                //Adding Header row
                foreach (DataGridViewColumn column in dataGridView1.Columns)
                    PdfPCell cell = new PdfPCell(new Phrase(column.HeaderText));
                    cell.BackgroundColor = new iTextSharp.text.BaseColor(240, 240, 240);
                    pdfTable.AddCell(cell);
                //Adding DataRow
                foreach (DataGridViewRow row in dataGridView1.Rows)
                    foreach (DataGridViewCell cell in row.Cells)
                        pdfTable.AddCell(cell.Value.ToString());//nullvalue exception
                //Exporting to PDF
                string folderPath = "C:\\PDFs\\";
                if (!Directory.Exists(folderPath))
                    Directory.CreateDirectory(folderPath);
                using (FileStream stream = new FileStream(folderPath + "DataGridViewExport.pdf", FileMode.Create))
                    Document pdfDoc = new Document(PageSize.A2, 10f, 10f, 10f, 0f);
                    PdfWriter.GetInstance(pdfDoc, stream);
                    pdfDoc.Open();
                    pdfDoc.Add(pdfTable);
                    pdfDoc.Close();
                    stream.Close();
    Thanks & Regards RAJENDRAN M

    Hi Rajendran,
    The second question is about the usage of iTextSharp library, which is not a MS product, please post in their forum for help:
    http://support.itextpdf.com/forum
    Thanks for your understanding.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Error while saving PDF file..

    Hi All,
    While i am trying to save pdf file from MDM to my local file(on my PC) it gives me error...
    <0xFFAAA002>,Version 5.5SP6(5.5.62.33)
    Does anyone knows what the issue wud be ..is there any version mismatch ..
    Please let me know if anyone has faced this issue..
    Regards
    Vikrant M Kelkar

    Hi Vikrant,
    I am also facing the same issue
    But there are two ways through which you can save the PDF file on your disk.
    1. Go to PDFs table, right click on the PDF record which you want to save and select the option Save Original to disk...Just click on save no need to select or write any extension.
    2. From the Record Detail pane right click on PDF and select View PDF. Now you can save the PDF by clicking on Save option available.
    Reward if useful
    Regards,
    Jitesh Talreja

  • Error to Send PDF file using mail

    Hi all,
    I create a report that send an mail with 2 different pdf attach.
    I have a problem because one pdf attach is 663 KB and when I read it in mail it can not open the file and give me this error  :
    "Error opening PDF file --> There was an error opening this document.the file is damaged and could not be repareid "
    I send the same mail with another PDF file (64,2 KB) and all it's work correct.
    This files are in my application server, and this is the code that I use to read and send :
    data:   gt_table TYPE TABLE OF solix,
               gs_table LIKE LINE OF gt_table.
    open dataset wa for input in binary mode.
    if sy-subrc eq 0.
      do.
        read dataset wa into gs_table LENGTH alen.
        ctr = ctr + alen.
        if sy-subrc ne 0.
          exit.
        endif.
        append gs_table to gt_table.
      enddo.
    endif.
    close dataset wa.
    TRY.
    (1) crea Oggetto
          l_send_request = cl_bcs=>create_persistent( ).
    (2) E-Mail - Crea Oggetto e Body del messaggio
    (5)  bcs attachment
    l_attachment_size = ctr."tab_lines * 255.
          CALL METHOD l_doc->add_attachment
            EXPORTING
              i_attachment_type    = 'PDF'
              i_attachment_subject = l_attachment_subj
              i_attachment_size    = l_attachment_size
              i_att_content_hex    = gt_table."xsolix[].
    CALL METHOD l_send_request->set_document( l_doc ).
          CALL METHOD l_send_request->set_priority
            EXPORTING
              i_priority = '1'.
          CALL METHOD l_send_request->set_send_immediately( 'X' ).
    I find this link but the problem are not resolve : Compress Smartform PDF file before sending mail
    Can anyone help me to understand where is the problem ?
    thanks a lot
    Barbara

    Hi,
    I find the way to resolve this topic, thanking a collegue.
    The problem is the way that I use to read the file.
    If I read the file in the following way, the problem concerning the size are bypassing.
    DATA : gs_table LIKE LINE OF gt_table.
      DATA: l_xstring TYPE xstring.
      DATA : alen TYPE i.
      OPEN DATASET  p_p_file FOR INPUT IN BINARY MODE.
      IF sy-subrc EQ 0.
       DO.
        READ DATASET p_p_file INTO l_xstring.
         p_bin_filesize = p_bin_filesize + alen.
         IF sy-subrc NE 0.
           EXIT.
         ENDIF.
         APPEND gs_table TO gt_table.
       ENDDO.
      ENDIF.
      CLOSE DATASET p_p_file.
      CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
          EXPORTING
            buffer                = l_xstring
        APPEND_TO_TABLE       = ' '
         IMPORTING
           output_length         = p_bin_filesize
          TABLES
            binary_tab            =  gt_table .
    thanks a lot
    barbara

  • Sending PDF File as Email not working

    Hi,
    We are not able to send email as pdf file  using submit by email button  but xml type is working

    The submit  by email is hardcoded to send an xml file (Note that by default Reader can only send the xml file). If  you want to send the PDF then you will have to drop a button object from the standard palette, set the Control Type to Submit, and on the Submit tab use the mailto protocol as the Submit To URL parameter. Just below that there is a Submit dropdown where you can pick PDF as your submission. Now if your users are using Reader you will have to Reader Extend the file before they can use your button.
    Hope that helps
    Paul

Maybe you are looking for