Email document distribution PDF attachment conversion error

I have configured document distribution via emai with an attachment. My DMS documents have a single PDF original attachment.
The email transmits fine through SAPConnect, however when I open the attachment Adobe tells me the file cannot be opened, and is corrupt.
The issue seems to be in SAPConnect conversion, converting BIN to PDF. Any suggestions on the conversion function module or sample code for a fm to do the conversion are appreciated.

Hi,
regarding the information with the BIN extension I would kindly ask you
to implement the SAP note 873597.                                                                               
Further please check the following settings which helped to solve      
such issue in the past successfully:                                                                               
1. Go to transaction : FILE                                            
2. Select DOCUMENT_DISTRIBUTION                                        
3. Double click on "Syntax group definition"                           
4. You will find the file length defined for "WINDOWS NT               
5. Change the length value to 70.                                      
6. Also for As/400 change the length to 40.                                                                               
Best regards,
Christoph

Similar Messages

  • Please help, I'm unable to send an email with a pdf attachment

    We have Windows 8 Pro on the pc, I have been trying to send a pdf document that my husband needs to his work and no matter how I try to send it (either from reader or directly from my email with the attachment it just will not send.  Can anyone please help?

    No worries.  But it is strange that you cannot even send email with a PDF attachment from Microsoft Mail.  At this point, no PDF viewers (e.g. Microsoft Reader, Adobe Reader Touch) are involved because you are not viewing PDF files.
    Instead of saying "It won't send", you need to describe exactly what you see on the screen for every step. Where does the problem start? 
    Step 1: Attaching a PDF file to new email in Microsoft Mail
    Are you able to find the PDF file and attach it to new email?
    Step 2: Sending email with a PDF attachment
    What happens when you click the Send button?  Does it hang forever?  Does it show an error message? Could you confirm that you can send email with other type of attachments (e.g. text file, Word file) from Microsoft Mail from the same PC?
    You can provide the details to Microsoft for troubleshooting.
    Alternatively, you can try to send email with the PDF attachment from other accounts like Gmail (Google Mail) or Yahoo Mail via the web browser (Internet Explorer) interface.
    Sometimes, rebooting your system solves "mysterious" problems, too.
    Good luck!

  • FM to send an email with a PDF attachment

    Hello All,
        Please suggest me some FMs to send an email along with PDF attachment.
    Thanks,

    DATA: i_otf       TYPE itcoo OCCURS 0 WITH HEADER LINE,
          i_tline     TYPE TABLE OF tline WITH HEADER LINE,
          i_receivers TYPE TABLE OF somlreci1 WITH HEADER LINE,
          i_record    LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    * Objects to send mail.
          i_objpack   LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
          i_objtxt    LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          i_objbin    LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          i_reclist   LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
    **************Work Area declarations***********************
          w_objhead   TYPE soli_tab,
          w_ctrlop    TYPE ssfctrlop,
          w_compop    TYPE ssfcompop,
          w_return    TYPE ssfcrescl,
          w_doc_chng  TYPE sodocchgi1,
          w_data      TYPE sodocchgi1,
          w_buffer    TYPE string."To convert from 132 to 255
    data:     v_len_in     TYPE sood-objlen,
         v_len_out    TYPE sood-objlen,
         v_len_outn   TYPE i,
         v_lines_txt  TYPE i,
         v_lines_bin  TYPE i.
    start-of-selection.
      w_ctrlop-getotf    = gv_abaptrue.
      w_ctrlop-no_dialog = gv_abaptrue.
      w_compop-tdnoprev  = gv_abaptrue.
    PERFORM call_smartform.
      PERFORM convert_to_otf_format.
      PERFORM pdf_formatting.
      PERFORM build_mail_format.
      PERFORM send_mail.
    form call_smartform.
    DATA:fm_name  TYPE rs38l_fnam.
      DATA:formname TYPE tdsfname VALUE 'ZSD_CRM_PROFORMA_INVOICE_001'.
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname = formname
        IMPORTING
          fm_name  = fm_name.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      CALL FUNCTION fm_name
        EXPORTING
          control_parameters = w_ctrlop
          output_options     = w_compop
          user_settings      = ' '
          v_vbeln            = v_vbeln
          v_erdat            = gv_dat
          wa_custaddr        = gw_zcustaddr
          v_stceg            = gw_kna1-stceg
          v_total            = gv_total
          vbak               = vbak
          v_lifnr            = gw_kna1-lifnr
          vbrp               = vbrp
          v_head             = gv_heading
          v_taxtext          = gv_text
          v_tax              = gv_tax
          v_gtotal           = gv_gtot
        IMPORTING
          job_output_info    = w_return
        TABLES
          it_det             = gt_items
        EXCEPTIONS
          formatting_error   = 1
          internal_error     = 2
          send_error         = 3
          user_canceled      = 4
          OTHERS             = 5.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    endform.
    form convert_to_otf_format.
      i_otf[] = w_return-otfdata[].
      CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          format                = 'PDF'
          max_linewidth         = 132
        IMPORTING
          bin_filesize          = v_len_in
        TABLES
          otf                   = i_otf
          lines                 = i_tline
        EXCEPTIONS
          err_max_linewidth     = 1
          err_format            = 2
          err_conv_not_possible = 3
          OTHERS                = 4.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    endform.
    form pdf_formatting.
    * Convert PDF from 132 to 255.
      LOOP AT i_tline.
    * Replacing space by ~
        TRANSLATE i_tline USING ' ~'.
        CONCATENATE w_buffer i_tline INTO w_buffer.
      ENDLOOP.
    * Replacing ~ by space
      TRANSLATE w_buffer USING '~ '.
      DO.
        i_record = w_buffer.
    * Appending 255 characters as a record
        APPEND i_record.
        SHIFT w_buffer LEFT BY 255 PLACES.
        IF w_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    endform.     
    FORM build_mail_format .
    DATA:lv_dash(1)         TYPE c VALUE '-'.
      DATA:lv_xtn(4)          TYPE c VALUE '.pdf'.
      CONSTANTS:lv_esacpe     TYPE so_escape  VALUE 'U'.
      CONSTANTS:lv_so_obj_tp  TYPE so_obj_tp  VALUE 'PDF'.
      CONSTANTS:lv_so_obj_tp1 TYPE so_obj_tp  VALUE 'RAW'.
      CONSTANTS:lv_so_obj_sns TYPE so_obj_sns VALUE 'F'.
    * Get Email ID's
      SELECT * INTO TABLE gt_address[] FROM adr6
      WHERE addrnumber = gw_kna1-adrnr.
      REFRESH:i_reclist,
              i_objtxt,
              i_objbin,
              i_objpack.
      CLEAR w_objhead.
    * Object with PDF.
      i_objbin[] = i_record[].
      DESCRIBE TABLE i_objbin[] LINES v_lines_bin.
    * Object with main text of the mail.
      i_objtxt = text-002.
      APPEND i_objtxt.
      DESCRIBE TABLE i_objtxt LINES v_lines_txt.
    * Document information.
      w_doc_chng-obj_name = text-005.
      w_doc_chng-expiry_dat = sy-datum + 10.
      IF gw_flg = 'T'.
        w_doc_chng-obj_descr = text-003.
      ELSE.
        w_doc_chng-obj_descr = text-004.
      ENDIF.
      CONCATENATE w_doc_chng-obj_descr lv_dash v_vbeln INTO w_doc_chng-obj_descr.
      w_doc_chng-sensitivty = lv_so_obj_sns. "Functional object
      w_doc_chng-doc_size = v_lines_txt * 255.
    * Pack to main body as RAW.
    * Obj. to be transported not in binary form
      CLEAR i_objpack-transf_bin.
    * Start line of object header in transport packet
      i_objpack-head_start = 1.
    * Number of lines of an object header in object packet
      i_objpack-head_num = 0.
    * Start line of object contents in an object packet
      i_objpack-body_start = 1.
    * Number of lines of the object contents in an object packet
      i_objpack-body_num = v_lines_txt.
    * Code for document class
      i_objpack-doc_type = lv_so_obj_tp1.
      APPEND i_objpack.
    * Packing as PDF.
      i_objpack-transf_bin = gv_abaptrue.
      i_objpack-head_start = 1.
      i_objpack-head_num = 1.
      i_objpack-body_start = 1.
      i_objpack-body_num = v_lines_bin.
      i_objpack-doc_type = lv_so_obj_tp.
      i_objpack-obj_name = text-005.
      CONCATENATE w_doc_chng-obj_descr lv_xtn INTO i_objpack-obj_descr.
      i_objpack-doc_size = v_lines_bin * 255.
      APPEND i_objpack.
    * Document information.
      CLEAR i_reclist.
    * e-mail receivers.
      LOOP AT gt_address INTO gw_adr6.
        i_reclist-receiver = gw_adr6-smtp_addr.
        i_reclist-express =  gv_abaptrue.
        i_reclist-rec_type = lv_esacpe. "Internet address
        APPEND i_reclist.
      ENDLOOP.
    endform.
    FORM send_mail .
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = w_doc_chng
          put_in_outbox              = ' '
        TABLES
          packing_list               = i_objpack[]
          object_header              = w_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.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      COMMIT WORK.
    ENDFORM.  
    hi this is a program for sending smartform as pdf attachment.
    make the necessary modifications in the OTF part and use it
    Edited by: Keshu Thekkillam on Jul 10, 2009 7:17 PM
    Edited by: Keshu Thekkillam on Jul 10, 2009 7:17 PM

  • I get a weekly email with a PDF attachment and when I open it it's to large to print. To date I'm not able to find a way to shrink or adjust the size. The doc was created on M/S Office-excell

    I get a weekly email with a PDF attachment and when I open it it's to large to print and I know of no way to shrink or resize the doc. It's created in M/S excel. Can anymore assist....TX

    From: Test Screen Name [email protected]
    Sent: Sunday, August 04, 2013 11:32 AM
    To: gunner0490
    Subject: I'm not able to open PDF files in Adobe Reader XI.
    Re: I'm not able to open PDF files in Adobe Reader XI.
    created by Test Screen Name <http://forums.adobe.com/people/TestScreenName>  in Adobe Reader - View the full discussion <http://forums.adobe.com/message/5565198#5565198

  • Email Billing document as PDF Attachment while saving from VF01/02

    Hi,
    Can anybody suggest if there is any BADI/User Exit/Configuration exists in order to email Billing document as a PDF attachment while saving from VF01 or VF02?
    We need to trigger this while saving the Output type say, VF02 GOTO -> HEADER -> OUTPUT (select the output type) -> SAVE - should send an email with PDF attachment.
    I have written the code for sending email with PDF attachment. Presently this code is included in the Print program for the sapscript and an email is sent when an output is issued from VF01/02/03 where as the requirement is to send email whenever the document is saved.
    Thanks in Advance,
    Srinivas

    Hi,
    While saving subroutine FORM_OPEN will get triggerred, and this will be included in the Z Program. If it is not contained in the Z program, include this subroutine. This subroutine will have include RVADOPFO.
    The above include will have the function module ADDR_GET_NEXT_COMM_TYPE, and the import parameter LVS_COMM_VALUES will contain the address number and email address to whom the pdf needs to be sent.
    So here, i.e. In place of standard include RVADOPFO, put custom include ZRVADOPFO, and modify the code as below.
    After the function module ADDR_GET_NEXT_COMM_TYPE, read the email address from any custom table based on the various conditions or hard coded value, then move it to the below variable.
    LVS_COMM_VALUES-ADSMTP-SMTP_ADDR.
    And remaining functionality will be taken care by the standard code. i.e. converting the spool to PDF and attaching it while sending the email etc....
    If I am not wrong, the same functionality will work  even while saving the sales order etc..
    Regards,
    Santu.

  • Document Distribution with attached documents coming across in BIN format

    Hello all,
    I have 3 dist types defined in the system.  RML, RMA, and INT
    RMA sends to SAP Office and includes a link to the document defined in DMS and seems to work correctly.
    RML sends the document to SAP Office as an attachment but the attached documents always is in BIN format and cannot be opened by the application.
    INT sends to my external email but has the same problem as above, the attachment is always in a BIN format and cannot be opened.
    This works the same with several different applications in DMS, Word, Excel, Text Files, etc.
    Can anyone give me an idea what I may be missing in config that is keeping this from working correctly.  We are running SAP ECC 6.0
    Thanks,
    Bill

    Hi Bill,
    Please check the following customizing in your system:
    1) Please check you have maintained suitable length of syntax group for
    Windows NT. Please maintain it more than 20.
    Please proceed as follows to correct this entry:
    Run the tcode SPRO
    Implementation Guide for R/3 Customizing (IMG)
    Cross-Application Components
      Document Management System
       Document Distribution
        General Settings
         Platform-Independent File Names
          Maintain file names and file paths across all clients
           Syntax group definition
    2) Please check the 'File processing' value for distribution type 'INT'.
    Please set it as '2'.
    Further please check note 355048 and as mentioned your settings in transaction DC30 for the workstation applications.
    Best regards,
    Christoph

  • Send pages document as pdf attachment without including the whole document in the message

    What I am trying to do is to write a document in pages then send it as a pdf attachment which shows as a mail icon in the mail message.  One then clicks on the icon and the attached file opens.  Seems I can do it if I send it as a word doc but every time I try and send it as a PDF the whole document shows up in the email body....
    Is there something I am not doing?
    Thanks
    Bryan

    Hi Gee,
    We also tried this:
    Wrote document in Pages and used "export" to save it as a PDF document.
    Fired up Mail, clicked on add attachment and as usual we got the document in the body
    Highlighted the document and right clicked.
    In drop down menu we selected "show as Icon" and it did just that
    We then sent it to our Tablet where, believe it or not it came up as an attachment NOT in the body of the mail.
    Just shaking our heads on this on but I do really think Jerry is absolutely right so will not take any more chances and add a second page if I have to send a pdf......
    Bryan

  • Send e-mail  Billing document as PDF Attachment while saving from VF01/02

    Hi all,
    I have written the code for sending email with PDF attachment. Presently this code is included in the Print program for the smartform and an email is sent when an output is issued manually from VF02/03 where as the requirement is to send email whenever the document is saved.
    We need to trigger this while saving the Output type say, <b>VF01</b> GOTO -> HEADER -> OUTPUT (select the output type) -> SAVE - should send an email with PDF attachment.
    need ur help on this.
    thanks,
    Subba.

    Hello,
    Just like you have defined an ouput type for smartforms ,you can define new output type with external email option as medium which will first generate a PDF from invoice data & then send it as email .
    I am not sure but you can also try this ::::::
         If you have custom-developed smartforms program,then you can add email code at the end of smartform execution by generating PDF, in the same output type instead of  creating new.
    Thanks.

  • Printing Emails that have pdf attachment icons

    WHen I send an email that has a pdf attachment, I generally make sure that the attachment is "View as Icon". Even so, when I need to print the email for archive purposes, the printout always includes an image of the first page of the pdf, not the icon. This can result in unnecessary page prints.
    In Lion, this used to happen only with pdf attachments that had only 1 page. In Mountain Lion, it seems to happen also with multi-page pdf attachments.
    Is there a way to force print only the attachment icon in the email, not the full page?

    To make the icon the default view of attachements, do the following:
    Use the Terminal to set the preference.
    Terminal is in Applications>Utilities. Open Terminal and type:
    defaults write com.apple.mail DisableInlineAttachmentViewing -bool yes
    That will make every attachment you send act like an attachment instead of a pretty unusable decoration.
    If you decide this isn’t what you’re looking for, to restore inline attachment viewing type:
    defaults write com.apple.mail DisableInlineAttachmentViewing -bool false
    Restart Mail and you’re back to normal.
    Please tell me if that worked for you!

  • Send Smartform as Email body not PDF attachment

    Hello Experts,
    I have a requirement where I need to send Smartform as Email body and NOT as PDF attachment.
    I have spool ID generated for the smartform, how can I send this spool in Email body rather than as an attachment.

    Hi K C
    Try this.. Get the OTF data from the SMARTFORM, use the OTF data and pass this to FM'CONVERT_OTF', and use the format as PDF.
    Then use the resultant converted PDF data as attachment while calling the  'SO_NEW_DOCUMENT_ATT_SEND_API1' FM.
    let us know if this works.
    Thanks
    Rajesh Chowdary

  • If email has a PDF attachment, I can't read the text portion of the email

    I noticed that if the message had a PDF attachment, then that icon is all I see. The text portion seems to have been ignored, although I can see it in the "preview" of the message. Very strange.
    Rgds
    Ken

    Have you tried to restart the phone? And how big is the PDF?

  • Sending Purchase Order by Email as an PDF Attachment.

    Dear Experts,
    I would like to make use of the Standard Functionality Provided by SAP to Send PO by Email. I Reffered to SAP note 191470. And made sure that everything is Done.
    Now the Problem is We are getting the Mail. But There is no attachment to the Mail.
    Anyone can give some light to this issue?
    Regards,
    Lijo Joseph

    hi Lijo,
    Check these below threads it might help you.
    PDF form as email attachment for purchase order
    To send PDF file as an email
    Error opening the PDF file while sending the PDF as an attachment
    unable to e-mail a pdf  through FM  'SO_NEW_DOCUMENT_ATT_SEND_API1'
    Hope this helps!
    Cheers
    Alfred

  • How to get acrobat XI trial to convert a word document to PDF without getting error message

    I downloaded a trail version of acrobat XI to try converting some word 10 doc to a PDF I keep getting "Unable to open document;" when I right click and get the drop down menu. I have been unable to get the adobe tab to appear ether as a tab or in the Add-In tab.
    I have Visual C++ 2010 will reinstall if it is need.

    I think on this occasion the problem is not PDF to Word, but Word to PDF.
    It seems that Acrobat is not integrated in Word. Until it is, no method of conversion will work.
    So, second question is which version of Word (as well as, which OS as Bill@VT asked)?

  • I am having trouble email documents from PDF expert on my Ipad?

    My documents are not emailing from my IPad to recipients. I am receiving email on the IPad.

    You should contact the folks who make PDF Expert.

  • Converting emailed documents to PDF instead of JPEG

    Many of our customers have recently begun to shy away from accepting quotes from us because of the poor quality of the JPEG format documents the SBO Mailer generates.  The graphic is fuzzy and mostly illegible.
    We need desperately need a better integrated solution for this problem and I am to understand that SBO 2005 A Patch Level 31 supports PDF generated documents.  I also understand that Patch Level 31 may cause some migration issues when upgrading to SBO 2007 A.
    Has anyone undergone this sort of migration before or had similar problems?  To simplify matters for my users I need an integrated solution as opposed to a third party (or extra step) to convert our Sales Quotes as an example.  We could potentially lose business because of our recent transition to SAP Business One.
    Any information or insight would be greatly appreciated.  Would anyone happen to know why there be migration issues from PL 31 to 2007 A (our consultants provided no explanation).
    Many thanks in advance.....
    - Pat

    Hi Pat,
    From SAP B1 SP01 PL23 export to PDF has been possible. This was in a enhancement pack. It works really well. I have upgraded to PL23 and am now on PL 31. I've had no problems with the PDF writer.
    The reason PL31 will give problems upgrading to 2007 is not because it will not be possible to upgrade to 2007. it is that you wont be able to "Ramp up" to 2007. Ramp up is a stage before the software is released. Once the software is released an upgrade procedure will be provided by SAP.
    see below from SAP:
    Participation in SAP Business One 2007 A Ramp-Up
    Please be aware that customers who install patch 23 and higher of SAP Business One 2005 A SP01 will not be able to participate in the SAP Business One 2007 A Ramp-Up program. This is due to US-GAAP regulations concerning expansion of software functionality during Ramp-Up programs. For these customers, an upgrade to SAP Business One 2007 A will only be possible when this release is generally available, which is currently planned for Q4 2007. Hence, for customers who plan to participate in the SAP Business One 2007 A Ramp-Up program, the last regular SAP Business One 2005 A SP01 patch that can be applied is patch 22.
    thanks
    John Treweeks

