Problem sending pdf file

Hi all,
I need to send a sapscript via email.
I convert the spool in pdf.
If I try to download the internal table with pdf content I'm able to create correctly the pdf file on my pc.
Insted, if  I send the contet of internal table with the pdf data via email, an error occured when I try to open the attached pdf file.
regards
enzo

Hi,
This below code may help you in case:
  DATA WA_OBJBIN LIKE SOLISTI1.
  DESCRIBE TABLE OBJTXT LINES PDFLINES.
*-- A funtion module to convert otf to pdf format
  CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
    EXPORTING
      FORMAT_SRC            = 'OTF'
      FORMAT_DST            = 'PDF'
      DEVTYPE               = 'PRINTER'
    FUNCPARA              =
      LEN_IN                = PDFLINES
   IMPORTING
     LEN_OUT                = PDFLINES
    TABLES
      CONTENT_IN            = OBJTXT
      CONTENT_OUT           = OBJBIN
   EXCEPTIONS
     ERR_CONV_FAILED       = 1
     OTHERS                = 2
  IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  DESCRIBE TABLE OBJBIN LINES PDFLINES.
  DESCRIBE TABLE OBJTXT LINES TAB_LINES.
*-- a perform to do the email
*--   creation of the entry for the compressed document
  CLEAR OBJPACK-TRANSF_BIN.
  OBJPACK-HEAD_START = 1.
  OBJPACK-HEAD_NUM = 0.
  OBJPACK-BODY_START = 1.
  OBJPACK-BODY_NUM = TAB_LINES.
  OBJPACK-DOC_TYPE = 'RAW'.
  OBJPACK-DOC_SIZE = TAB_LINES * 255.
  APPEND OBJPACK.
*-- creation of the entry for the attachment
  CLEAR OBJPACK.
  OBJPACK-TRANSF_BIN = 'X'.
  OBJPACK-HEAD_START = 1.
  OBJPACK-HEAD_NUM = 0.
  OBJPACK-BODY_START = 1.
  OBJPACK-BODY_NUM = PDFLINES.
     objpack-objname =
  OBJPACK-OBJ_DESCR = '%PDF-FILE.PDF'.
  OBJPACK-DOC_TYPE = 'PDF'.
  OBJPACK-DOC_SIZE = PDFLINES * 255.
  APPEND OBJPACK.
*-- populating the t_receivers with mail address
READ TABLE t_adr6 INDEX 1.
  IF NOT T_ADR6[] IS INITIAL.
    LOOP AT T_ADR6.
      T_RECEIVERS-RECEIVER = T_ADR6-SMTP_ADDR.
      T_RECEIVERS-REC_TYPE = 'U'.
      APPEND T_RECEIVERS.
      CLEAR T_RECEIVERS.
    ENDLOOP.
  ENDIF.
*-- Calling a function module to send an E-mail
  CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
      DOCUMENT_DATA                    = DOC_DATA
       PUT_IN_OUTBOX                    = 'X'
    IMPORTING
      SENT_TO_ALL                      =
      NEW_OBJECT_ID                    =
    TABLES
      PACKING_LIST                     = OBJPACK
     OBJECT_HEADER                     = OBJHEAD
     CONTENTS_BIN                      = OBJBIN
     CONTENTS_TXT                      = OBJTXT
    contents_hex                      = objbin
      OBJECT_PARA                      =
      OBJECT_PARB                      =
        RECEIVERS                        = T_RECEIVERS
   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
  It may help you.
  try to rectify the mistake that you have in your program by checking this sample code....

