Problem with pdf as email attachment

Hi All,
when i am opening the pdf file(email attachment), getting the error  "file type not support or content conversion....."
the peice of code is as followed...
IF p_email = 'X'.
    CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
      EXPORTING
        rqident = mi_rqident   (spool number)
      TABLES
        buffer  = l_contents.  
    IF l_contents IS NOT INITIAL.
      CALL FUNCTION 'SO_SOLITAB_TO_SOLIXTAB'
        EXPORTING
          ip_solitab  = l_contents
        IMPORTING
          ep_solixtab = contents_hex.
Create the send request
      TRY.
          l_send_request = cl_bcs=>create_persistent( ).
Create the main document
          l_doc = cl_document_bcs=>create_document(
                 i_type = 'RAW'
                 i_text = l_text
                 i_subject = p_sub ).
Add attachment to document
          l_doc->add_attachment( i_attachment_type = 'PDF'
                                 i_attachment_subject = p_doc
                              i_att_content_text = contents_text ).
                               i_att_content_hex = contents_hex ).
Add document to send request
          l_send_request->set_document( l_doc ).
Add recipients to send request
          l_recipient = cl_cam_address_bcs=>create_internet_address(
                       p_email1-low ).
          l_send_request->add_recipient( i_recipient = l_recipient ).
Send email
          l_sent_all = l_send_request->send( ).
and other way also i tried, please let me know the solution.
thanks in advance

try this code ..
For mailing(converting data to char 255)
    IF ch2 EQ 'X'.
      DATA sub TYPE string.
      CALL FUNCTION 'QCE1_CONVERT'
        TABLES
          t_source_tab         = i_tline
          t_target_tab         = so_ali[]
        EXCEPTIONS
          convert_not_possible = 1
          OTHERS               = 2.
Mail Contents
      refresh objtxt[].
      objtxt = space.
      APPEND objtxt.
      objtxt = 'Dear Sir/Madam,'.
      APPEND objtxt.
      objtxt = space.
      APPEND objtxt.
      CLEAR : sub.
      CONCATENATE 'Sub: Dispatch Details - Invoice Number :' invno '.' INTO sub SEPARATED BY space.
      objtxt = sub.
      APPEND objtxt.
      objtxt = space.
      APPEND objtxt.
      objtxt = 'We have dispatched the subject consignment from our factory, and'.
      APPEND objtxt.
      objtxt = 'enclose the Invoice(pdf file) for your kind reference.'.
      APPEND objtxt.
      objtxt = space.
      APPEND objtxt.
      objtxt = space.
      APPEND objtxt.
      objtxt = 'Note: Please cover insurance on all risks in case INCO TERMS as "EXW, FCA, FOB, CFR"'.
      APPEND objtxt.
      objtxt = 'in the subject consignment.'.
      APPEND objtxt.
      objtxt = space.
      APPEND objtxt.
      objtxt = space.
      APPEND objtxt.
      objtxt = 'For Delivery Management - International,'.
      APPEND objtxt.
      objtxt = 'Pricol Limited,'.
      APPEND objtxt.
      objtxt = 'Coimbatore. India.'.
      APPEND objtxt.
      objtxt = space.
      APPEND objtxt.
      objtxt = space.
      APPEND objtxt.
Determining the Email Ids of Mail Receivers
      PERFORM fetch_mailids.
      objtxt = 'Copy to :'.
      APPEND objtxt.
      LOOP AT reclist.
        objtxt = reclist-receiver.
        APPEND objtxt.
      ENDLOOP.
      objtxt = space.
      APPEND objtxt.
      objtxt = '<This is system generated message>.'.
      APPEND objtxt.
      objtxt = space.
      APPEND objtxt.
Mail Body of message over.
      DESCRIBE TABLE objtxt[] LINES v_lines_txt.
      CONCATENATE 'Inv.' invno INTO sub SEPARATED BY space.
      doc_chng-obj_name = sub.
      doc_chng-expiry_dat = sy-datum + 10.
Mail Subject
      refresh objpack[].
      CONCATENATE 'Pricol Dispatch - Invoice' invno '- Reg.' INTO sub SEPARATED BY space.
      doc_chng-obj_descr = sub.
      doc_chng-sensitivty = 'F'.
      doc_chng-doc_size = v_lines_txt * 255.
      objpack-transf_bin = ' '.
      objpack-head_start = 1.
      objpack-head_num = 0.
      objpack-body_start = 1.
      objpack-body_num = v_lines_txt.
      objpack-doc_type = 'RAW'.
      APPEND objpack.