Maybe you are looking for

  • Atv not showing in itunes on windows 7

    After the latest update today, 11.1.1.11, my Apple TV (3) is not showing anymore in iTunes. Unable to send anymore anything to Apple TV from my itunes. Sharing is enabled, ATV connect to the network and working stand-alone (playing content) but not f

  • Can you sign into Adobe CreatePDF from different desktops?

    I am looking into purchasing Adobe CreatePDF for administrative work that I do for my job. The problem is that I don't have a set work station and am changing desktop computers in the office frequently. I was wondering if I can sign into Adobe Create

  • Truncate slower than delete on table of XMLTYPE

    Hi, Why is a truncate of a XMLTYPE table which is based on a registered XML schema, so much slower than doing a delete? Usually it is the other way around. Is this caused by the number of objects actually underlying the table? Thanks Pete

  • SQL Developer takes 7 minutes to bring back list of packages

    The database is 11g R2 on 64bit Linux. Instance has multiple schemas SQLDev is v3.1.07 (download with JDK) SQL Dev connects without a problem. Click the "+" next to Functions, in a few seconds I get the list of functions. Click the "+" next to Proced

  • String in two lines

    Hi Friends, I have a two lines of a text. I have stored them in two seperate text elements. If i contenate them it will come in a single line. But i want them a two seperate lines. Can anybody give me tha logic for this... Regards Satish Kumar