Similar Messages

  • Problem sending pdf files to convert to Word format

    When I try to send a pdf file to be converted to Word format, I keep getting error message.  "Unable to send"  What's the problem?

    Are you using the ExportPDF service?  How do you "send"?
    [topic moved to Acrobat.com Services forum]

  • Problem sending pdf file on Windows mail

    I get the error message "There is a problem sending messages from [email protected] right now.  Contact your provider for more information" (both on aol.com and gmail.com) each time I send an e-mail with a pdf attachment.  I have the Adobe Reader XI and using Windows 8.1. 

    I get the error message "There is a problem sending messages from [email protected] right now.  Contact your provider for more information" (both on aol.com and gmail.com) each time I send an e-mail with a pdf attachment.  I have the Adobe Reader XI and using Windows 8.1. 

  • Problem to send PDF file

    Hello,
    I try to send pdf file as attachments file to mail with XI.
    I use with this blog
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6d967fbc-0a01-0010-4fb4-91c6d38c5816
    My problems is:
    1. to all mails that I send have another e file Untiteld.doc, how I can avoid this file?
    2. When I received the pdf file I not succeed to open it I received the message:
    Adobe reader could not open 'elad.pdf' because it is either not supported
    File type or because the file has been damaged (for example, it was sent as an
    Email attachment and wasn't correctly decoded)
    Regards
    Elad Peleg

    hi
    ref this
    Receiver Mail Adapter message with PDF attachment
    PDF attachment in mail adapter
    File adapter with attachment to mail
    File with attachment to mail scenario
    File To Mail Scenario With An Attachment

  • I have an iPad 2, and I am sending PDF file to my iPad, via a Hotmail email. But, the PDF arrives to the iPad in Mail already opended, as a picture on the bottom of the email. Is there a way to prevent it from auto open, so I can open with iBooks instead?

    I have an iPad 2, and I am sending PDF files to my iPad, via a Hotmail account. But, the PDF arrives to the iPad Mail account already opened at the bottom of the email. Is there a way to prevent this auto-opening of the PDF. I've seen screen shots with the box, and PDF listed inside the box, but mine open automatically. I want to get them into iBooks...?

    I am having the same problem and it is even bigger.
    When opening a 1-page PDF in iBooks and sending it via mail it is sent inline as preview, but the recipient cannot open the file anymore. Also on iPad and iPhone there is no "open in" possible.
    Somehow the mail app does destroy the file. What is going wrong?

  • Not able to send pdf file as attachment in my apple mail.

    Hi, I was easily able to attach pdf files to my apple mail.  infact I could just open a pdf file and then send it as attachment in the email earlier. but after downloading and upgrading to os X Mountain lion, I am neither being able to attach and send pdf files in my apple mail, nor can I send PDF file as an attachment.
    Is there any issue with OS X Mountain Lion.
    Issue 1.  I compose Email , then click attach > Browse > select pdf file > click attach > it shows in my Email body either as an icon or as first page of the pdf document > I send it. >>> But when the receipient opens the Email, that pdf attachment is missing. In fact When I put a cc to my self and I open the Email, the attachment is mssing in the incoming E amil.
    Issue 2. I open the PDF document > Click on File > send as attachment in E-Mail > on right, a menu appears where I select the File and click attach> I get a message
    The SendMail doesnot know how to talk to your default mail client. Please select a different mail application to use. Attaching a screen shot.
    I never had these issues earlier with my Lion OS . but since the time I have upgraded to mountain Lion OS, I am having these issues.
    Are these the Mountain Lion issues, how to fix these please.

    I believe, the software team forgot to put a button for send or share as an attachment to preview.

  • How to Sender PDF file as attachment in Payload?

    Hi Experts,
         After I done some of PI scenarios, I'm stuck with one of my requirement... In requirement, "Web service" will send request to "SAP ECC 6" in order to get PO document print out in PDF file by call smartform or any form printing as usual.
         In my understand, I'm using SOAP adapter as sender and RFC adapter in receiver side, in  RFC function, I will call form and generate PDF file by using normal ABAP function, but here, how can I send PDF file as response message of SYNC call from web service.
         I try to search and read some of document and blog, some said I can attach file as Payload attachment, but no clear solution or guide to do so.
        Here is example blog that I found, I really useful
           /people/michal.krawczyk2/blog/2006/04/19/xi-rfc-or-abap-proxy-abap-proxies-with-attachments
        Please suggest me in my case,
    Thanks in advance...
    Cheers,
    Terry

    Hi,
    >>In my understand, I'm using SOAP adapter as sender and RFC adapter in receiver side, in RFC function, I will call form and generate PDF file by using normal ABAP function, but here, how can I send PDF file as response message of SYNC call from web service.
    as per my blog you can attach PDF to a message only if you use abap proxy on ECC and not RFC
    the code is just copy and paste from my blog:
    /people/michal.krawczyk2/blog/2006/04/19/xi-rfc-or-abap-proxy-abap-proxies-with-attachments
    so there is nothing spectacular there
    Regards,
    Michal Krawczyk

  • .pdf file changed into .tmp when trying to send pdf file as attachment

    Dears,
    A few days now, .pdf files are exported as .tmp files if we try to send them as attachment directly from the adobe reader plug-in in internet explorer 8.
    Unfortunatly Outlook interprets .tmp files as harmfull, so we are no longer able to send pdf files directly.
    (screenshot in attachment)
    Is there any chance we can configure this so, pdf files are exported as .pdf instead of .tmp
    More details:
    OS               : Win XP SP3
    browser        : ie 8
    plug in          : Adobe PDF Link Helper (not sure this is the one that provides us the pdf reader functionallity dough)

    I cannot reproduce that (Adobe Reader 11.0.3, IE8, Win XP-SP3).  In fact, I cannot even see the Attach to Email option, but the file name is correct.

  • Since I downloaded Adobe Reader 11.0.07 I have been totally unable to print any PDF files using my Dell 1720 laser printer - I just get a blinking "error" light on the printer, no other error messages . I never had a problem printing PDF files before down

    Since I downloaded Adobe Reader 11.0.07 I have been totally unable to print any PDF files using my Dell 1720 laser printer - I just get a blinking "error" light on the printer, no other error messages . I never had a problem printing PDF files before downloading the new Reader version. Suggestions? Thank you.

    Hi,
    Which version of Adobe Reader were you using earlier when printing using Dell printed was working fine?
    Thanks,
    Shakti K

  • I am having a problem where pdf files on the web (i.e., links in a Word doc) open after an extended time and only as gobbldygook ( a file containing a series of characters and letters that make no sense).  This also happens for another Mac user coworker

    Hi There:  I am having a problem where pdf files on the web (i.e., links in a Word doc) open after an extended time and only as gobbldygook ( a file containing a series of characters and letters that make no sense).  This also happens for another Mac user coworker in my office, while the PCs don't have this problem...  Any help/suggestions for a fix would be most appreciated! 

    Just adding more info - MacBookPro running 10.5.8 and using Safari as the browser.  The problem comes and goes - sometimes the linked Word files will open OK, n others its just a strring of crazy characters... 

  • Unable to send or create a link to send pdf file since update to Yosemite.

    Unable to send or create a link to send pdf file since update to Yosemite.

    Hi Donald S Matheson,
    Are you still facing this issue?
    May i know which application or service you are using. Can be more precise and provide me the steps to check the behavior at my end.
    Regards,
    Ajlan Huda.

  • HT5678 I have problems saving pdf files in the web when I use Safari. I don't have this problem with firefox

    I have problems saving pdf files in the web when I use Safari.  I don't have this problem with firefox.

    do they save ok if Safari - Preferences - Security - Allow all other plug-ins is unchecked ?
    If so, likely an adobe or other pdf plugin
    Re-check the setting above & quit any browsers,
    Look in this folder by triple-clicking the line below, then ctrl-clicking it & choosing Services - Open
    /Library/Internet Plug-Ins/
    remove anything with pdf in the filename & test again
    Sometimes, plug-ins can be in the User Library folder :
    ~/Library/Internet Plug-Ins/

  • Problem opening PDF files for Adobe Reader

    Problem opening PDF files for Adobe Reader.
    I installed the latest adobe reader for my Mac. Everything is set up. Every time i go to open a pdf file, this shows up...
    "Before viewing PDF documents in this browser you must launch adobe reader and accept the End User Licence Agreement, then quit and relaunch the browser."
    I installed it through the adobe reader website for free. And even though it says 'by clicking "install now" you are agreeing to accept the user licence agreement terms and conditions' it still says i need to accept the T&C's.
    I've tried uninstalling and reinstalling it and same thing over and over again.
    Can someone help!?!?!
    Please contact me via email direct ASAP at....
    [email protected]
    Thank you
    Message was edited by: nick khzouz

    Adobe Reader PDF problems wrote:
    "Before viewing PDF documents in this browser you must launch adobe reader and accept the End User Licence Agreement, then quit and relaunch the browser."
    Did you actually try doing what the message suggests?  Open Adobe Reader and accept the EULA?

  • Problem store pdf file after downlod , message memery or store to little, the harddrive hav 1,3TB ;-

    problem store pdf file after download from web. Message, store to littel from reader11. Where ist tht problem or the solution?
    thanks

    Dear Mr Willener
    Thanks for the mail, that problem is soluted, press the botton, store as copy.I found it in secound  read
    A wish: In reader 9 is the solution better.
    Regards from Ilmenau
    L.Gleichmann
    [signature and auto-quote removed by host]

  • I am having problems creating PDF file and downloading them

    I am having problems creating PDF file and downloading them

    Hi Randy Keil,
    You might need to sign up with your Adobe ID and password at "https://cloud.acrobat.com/convertpdf"
    Then you can choose the desired files to create the PDF.
    Now, let me know what error message do you get while doing the same.
    What kind of files are you trying to convert to PDF?
    Have you checked with your internet connection and tried using a different browser?
    Hope to get your response.
    Regards,
    Anubha

Maybe you are looking for