*PDF Attachment
      DESCRIBE TABLE so_ali[] LINES lineno.
      objpack-transf_bin = 'X'.
      objpack-head_start = 1.
      objpack-head_num = 1.
      objpack-body_start = 1.
      objpack-doc_size = lineno * 255 .
      objpack-body_num = lineno.
      objpack-doc_type = 'PDF'.
      objpack-obj_name = 'INVOICE'.
      objpack-obj_descr = 'Invoice'.
      objpack-obj_langu = 'E'.
      APPEND objpack.
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
      EXPORTING
      document_data = doc_chng
      put_in_outbox = 'X'
      commit_work = 'X'
      TABLES
      packing_list = objpack
      contents_txt = objtxt[]
      contents_bin = so_ali[]
*contents_hex = so_ali[]
      receivers = 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.
      IF sy-subrc = 0.
        PERFORM mail.
        MESSAGE 'Mail sent successfully' TYPE 'S'.
*SUBMIT RSCONN01 WITH MODE = MODE.
      ENDIF.
    ENDIF.
  ENDLOOP.

Similar Messages

  • FILE- EMAIL with pdf as an attachment and message body.

    I have a scenario where FILE to EMAIL with PDF as an attachment; I also need to send to have Email body with some text. For this i have tried using Mail Package then i wont be receiving any attachment. If I use both Mail package + Keep attachments i do not see any attachments in mail.
    Let me know  the possible ways that can used in the current scenario where i need to send pdf attachment along with messsage body.
    Thanks in advance,
    nik

    Hi Nik
    To get the customized email body you need to use the Mail package. Keep attachments tab should be selected
    Now sending PDF attachment - Do you need to send data passed by File adapter as pdf attachment or File adapter is reading message other than this attachment.
    Case 1. File adapter send message that you need to send as email attachment. Then using mail package use
    <content_type>application/pdf</content_type>
    you can even add name of the file going as an attachment.
    <content_type>application/pdf;name="filename.pdf"</content_type>
    Secondly you can use the MessageTransformBean at communication channel as an additional standard module.
    Case2: You need to pick file from file adapter as attachment. that is possible only when you use NFS with this file you read as source and attachment has be of same name type eg: you read input.txt then attachment has to be input.pdf
    Thanks
    Gaurav
    Edited by: Gaurav Bhargava on Oct 7, 2008 5:46 AM

  • Anyone experiencing problems with pdfs with Mountain Lion?

    When I try to open pdfs downloaded from the internet via Safari to the Mountain Lion desktop I get this message:
    "There was an error opening this document. The file is damaged and could not be repaired."
    I have encountered this problem with pdfs downloaded from several sources.
    When I open pdfs received in email messages there is no probem.
    Can anyone advise please?

    I had been having a similar problem on Lion with Safari pdf files despite downloading the latest Adobe Reader XI.
    I would constantly get the same messages - There was an error opening this document. The file is damaged and could not be repaired. And I would get a blank page when I tried to print the pdf if I tried printing from the Safari web page using File - Print from the top toolbar on my laptop.
    Then I came across the grey Safari lozenge with action icons.
    This allowed me, without downloading the pdf, to print the pdf file direct from the Safari page by using the Print icon on the grey lozenge that appears centrally three quarters down the screen.
    Then I discovered that if I save the pdf using the Save icon from this same grey lozenge on the Safari page I can open and print this pdf version from my desktop.
    I've tested it with a couple of different pdf files and these methods work using the grey lozenge icons but the same pdfs files don't work using File - Save As on the Tool Bar.

  • Problem with links on email templates

    Problem with links on email templates
    Hi,
    We have been having issues with links on our email templates. Some of the links point to the following URL:
    http://server'sname/thirdparty/FCKeditor/editor/fckeditor.html?InstanceName=emailTemplatesDTO.htmlBody&Toolbar=NewscaleFCKEditorToolBar#URL
    Sometimes we get “Unknown internal error” on the web page.
    Can anyone help or advise on how to resolve this issue?
    Many thanks,
    Wesley.

    Hi Wesley,
    This is rather late, but we've seen the same thing frequently (and I believe can replicate it).  It's caused when you a creating a new email by copying the content of an existing one with a name space in it.
    Upon copying, the link gets scrambled.  The approach we use is to copy the email in to a new template, then strip out all of the URL links and add them back in.
    Thanks!
    Ant

  • Problem with PDF extract in a report

    Hi guys,
    We are facing a peculiar problem with PDF extract in a report. When we run a report and export PDF , all the records in the result set are populated in the PDF. however, if I navigate away from the report and return back to the same report, and click on export pdf (with the result set already populated) i get a blank PDF document without any records. If i run the report again and then export the PDF it works fine.
    Export excel works fine for all cases.
    I am assuming it has got something to do with the way the system handles the cache for PDF export.
    I also found that this occurs only when we have a value list filter with "none" set as default,and in this case, initially on opening  the report for the first time the query does not get executed automatically.
    Any help on this would be highly appreciated.
    Thanks and Regards,
    immanuel

    Hi Immanuel,
    Have you tried clearing the cache? My guess is, it is probably a defect.
    Regards,
    Vikram

  • Printing Problems with PDF - Adobe Acrobat

    Printer - HP Deskjet 3070A
    Laptop - Asus Zenbook running Windows 7 Home Premium
    Issue: Printing problems with PDF (Adobe Acrobat Reader)
    Dear All,
    Please help!
    My printer was working absolutely perfectly until my brother in law recently needed to borrow my printer. He plugged in his laptop running Windows 8 (awful thing that is). Since he did this to print his own PDF, I cannot print mine.
    Although all the text will appear on the page perfectly both in the document view and on actual printing, it appears that some of the transparent formatting stuff on a PDF - such as boxes you have to fill in and transparent areas (such as you find on glorious tax forms) are omitted completely. In fact, in their place I was getting a single black dot. Now, after uninstalling and re-installing updates for the printer, windows 7, adobe acrobat reader, etc.etc. I get squat. Just all the text laid out but none of the shading or boxes.
    I have tried fiddling with the printer settings; the  print as 'photo' option, dpi settings, greyscale - as much as I can think of and I am thoroughly stumped.
    In a desperate attempt, I even installed the Universal Printer Drivers - thinking it might have been that. No. All I got was a page of gobbledygook. Consequently, I uninstalled and reinstalled the normal drivers again.
    If there are any wonderful people out there with any fabulous ideas about how I can get my shading and boxes back; I'd  very much appreciate it. Sadly I have a tax return to fill out (which is already fabulously late) and need my printer to work!
    Much appreciation in advance x

    Hey there @Reverie!
    Thanks for posting on the HP Forums!
    I can see that the printer is no longer printing in the correct format after it was plugged into the Windows 8 computer!  You mentioned you have run the updates and uninstalled/re-installed the printer software.  Have you uninstalled and re-installed the Adobe software? Are you getting the same issue from other programs as well? Are you getting the same issues if you are logged in as a different user on the computer? 
    I have located the HP Update Software Utility that may be able to help.  You can download an run the utility.  It may be able to locate any other updates for the printer.
    I would also recommend running a disk cleanup on the computer to clear any temporary files and junk files that may be causing some performance or software issues. If you do not know how to run a disk cleanup on the computer please follow this document regarding Delete files using Disk Cleanup.  It is recommended to restart the computer after a disk cleanup. After the restart try the print job again!
    Let me know if that helped and thanks again for posting on the HP Forums!
    Cbert
    I work on behalf of HP.
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" at the bottom of this post to say “Thanks” for helping!

  • HT5622 Due to problems with my original email I changed my apple id email and password months ago.  Suddenly it is reverting to my old email.  How do I get it to totally forget the original? I have iPhone, iPad and MacBook Pro.

    Due to problems with my original email I changed my apple id email and password months ago.  Suddenly it is reverting to my old email.  How do I get it to totally forget the original? I have iPhone, iPad and MacBook Pro.

    Hey 1Jerry,
    Thanks for the question. You'll want to delete and re-add your iCloud account (utilizing the new Apple ID address). When prompted, opt to keep as much information on your device as possible. The following article provides information on how to do so:
    iCloud: Change iCloud feature settings
    http://support.apple.com/kb/PH2613
    Turn off iCloud completely
    Depending on whether you want to stop using iCloud on all or only some devices, do one or more of the following:
    On your iOS device’s Home screen, tap Settings > iCloud, then at the bottom of the screen, tap Delete Account.
    Thanks,
    Matt M.

  • Problems with my yahoo email account using Firefox

    I am using Firefox 14.0.1 and I have problems with my yahoo email account. I send an email, the receiver got a good version of my email, but when I see the same email into my sent box I see a differente text. When I use any other Internet browser, I can see a good version of my original email into the sent box.
    Why???

    Hi,
    Please try a '''Ctrl + F5''' refresh. This helps to bring in the page contents afresh. You can also consider the [https://support.mozilla.org/en-US/kb/reset-firefox-easily-fix-most-problems Reset Firefox] feature via '''Help''' ('''Alt''' + '''H''') > '''Troubleshooting Information'''.
    (To revert to the previous profile, close the new profile, start Firefox and choose the '''*.default''' profile. While the [https://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles Profile Manager] is open, you can also delete the newly reset profile (the one containing random numbers)).
    [https://support.mozilla.org/en-US/kb/Managing-profiles Managing profiles]
    [https://support.mozilla.org/en-US/kb/Profiles?s=profile&r=2&e=sph&as=s Profiles Howto]
    If you have security software (antivirus, firewall etc.) installed, you can try deleting all existing instances of Firefox and related files in all the different configuration areas/modules of the security software. Instead create new allow/trusted rules for Firefox + its related processes. Even otherwise the security software may also ask again when Firefox is started and you can try to allow/trust at that time. Please see [https://support.mozilla.org/en-US/kb/Firewalls this].
    [http://kb.mozillazine.org/Firewalls AV/Firewalls Configuration]

  • We have a mac laptop and dont have any problems with pdf files but our imac will not open them.  any suggestions

    we have a mac laptop and dont have any problems with pdf files but our imac will not open them.  any suggestions?

    Back up all data.
    In the Finder, select Go ▹ Go to Folder from the menu bar, or press the key combination shift-command-G. Copy the line of text below into the box that opens, and press return:
    /Library/Internet Plug-ins
    From the folder that opens, remove any items that have the letters “PDF” in the name. You may be prompted for your login password. Then quit and relaunch Safari, and test.
    If you still have the issue, repeat with this line:
    ~/Library/Internet Plug-ins
    If you don’t like the results of this procedure, restore the items from the backup you made before you started. Relaunch Safari again.

  • Times Font Problems With PDFs

    Hello,
    I am having an intermittent problem with PDFs with Times fonts.
    Sometimes the PDFs print OK and other times words will be jumbled together or strange characters will take the place of certain punctuation marks. There are several other things that seem to happen, but I cannot remember every issue. Every time there is a problem, the PDF "Looks good on the monitor!".
    This happens on 10.3.9 and Os9 machines also.
    I have done Permission Repairs on a regular basis, cleaned my Font Caches, used FontFinagler etc.
    I have run Norton on the Os9 machines, taken all fonts out of ATM and put them back in, trashed Adobe prefs, etc.
    Sometimes this happens on PDFs from PCs, other times it happens on PDFs from Macs.
    All of the versions of Acrobat we are using are Professional versions with the latest updates, so that shouldn't be the issue.
    If anyone has any input on this, it will make my life considerably easier.
    TIA,
    David

    David,
    It sounds like the problem PDF docs did not have the fonts embedded into the docs when they were created originally, and the Times font on your computer is different. A couple of possible options, (a) ask the original creator to re-make the PDF doc with embedding the fonts, or (b) try re-writing the doc by doing a Save As... in Acrobat.
    Hope this helps.

  • I have a problem with a few emails i wrote which were in the outbox. The outbox disappeared all of a sudden with my mails... However they were not sent since the email address was not correct (just 3 initials). Is there a way to get it back somewhere?

    Hello,
    I have a problem with a few emails i wrote which were in the outbox. The outbox disappeared all of a sudden with my mails... However they were not sent since the email address was not correct (just 3 initials). I was waiting to find out the correct email address of that person, put in in and then sen it...Is there a way to get it back somewhere on the ipad or in some cached folder?
    Many thanks for an answe to this.
    Swisslady2

    There is no cache where the emails would be stored on the iPad, but you could try quitting the mail app and then launch it again and see if the emails return.
    Go to the home screen first by tapping the home button. Quit/close open apps by double tapping the home button and the task bar will appear with all of you recent/open apps displayed at the bottom. Tap and hold down on any app icon until it begins to wiggle. Tap the minus sign in the upper left corner to close the apps. Tap the home button. Then try mail again.

  • How to correct checkout form "there is a problem with the PayPal email address supplied"

    PayPal Pro submissions do not go through. The error message reads "We cannot process this transaction because there is a problem with the PayPal email address supplied by the seller."
    I called PayPal. They checked and said my checkout form was not sending my email address to them. Any help on getting this to work will be sincerly appreciated. Thank you.

    - If you want to replace the headphone jack yourself see:
    iPod Touch Repair - iFixit
    - Apple will only exchange your iPod for a refurbished one for this price, You get a new battery.  However, it may not be worth it for a 2G iPod.
    Apple - Support - iPod - Repair pricing- A third-party place like this one is less expensive. Google from more places.
    iPhone Repair, Service & Parts: iPod Touch, iPad, MacBook Pro Screens

  • CUPS problems with PDF printing

    I am having all manner of problems with PDF printing.  Recently added a Lexmark MX710 and have 7 machines that were previously printing fine to an X652de a T652 as well as a Samsung CLP770.  All network printers.
    Now there are bizarre issues with PDF printing. CUPS version 1.6.1.  The MX710 will blue screen and reboot when printing one specific pdf without fail.  There are all kinds of random nonsensical results when printing from different locations.  A pdf that stalls the X and T652 with "filter error" will print from my own machine to the same printer, using the same versions of cups, .ppd file, and everything package related to cups.
    Yet other PDF files will print, while some print complete gibberish, I can't find any rhyme or reason or anything predictable about any of it other than to say printing postscript files works fine all around.
    This has been universally in KDE printing through Okular.
    I've tried some things I've found suggested, such as modifying the mime.conv as suggested by an old ubuntu thread, adding the a2ps package, all to zero effect.
    Last edited by TheWretched (2012-12-08 00:27:41)

    At this point the only reasonable explanation I can think of is that the ppd package I downloaded and installed via included shell script from lexmark for the mx710 caused this whole catastrophe.  The only common thread for this problem starting was that I used this on all of the affected machines and they now all manifest problems.  And on four of these machines this is literally all that was done, they were loaded in september, have not been updated via pacman in any way, and are running the exact same version of cups poppler, and okular that they were then, which was working, and now cannot print pdf to any printer at all without causing one of several problems depending on the printer.
    I cannot seem to get this reversed though.  I've gone so far as to force remove all the cups packages, and delete the files associated with the install script, but the problem remains afterward.  From what I can see so far all this lexmark package did was display a license agreement, then copy the ppd files in it's folder to /usr/share/ppd/Lexmark.  This particular printer, the mx710 has no .ppd available that I have found other than this one from Lexmark directly.  Open printing doesn't have anything for this model.
    This printer's driver has some kind of a cups filter driver with it that the install script presumably installs, I suspect this could be what caused the problem specifically, but I must not be removing it correctly, despite following the file removal suggestions in the Lexmark readme for uninstallation.  CUPS printing is something I am new to and only have a basic understanding of.
    To answer some specific questions I nearly forgot, I don't have cups pdf installed.  I have chrome installed which can successfully save pages to PDF, previously it could also print pdf, and presumably it prints everything as pdf given the cups pdf workflow.  That is also broken now too, so printing from the browser causes the printer to fail as well.  If I save as pdf from chrome, and print with adobe reader, it works.
    Last edited by TheWretched (2012-12-11 14:25:40)

  • I continue to have problems with links in email, they don't  Work.

    I continue to have problems with links in email, they don't work. When I called apple support she said to hard boot by holding off and home keys and restart. However this is only since the new release of the operating system,  it happens ever day and it's getting OLD.. Any solutions?

    Yes, almost daily since the iOS update. Is there a permanent solution. And does the hard reboot hurt the iPad?

  • I just started using my iphone 5s. I have a problem with new incoming emails from my POP account. Why are they marked as read automatically even though I have not even opened them yet.

    I just started using my iphone 5s. I have a problem with new incoming emails from my POP account. Why are they marked as read automatically even though I have not even opened them yet.
    At first I thought it might be because I was using simultaneously my old iPhone 4S so it somehow realized the emails where being pushed to another device and the it marked as read, this has nothing to do since I have deleted the email account from the iPhone 4S

    Contact the email provider for assistance with their service.

Maybe you are looking for

  • My YouTube was deleted, how do I get it back?

    My YouTube was somehow deleted by my grandson and I cannot seem to find it.  How do I get it back, or do I need to reinstall.  How do I do that?

  • 10.6.8 won't boot after Software Update

    I've installed 10.6.8 via Software Update and the Macbook Pro will not boot, causes a kernel panic.  It will boot in Safe Boot however.  I've tried installing the combo update as well, no change.  Verify disk permissions, no change.  Help! panic(cpu

  • Dynamic Click Tracking Without clickTag

    I've got an unusual circumstance where I'm not loading my flash file from within a webpage. Normally I use getURL() with clickTag to set my destination URL and tracking URL in the html, but in this case I am setting all of my variables using SetVaria

  • Speed improvements in JDeveloper 3.0

    Will the overall response time/speed improve in JDeveloper 3.0? Thanks Mike null

  • I need to ask YOU, Adobe, for a huge favour.

    Dear Adobe, I would like to ask you; as the title suggests, a huge favour that will save me from loads of stress. So here is the story, I downloaded the Macromedia Flash MX version (yes, the ancient one, that they use for computer programming courses