Security error while save pdf files in portal

I am using SAP EHSM 1.0 a portal based application for SAP EH&S. It uses ADS for generating interactive forms. Forms are getting generated with out error but when saving it the portal throws the below error
Upload of this file type (application/pdf) is not allowed (security issues)
I thought its an security related to issue with ADS but then when I tried to upload a PDF while from my desktop and I got the same error.
Is there a setting in NetWeaver  portal to allow PDF extension. Please let me know. Thanks.
Thanks
Pugazh

Check whether you have S_GUI Authorization Object in ECC ? if you don't have it, check with your security team to assign it for you in a ROLE and the values below
Possible values:
61: Download; This authorizes you to save lists displayed on the screen in local files (either unconverted, in spreadsheet format, or in Rich Text Format). This authorization can only be granted or denied fo all lists in the system - you cannot restrict it to a selection of lists.
60: Upload; This authorizes you to load data into the system using ws_upload or gui_upload. You cannot select the data to be uploaded.
04: Print; (not used)
02: Change; (not used)
Regards,
Arjun

Similar Messages

  • Security error while loading pdf file in jsp in firefox?

    When i type in the following link manually in firefox as " file://///172.16.2.1/copyediting/ELS/mallet.pdf", pdf file is loaded successfully in the firefox browser. PDF file is located in remote server which is referred by IP 172.16.2.1.
    I've assigned the Same link in a String in jsp page and tested it through my tomcat application as
    <%
    String linktotest="file://///172.16.2.1/copyediting/ELS/mallet.pdf";
    %>
    <a href="<%=linktotest%>">link</a>
    when i click on the hyperlink , the pdf is not loaded in firefox and i'm getting the following error in firefox error console
    Security Error: Content at http://172.16.3.222:8080/FMS/source/journal/ProductionEntry.jsp may not load or link to file://///172.16.2.1/copyediting/ELS/mallet.pdf
    can any one please give me the solution.

    Links and forms in HTML should point to public URL´s (with http:// or https:// protocol), not to the file system (with file://).
    If those files are not public accessible by URL, then you need to create a servlet which does the file streaming task. This example may be useful then: [http://balusc.blogspot.com/2007/07/fileservlet.html].

  • Error while generating PDF in BI Portal

    <body lang=EN-GB style='tab-interval:36.0pt'>
    <p class=MsoNormal>Since 2 days ago we have on our productive BI Portal an
    error and we <span class=SpellE>can`t</span> find a solution to it. When we try
    to preview any report we get the <span class=SpellE>folowing</span> error: <span
    class=GramE>&quot; Error</span> while generating PDF&quot;. On development <span
    class=GramE>an</span> test is working perfectly but on productive it gets that
    error. We <span class=SpellE>don`t</span> know what happened so please help
    us.&gt;<o:p></o:p></p>
    <p class=MsoNormal><o:p> </o:p></p>
    <p class=MsoNormal>In the log file we receive this message: A message was generated:<o:p></o:p></p>
    <p class=MsoNormal>{<span class=GramE>code</span>} <o:p></o:p></p>
    <p class=MsoNormal>ERROR<o:p></o:p></p>
    <p class=MsoNormal>Error while generating PDF<o:p></o:p></p>
    <p class=MsoNormal>com.sap.ip.bi.webapplications.pageexport.PageExportRenderingRootNode
    PageExportRenderingRootNode_0001<o:p></o:p></p>
    <p class=MsoNormal>Log ID: 001A64E8E1620067000000A8001E50BA00048279748984FA<o:p></o:p></p>
    <p class=MsoNormal>Initial cause<o:p></o:p></p>
    <p class=MsoNormal>Message: Service call exception; nested exception is: <o:p></o:p></p>
    <p class=MsoNormal>com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException:
    Invalid Response Code: (401) Unauthorized. The requested URL
    was:&quot;http://xxx:50000/AdobeDocumentServices/Config?style=document"<o:p></o:p></p>
    <p class=MsoNormal>Stack trace: <span class=SpellE>java.rmi.RemoteException</span>:
    Service call exception; nested exception is: <o:p></o:p></p>
    <p class=MsoNormal>com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException:
    Invalid Response Code: (401) Unauthorized. The requested URL
    was:&quot;http://xxx:50000/AdobeDocumentServices/Config?style=document"<o:p></o:p></p>
    <p class=MsoNormal><span class=GramE>at</span> <span class=SpellE>com.sap.tc.webdynpro.adsproxy.ConfigBindingStub.rpData</span>(ConfigBindingStub.java:84)<o:p></o:p></p>
    <p class=MsoNormal><span class=GramE>at</span> com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:176)<o:p></o:p></p>
    <p class=MsoNormal>Caused by:
    com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException:
    Invalid Response Code: (401) Unauthorized. The requested URL
    was:&quot;http://xxx:50000/AdobeDocumentServices/Config?style=document"<o:p></o:p></p>
    <p class=MsoNormal><span class=GramE>at</span>
    com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.handleResponseMessage(MimeHttpBinding.java:986)<o:p></o:p></p>
    <p class=MsoNormal><span class=GramE>at</span>
    com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.call(MimeHttpBinding.java:1438)<o:p></o:p></p>
    <p class=MsoNormal><span class=GramE>at</span> <span class=SpellE>com.sap.tc.webdynpro.adsproxy.ConfigBindingStub.rpData</span>(ConfigBindingStub.java:77)<o:p></o:p></p>
    <p class=MsoNormal>... 57 more<o:p></o:p></p>
    <p class=MsoNormal>{<span class=GramE>code</span>} <o:p></o:p></p>
    <p class=MsoNormal>----
    <o:p></o:p></p>
    <p class=MsoNormal>Message: Unknown Error<o:p></o:p></p>
    <p class=MsoNormal>Stack trace: <span class=SpellE>com.sap.ip.bi.base.exception.BIBaseRuntimeException</span>:
    Unknown Error<o:p></o:p></p>
    <p class=MsoNormal><span class=GramE>at</span> <span class=SpellE>com.sap.ip.bi.export.xfa.impl.Document.writeWidthsAsXmlToStream</span>(Document.java:339<o:p></o:p></p>
    <p class=MsoNormal>----
    <o:p></o:p></p>
    <p class=MsoNormal><span class=GramE>at</span> <span class=SpellE>com.sap.tc.webdynpro.adsproxy.ConfigBindingStub.rpData</span>(ConfigBindingStub.java:77)<o:p></o:p></p>
    <p class=MsoNormal>... 57 more<o:p></o:p></p>
    <p class=MsoNormal><o:p> </o:p></p>
    <p class=MsoNormal><span class=SpellE>com.sap.ip.bi.base.exception.BIBaseRuntimeException</span>
    UNKNOWN_ERROR<o:p></o:p></p>
    I only cutted the right messages Does anybody have some idea? Where i am unathorized? What shell i do?
    Thanks in advance
    Patrick
    </div>
    </body>

    check if you have adobe document services installed properly. ASk your portal admin team to check these messages,

  • 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

  • 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!!

  • 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

  • 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 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

  • Error while downloading PDF file from FTP Server

    Hi Friends,
    I have sent a PDF file with data to FTP , Then i want to check that uploaded pdf file , whether that is correct or not?
    for that , i have downloaded that file from FTP and i am trying to open the file . but it is giving this problem .
    "There was an error opening the document . The file is damaged and could not be repaired."
    will you suggest me regarding this.
    thanks in advance.
    balaji.T.

    CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
              EXPORTING
           SRC_SPOOLID                    = spoolno
                src_spoolid                    = wa_file-rqident
                no_dialog                      = ' '
          DST_DEVICE                     =
          PDF_DESTINATION                =
              IMPORTING
                pdf_bytecount                  = numbytes
                pdf_spoolid                    = pdfspoolid
          OTF_PAGECOUNT                  =
                btc_jobname                    = jobname
                btc_jobcount                   = jobcount
              TABLES
                pdf                            = pdf
              EXCEPTIONS
                err_no_otf_spooljob            = 1
                err_no_spooljob                = 2
                err_no_permission              = 3
                err_conv_not_possible          = 4
                err_bad_dstdevice              = 5
                user_cancelled                 = 6
                err_spoolerror                 = 7
                err_temseerror                 = 8
                err_btcjob_open_failed         = 9
                err_btcjob_submit_failed       = 10
                err_btcjob_close_failed        = 11.
    because of this one PDF internal table is obtained.
           OPEN DATASET L_FILENAME  FOR OUTPUT in text mode  MESSAGE MSG.
      LOOP AT pdf.
        CONCATENATE pdf-tdformat       "Material group
                     pdf-TDLINE       "Basic Material
               INTO ITEXT-TLINE ..
        APPEND ITEXT.
        TRANSFER ITEXT TO L_FILENAME.
      ENDLOOP.

  • 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.

  • 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  reading pdf file using adobe reader 8

    Hi ,
    I am using itextsharp for creating pdf file which contains 300 pages.
    When I tried to open that pdf file in adobe reader 5 , there is no issue . Its opening correctly. But When I 've tried to open it using adobe reader 8 . Its opening the file but I could read upto 156 pages out of 300. I couldn't read beyond that. Its displaying the following error message "An error exists on this page. Acrobat may not display the page correctly. Please contact the person who created the PDF document to correct the problem" , "could not find the XObject named 'Xf2'." .
    Please help me to resolve the issue.
    Thanks,
    Tamil.

    Hi ,
    I am using itextsharp for creating pdf file which contains 300 pages.
    When I tried to open that pdf file in adobe reader 5 , there is no issue . Its opening correctly. But When I 've tried to open it using adobe reader 8 . Its opening the file but I could read upto 156 pages out of 300. I couldn't read beyond that. Its displaying the following error message "An error exists on this page. Acrobat may not display the page correctly. Please contact the person who created the PDF document to correct the problem" , "could not find the XObject named 'Xf2'." .
    Please help me to resolve the issue.
    Thanks,
    Tamil.

Maybe you are looking for

  • Zen MicroPhoto Problems! PLease,I Really Need Help!!

    hello everybody, i bought a zen microphoto 4GB in June and it worked perfectly until two days ago. I turned it on like i do everyday to listen to music on my way to school. i downloaded the newest version of firmware onto it'sthree days before. when

  • All apps are crashing after updating to 4.3.2

    Have just updated kids ipod touch latest Gen, now all the apps are crashing - every app including apple apps like facetime are crashing. Can I downgrade this somehow.

  • Check Critical Authorization

    Hi folks anyone who can let me know if there is any way to check which users have critical authorizations.SAP Security Audit will be conducted in our organization few days and I'm stuck badly thanks in advance

  • Class not found in weblogic deployment

    Hi, I'm trying to deploy the adobe livecycle ears to a hardened weblogic, but for some reasons some jars/classes are not found. If I try to deploy the same ears to an weblogic base domain, I do not see this error. Any ideas what could cause this issu

  • Sharing settings across a network

    Okay, I've searched to no avail. Is it possible to share mail settings and smart folders with constantly updating messages across a home network. This is what happens at my work. We use Outlook, and whatever computer I log into with my account, the O