WebInterface Server - Error while opening the PDF file

Hello,
We are using webinterface to display the MSDS genearated.
Our customers use the link provided to them for displaying the msds.
We imported a few MSDS ( CG36 ), which are in PDF format & displayed successfully on the webinterface server.
However the newly generated MSDS ( Create Report ) from SAP EH&S system are not getting displayed on the webinterface server. We are getting following error message:
Error reading resulitng document from filesystem. Class:
COM.td.ehswww.results.EhsDocument.
Method:getResolvedDocument().This error could have been caused by a misconfigured filter.ini.
We checked and found that the filter.ini file is same on both quality & production system.
We are able to generate & display the report successfully on quality webinterface server.
Problem only appears on the production webinterface server.
We also tried to search for the SAP notes on this issue.
But we could not find out any relevant note for our issue.
Any help in this regarding is highly appreciated.
Thanks & Regards,
Aarohi

Hello Sebastian,
Thank you very much for your help.
We checked on both quality & production webinterface server.
The Tomcat service is not executed with any specific user.
The system is working fine on quality , we are getting errors only on the production.
We also identified a strange behavior on the production web interface server.
We are able to see files under following menu path:
There are error files getting generated.
I guess these error files are getting generated while converting the rtf file to pdf file.
The resultant PDF file is not getting generated and hence system is giving the error on the webpage.
Can you guide us as to why these error files are getting generated .? What can be the root cause of this issue.? and How to prevent this.?
Again thanks a lot for your help.
Best Regards,
Aarohi

Similar Messages

  • BYMONTHDAY is causing the error while opening the ics file in outlook when event is exported from SharePoint Calendar

    Hi All,
              I am trying to parse the SharePoint recurrence data to get the RRULE for the ics file the RRULE parsed works fine for Yearly and Daily but it causes error when opening the ics file for the Monthly and
    weekly recurrence recurrence. I have opened the ics file in the notepad and observed that the BYDAY and BYMONTHDAY causes the problem. If I remove the tag the file opens fine but with wrong recurrence pattern.
    Any help will be appreciated.
    Regards
    Ajeet
    Ajeet

    Ajeet,
    I see that this is an extremely old post, but I thought I would refresh it with a bit more info.
    I wish I had found this post a few days ago.  I realized the same thing as well.  I don't quite understand the reasoning behind requiring the by day date must be the same as  the event date.  Another thing with rrecurrence is that if
    you pick a day of the week for a recurrence (i.e. Friday), then the start date must also occur on a Friday (I am just casting it as the first Friday of the month).
    I have come into this same issue with the BYMONTHDAY.  I am currently working on trying to configure an .ICS file to allow for multiple monthly recurrences, but it appears Outlook does not support multiple days within an event (determined by trying
    to create an even in Outlook and picking the recurrence option).  It seems that you are only allowed to have an event on (for example) every Friday of each month, or the (x) day of each month.  You cannot set any other occurrences of any other day
    within the same ICS file.  Hopefully someone else will find this information useful.
    Cheers,
    Tracy

  • Error while opening the XML file

    Hi all,
    i'am trying to download data from internal table to XML file with root node and its
    corresponding child nodes.i have written the program in this way.
    tables: mara.
    include bcciixml_decl.
    include bcciixml_impl.
    parameters: p_matnr like mara-matnr.
    start-of-selection.
    data: piXML          type ref to if_ixml,
            pDocument      type ref to if_ixml_document,
            pStreamFactory type ref to if_ixml_stream_factory,
            pIStream       type ref to if_ixml_istream,
            pParser        type ref to if_ixml_parser,
            pNode          type ref to if_ixml_node,
            pText          type ref to if_ixml_text,
            string         type string,
            count          type i,
            index          type i,
            totalSize      type i,
            dsn(40)        type C,
            xstr           type xstring.
      types: begin of it_mara,
                matnr like mara-matnr,
                ernam like mara-ernam,
                aenam like mara-aenam,
                vpsta like mara-vpsta,
            end of it_mara.
    data: itab_mara type table of it_mara.
    select matnr ernam aenam vpsta from mara into table itab_mara where
           matnr =  p_matnr.
    types: begin of xml_line,
            data(256) type X,
          end of xml_line.
    data: xml_table type table of xml_line.
    parameters: filename like rlgrap-filename.
    pixml = cl_ixml=>create( ).
    *-- create the initial document
      pDocument = pixml->create_document( ).
      pStreamFactory = pixml->create_stream_factory( ).
    *-- create an input stream for the table
    *pIStream = pStreamFactory->create_istream_itable( table = xml_table
                                                     size  = totalSize ).
      pParser = piXML->create_parser( stream_factory = pStreamFactory
                                      istream        = pIStream
                                      document       = pDocument ).
    data: pOStream type ref to if_ixml_ostream.
    pOStream = pStreamFactory->create_ostream_itable( table = xml_table ).
    call method pDocument->render( ostream   = pOStream ).
    *-- how many bytes were written to the table?
    totalSize = pOStream->get_num_written_raw( ).
    *-- write the XML document back to the frontend
    concatenate filename '.out' into filename.
    condense filename no-gaps.
    CALL FUNCTION 'WS_DOWNLOAD'
         EXPORTING
              BIN_FILESIZE            = totalSize
              FILENAME                = filename
              FILETYPE                = 'BIN'
         TABLES
              DATA_TAB                = itab_mara
         EXCEPTIONS
              OTHERS                  = 11
    IF SY-SUBRC <> 0.
    ENDIF.
    *-- print the whole DOM tree as a list...
    pNode = pDocument.
    perform print_node using pNode.
          FORM print_node                                               *
    form print_node using value(pNode) type ref to if_ixml_node.
      data: indent      type i.
      data: pText       type ref to if_ixml_text.
      data: string      type string.
      indent  = pNode->get_height( ) * 2.
      case pnode->get_type( ).
        when if_ixml_node=>co_node_element.
          string = pNode->get_name( ).
          write: at /indent '<', string, '> '.
        when if_ixml_node=>co_node_text.
           pText ?= pNode->query_interface( ixml_iid_text ).
           if pText->ws_only( ) is initial.
            string = pNode->get_value( ).
            write: at /indent string.
           endif.
      endcase.
      pNode = pNode->get_first_child( ).
      while not pNode is initial.
         perform print_node using pNode.
         pNode = pNode->get_next( ).
      endwhile.
    endform.
    but when open the XML file which i created on the desktop it shows the following error.
    The XML page cannot be displayed
    Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
    XML document must have a top level element. Error processing resource 'file:///C:/Documents and Settings/anilda/Desktop/sim...
    how to rectify this error.
    Regards,
    satish.

    You are going to need to provide more details about this shell script file you are executing and the environment it is in. Beyond being on a Windows box, you have provided none of those details.
    If the SQL statement will execute cleanly in SQLDeveloper but not your script, then the issue lies in the script. How do you know the error is that SQL statement? Can your script even "select * from dual;" successfully?
    Also, SQLDeveloper (which I don't use) may contain its own libraries for accessing the DB. You probably should consider upgrading to a SQL*Plus client that is at least the same version or later as your database.
    Note:
    As I recall, xmlgen in 9.2 is now a synonym for dbms_xmlgen. You should change the package name accordingly [url http://docs.oracle.com/cd/B10501_01/appdev.920/a96612/d_xmlge2.htm#1010709]dbms_xmlgen.getXML

  • Error while opening the PDF attachment

    HI SDN's
    I have to send order confirmation thru mail as a pdf attachment as soon as order has been saved.
    I have written the code and assigned to output type.
    Here I am getting an error opening a converted pdf file with Adobe Reader
    The error message reads:
    Adobe Reader could not open "filename.PDF" because it is either not a supported file type or because the file has been corrupted (for example, it was sent as an email attachment and wasn't correctly decoded).
    Any help would be appreciated.
    Thanks in advance
    VR

    hello, i have the same problem as VR's. The pdf file sent to my email is not able to open. You mentioned that this is only supported by early releases of Adobe. But anyhow, I followed your advice to have my spool converted to PDF, instead of OTF to PDF. But I get this error: Spool request 23595 contains no ABAP list data.
    What exactly my transaction does is that, it makes use of a sapscript layout via VL02N using an output type. I retrieve the OTF data in CLOSE_FORM function module. OTF is then converted to PDF via SX_OBJECT_CONVERT_OTF_PDF, then send via email through SO_NEW_DOCUMENT_ATT_SEND_API1.
    When I view the sent PDF file in my email, It cannot be opened.
    I would appreciate your help guys! thank you very much.

  • Unix script error while mail the pdf file.

    Hi all,
    I want to do a mail in pdf format via a unix script. for that i used the following query:
    # Verplichte variabelen
    inputname="dago130r.rdf"
    outputname="$DATOUT/dago130rDC.pdf"
    mailto="$MAIL_INKOOP_DC"
    subject="Opgeloste PV's per Category Manager"
    params="p_datum_1='08-08-2006' p_ind_dc_of_rz='D'"
    # Opgeloste PV's per Category Manager
    # Start script.
    # Vanaf hier hoeft in principe niets gewijzigd te worden.
    mymail () {
         local tmp=$DATTMP/$$.txt
         cat "$mailbody" > $tmp 2>/dev/null
         do_unix "uuencode $outputname $(basename $outputname) >> $tmp"
         check_success
         do_unix "mailx -s '$subject' -c '$mailcc' -r '$replyto' '$mailto' < $tmp"
         check_success
    header
    perform "$inputname R DESFORMAT=PDF DESTYPE=FILE DESNAME=$outputname $params"
    check_success exit
    mymail
    footer
    exit_check "$total_success"
    When i execute this query it will make the pdf file in the output folder as well as in the tmp folder as a text file. but after that it will give me error in the log file as follows.:
    09/08/06-11:13:19 [  25178] -- perform: Successful completion of dago130r.rdf R DESFORMAT=PDF DESTYPE=FILE DESNAME=/appl/tst/ah01/dago/dat/out/dago130rDC.pdf p_datum_1='08-08-2006' p_ind_dc_of_rz='D'
    09/08/06-11:13:19 [  25178] -- do_unix: Successful completion of uuencode /appl/tst/ah01/dago/dat/out/dago130rDC.pdf dago130rDC.pdf >> /appl/tst/ah01/dago/dat/tmp/25178.txt
    [  25178] ,/appl/tst/ah01/dago/dat/tmp/25178.txt,: No such file or directory
    [  25178] "/appl/tst/ah01/dago/home/dead.letter" 1/1
    [  25178]
    09/08/06-11:13:19 [  25178] -- ERROR do_unix: mailx -s 'Opgeloste PV's per Category Manager' -c '' -r '' '[email protected]' < /appl/tst/ah01/dago/dat/tmp/25178.txt returned 1
    09/08/06-11:13:19 [  25178] --
    I am not getting why this script not taking the file from the tmp folder and why this error comes??
    please help me to go out of this problem.

    Hi Bhavik,
    Please can you tell how you are executing this script. ?
    ./scritpname or sh scriptname
    Can you try the script removing local while declaring the tmp variable ?
    naghu

  • Error while opening the PDF preview

    Hi,
    While opening the form in the PDF preview, i am getting a pop window with a message saying, 'Cannot find 'c:\.\Adobe Examples\request_de.xml'. Make sure the path or Internet address is correct.'. When i click 'ok' it is giving a blank window. Do i need to install anything for that?
    Thanks and Regards,
    Giridhar.

    hi,
    Check u r Adobe version.....
    Adobe Reader 7 to 8.1 its preferable.
    (or)
    Check u r Adobe Lifecycle Designer (ALD).
    Adobe Lifecycle Designer 7.1 and above is preferable.
    by
    Parthasarathi

  • Problem while opening the PDF File in Enterprise Protal

    Dear All,
    I have uploaded a PDF Document of around 30 pages in KM and made an iview to view that document but when i click on the iview the document is not opening properly and after sometime the Portal/system is getting hanged.But when i open the pdf document with less number of pages it is working fine.
    I am using EP 7.0  and Adobe Reader 8.1.
    Any help or suggestions will be highly appreciated.
    Regards
    Shareef

    Doesnt seem to appear as a portal issue neither it is a reader issue. Might be some issues with the network which isnt allowing the entire file to get downloaded and hence causing the browser to hang.
    Thanks,
    GLM

  • Error while downloading the PDF file on presentation server

    Hi all,
    i have converted OTF file into PDF one and then downloading it to the presentation server . But it gives the error as follows
    'Access to file denied'    . Can anyone tell me what may be the issue ? Below is my code
    DATA: i_lines TYPE tline OCCURS 0 WITH HEADER LINE.
    DATA: ws_bin_size TYPE i.
    DATA: t_otf  TYPE TABLE OF itcoo,
                ws_filename TYPE string.
      t_otf[] = wa_job_info-otfdata[].
    CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          format        = 'PDF'
          max_linewidth = 132
        IMPORTING
          bin_filesize  = ws_bin_size
        TABLES
          otf           = t_otf
          lines         = i_lines.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          bin_filesize = ws_bin_size
          filename     = 'C:\ABC.PDF'
          filetype     = 'BIN'
        TABLES
          data_tab     = i_lines.

    Hi Sayeed,
          You may not having the permissions to create files in 'C' folder. Change the path and try again.

  • Error while opening a pdf file sent as an attachment in mail

    Dear All,
            We have converted a alv grid into pdf and sent a mail with the attached pdf file. When the attachment is opened in the received mail we get an error " File does not begin with %pdf-". I am pasting the code.
    Select single
      from
        TSP01
      where
        RQIDENT = wa_listident.
      if sy-subrc <> 0.
         exit.
      endif.
      client = tsp01-rqclient.
      name   = tsp01-rqo1name.
    *BREAK-POINT.
      CALL FUNCTION 'RSTS_GET_ATTRIBUTES'
             EXPORTING
                  AUTHORITY     = 'SP01'
                  CLIENT        = client
                  NAME          = name
                  PART          = 1
             IMPORTING
              CHARCO        =
              CREATER       =
              CREDATE       =
              DELDATE       =
              MAX_CREDATE   =
              MAX_DELDATE   =
              NON_UNIQ      =
              NOOF_PARTS    =
              RECTYP        =
              SIZE          =
              STOTYP        =
                  TYPE          = type
                  OBJTYPE       = objtype
             EXCEPTIONS
                  FB_ERROR      = 1
                  FB_RSTS_OTHER = 2
                  NO_OBJECT     = 3
                  NO_PERMISSION = 4.
      if objtype(3) = 'OTF'.
        is_otf = 'X'.
      else.
        is_otf = space.
      endif.
    *BREAK-POINT.
    CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
             EXPORTING
                  rqident              = wa_listident
                  desired_type         = desired_type
             IMPORTING
                  real_type            = real_type
             TABLES
                  buffer               = l_objcont
             EXCEPTIONS
                  no_such_job          = 14
                  type_no_match        = 94
                  job_contains_no_data = 54
                  no_permission        = 21
                  can_not_access       = 21
                  read_error           = 54.
        IF sy-subrc EQ 0.
          attach_type = real_type.
        ENDIF.
    if is_otf = 'X'.
    CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
            EXPORTING
              SRC_SPOOLID                    = wa_listident
              NO_DIALOG                      = c_no
          DST_DEVICE                     =
          PDF_DESTINATION                =
            IMPORTING
              PDF_BYTECOUNT                  =  gd_bytecount
              PDF_SPOOLID                    = pdfspoolid
          OTF_PAGECOUNT                  =
              BTC_JOBNAME                    = jobname
              BTC_JOBCOUNT                   = jobcount
            TABLES
              PDF                            = it_pdf_output
            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
      CHECK sy-subrc = 0.
      ENDIF.
    Transfer the 132-long strings to 255-long strings
      LOOP AT it_pdf_output.
        TRANSLATE it_pdf_output USING ' ~'.
        CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
      ENDLOOP.
      TRANSLATE gd_buffer USING '~ '.
      DO.
        it_mess_att = gd_buffer.
        APPEND it_mess_att.
        SHIFT gd_buffer LEFT BY 255 PLACES.
        IF gd_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    Please guide me to resolve this issue.
    Thanks & Regards,
    Anand

    Hi,
    is the next part of the code correct.
    What i mean is packing of the attachment, finding out the size of pdf file and doc type as PDF.
    You can also try below link..
    Link: [http://wiki.sdn.sap.com/wiki/display/Snippets/SENDALVGRIDASPDFATTACHMENTTOSAPINBOXUSINGCLASSES]
    Hope this helps.
    Regards,
    -Sandeep

  • Error while opening a pdf file.

    Hi All,
    I have Adobe Reader 10.1.3 installed on my system.
    I am getting the following 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 decoded)". This error is coming at random, i.e. if I open a file at one time, it will open without any problem, but at another time the same file gives this problem. Could anyone please tell me as to why this is happening and how to resolve this?

    This message occurs if a PDF file is damaged, either during downloading from a website, or during transport as an email attachment.
    Are you getting this error for a file that is stored on your local HD?  For this to occur at random, as you write, I can only imagine that the disk sector where it is stored is damaged.
    Can you run a disk diagnostics, e.g. CHKDSK on Windows?

  • Error in opening the PDF file created from the smart form output.

    Hi All,
    i have a simple smart form which takes 3 values like customer no, name and no of times customer called and gives an out like
    Customer 0001000000 with name Ravi called 5 times today.
    I have to send this output to mail as an attachment.
    for this i am coding as below.
    ******Call the SSF Function module
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    formname = Form name
    VARIANT = ' '
    DIRECT_CALL = ' '
    IMPORTING
    fm_name = lv_fmname
    EXCEPTIONS
    no_form = 1
    no_function_module = 2
    OTHERS = 3
    lv_partner_number = '0001000000'.
    lv_name_org1 = 'Ravi'.
    lv_z_no_calls_day = '5'.
    lw_ctrlop-getotf = 'X'.
    lw_ctrlop-no_dialog = 'X'.
    lw_compop-tdnoprev = 'X'.
    lw_compop-tddest = 'LP01'.
    *******Call the Form Function module and get the OTF of form output
    CALL FUNCTION lv_fmname
    EXPORTING
    name_org1 = lv_name_org1
    partner_number = lv_partner_number
    z_no_calls_day = lv_z_no_calls_day
    control_parameters = lw_ctrlop
    output_options = lw_compop
    user_settings = ' '
    IMPORTING
    job_output_info = w_return
    EXCEPTIONS
    formatting_error = 1
    internal_error = 2
    send_error = 3
    user_canceled = 4
    OTHERS = 5.
    i_otf] = w_return-otfdata[.
    *********Now here if i look in to the OTF data i got in debug it has the data i aniticipated along with some other data.
    the output is in the format
    TDPRINTCOM(2) TDPRINTPAR(70)
    ST XXXX.. customer 0001000000 with
    name.....
    i have my data in the above format spread in three lines of the output otf table where XXXX... is some number.
    ***********To convert to PDF Format
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
    format = 'PDF'
    max_linewidth = 132
    IMPORTING
    bin_filesize = lv_len_in
    BIN_FILE =
    TABLES
    otf = i_otf
    lines = i_tline
    EXCEPTIONS
    err_max_linewidth = 1
    err_format = 2
    err_conv_not_possible = 3
    err_bad_otf = 4
    OTHERS = 5
    *********For testing purpose i created a file on the desktop with the the data in i_tline. it created PDF file but when i tried to open it it's giving an error.
    i_objtxt = '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 = 'Smart Form'.
    wa_doc_chng-obj_descr = 'Frequent Caller Alert_Day'.
    wa_doc_chng-doc_size = ( v_lines_txt - 1 ) * 255 + STRLEN( i_objtxt ).
    *********Creating the Entry for the document
    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.
    i_objbin] = i_tline[.
    DESCRIBE TABLE i_objbin LINES v_lines_bin.
    READ TABLE i_objbin INDEX v_lines_bin.
    i_objhead = 'Frequentcaller list_Day.pdf'.
    APPEND i_objhead.
    ************Creating the entry for the attachment.
    CLEAR : i_objpack.
    i_objpack-transf_bin = 'X'.
    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 = 'PDF'.
    i_objpack-obj_name = 'ATTACHMENT'.
    i_objpack-obj_descr = 'FCA'.
    i_objpack-doc_size = v_lines_bin * 255 .
    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 = i_objhead
    contents_bin = i_objbin
    contents_txt = i_objtxt
    receivers = i_reclist
    EXCEPTIONS
    too_many_receivers = 1
    document_not_sent = 2
    operation_no_authorization = 4
    OTHERS = 99.
    This is all i am doing.
    It is sending a mail with the attachment but we are not able to open the attachment. it's giving an error like file is damaged and couldn't be repaired.
    I serched in the forum but i couldn't get the answer.
    I suspect there is a problem in getting the OTF data..
    Please help me in resolving this issue....
    Thanks in advance.
    RK

    Check the sample , and see where you made the mistake.
    REPORT ZPDF_MAIl.
    DATA:
      w_fm_name      TYPE rs38l_fnam,
      w_bin_filesize TYPE i,
      w_filesize     TYPE i,
      w_lines_txt    TYPE i,
      w_lines_bin    TYPE i.
    DATA:
      wa_ctrlop   TYPE ssfctrlop,
      wa_outopt   TYPE ssfcompop,
      wa_objhead  TYPE soli_tab,
      wa_buffer   TYPE string,
      wa_doc_chng TYPE sodocchgi1.
    DATA:
      BEGIN OF t_mail_ids OCCURS 0,
        mailid TYPE ad_smtpadr,
      END OF t_mail_ids,
      t_otfdata TYPE ssfcrescl,
      t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
      t_pdf_tab TYPE tline OCCURS 0 WITH HEADER LINE,
      t_objpack LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
      t_objtxt LIKE solisti1 OCCURS 0 WITH HEADER LINE,
      t_objbin LIKE solisti1 OCCURS 0 WITH HEADER LINE,
      t_record LIKE solisti1 OCCURS 0 WITH HEADER LINE,
      t_reclist LIKE somlreci1 OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
      EXPORTING
        formname           = 'Z195_TEST'
      IMPORTING
        fm_name            = w_fm_name
      EXCEPTIONS
        no_form            = 1
        no_function_module = 2
        OTHERS             = 3.
    IF sy-subrc EQ 0.
    ENDIF.                               " IF sy-subrc EQ 0.
    wa_ctrlop-getotf = 'X'.
    wa_ctrlop-no_dialog = 'X'.
    wa_outopt-tdnoprev = 'X'.
    CALL FUNCTION w_fm_name
      EXPORTING
        control_parameters = wa_ctrlop
        output_options     = wa_outopt
        user_settings      = 'X'
      IMPORTING
        job_output_info    = t_otfdata
      EXCEPTIONS
        formatting_error   = 1
        internal_error     = 2
        send_error         = 3
        user_canceled      = 4
        OTHERS             = 5.
    IF sy-subrc EQ 0.
    ENDIF.                               " IF sy-subrc EQ 0.
    t_otf[] = t_otfdata-otfdata[].
    CALL FUNCTION 'CONVERT_OTF'
      EXPORTING
        format                = 'PDF'
        max_linewidth         = 132
      IMPORTING
        bin_filesize          = w_bin_filesize
      TABLES
        otf                   = t_otf
        lines                 = t_pdf_tab
      EXCEPTIONS
        err_max_linewidth     = 1
        err_format            = 2
        err_conv_not_possible = 3
        err_bad_otf           = 4
        OTHERS                = 5.
    IF sy-subrc EQ 0.
    ENDIF.                               " IF sy-subrc EQ 0.
    LOOP AT t_pdf_tab.
      TRANSLATE t_pdf_tab USING '~'.
      CONCATENATE wa_buffer t_pdf_tab INTO wa_buffer.
    ENDLOOP.
    TRANSLATE wa_buffer USING '~'.
    DO.
      t_record = wa_buffer.
      APPEND t_record.
      SHIFT wa_buffer LEFT BY 255 PLACES.
      IF wa_buffer IS INITIAL.
        EXIT.
      ENDIF.
    ENDDO.
    t_objtxt = ' To Change the COR, Use the Transaction ZCOR_CHANGE'.
    APPEND t_objtxt.
    t_objtxt = ' Check the Attached PDF file for COR'.
    APPEND t_objtxt.
    DESCRIBE TABLE t_objtxt LINES w_lines_txt.
    READ TABLE t_objtxt INDEX w_lines_txt.
    READ TABLE t_objtxt INDEX w_lines_txt.
    wa_doc_chng-obj_name = 'COR Display'.
    wa_doc_chng-expiry_dat = sy-datum + 10.
    CONCATENATE 'COR' "w_cornr
                '-' "w_stat_descr w_action_desc
           INTO wa_doc_chng-obj_descr SEPARATED BY space.
    wa_doc_chng-sensitivty = 'F'.
    wa_doc_chng-doc_size =  w_lines_txt  * 255.
    CLEAR t_objpack-transf_bin.
    t_objpack-head_start = 1.
    t_objpack-head_num = 0.
    t_objpack-body_start = 1.
    t_objpack-body_num = w_lines_txt.
    t_objpack-doc_type = 'RAW'.
    APPEND t_objpack.
    t_objpack-transf_bin = 'X'.
    t_objpack-head_start = 1.
    t_objpack-head_start = 1.
    t_objpack-head_num = 0.
    t_objpack-body_start = 1.
    DESCRIBE TABLE t_objbin LINES w_lines_bin.
    READ TABLE t_objbin INDEX w_lines_bin.
    t_objpack-doc_size = w_lines_bin * 255 .
    t_objpack-body_num = w_lines_bin.
    t_objpack-doc_type = 'PDF'.
    t_objpack-obj_name = 'COR'.
    t_objpack-obj_descr = 'COR Test'.
    * concatenate 'COR' w_cornr into t_objpack-obj_descr
    *                           separated by space.
    APPEND t_objpack.
    *LOOP AT t_mail_ids.
      CLEAR t_reclist.
      t_reclist-receiver = 'INTENATEMAIL'.
      t_reclist-rec_type = 'U'.
      APPEND t_reclist.
    *ENDLOOP.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
      EXPORTING
        document_data              = wa_doc_chng
        put_in_outbox              = 'X'
        commit_work                = 'X'
      TABLES
        packing_list               = t_objpack
        object_header              = wa_objhead
        contents_bin               = t_objbin
        contents_txt               = t_objtxt
        receivers                  = t_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 EQ 0.
    ENDIF.

  • Facing the Error while opening the PDF Document generated by Adobe Forms

    Hi,
    I have created an Custom Adobe Form and calling this form through a Custom Program and generating the PDF and could able to download on to my desktop but when i am tyring to open it i m facing the below Error.
    "There was an error opening this document. The file is damaged and could not be repaired" .
    Please help me in this regard ASAP.
    Please do find the attached error screen shot.
    Thanks
    Sushil

    Hi Naveen ,
    Have done as per the link but still not opening
    same error.
    I have created a print program and from there want to generate pdf. But it is not working.
    please find the below code : In this i am passing some tables to function module and output is formoutput of type fpformoutput.
    Where do i need to do any changes if required.
    data: lst_opparam     type sfpoutputparams.
       data: lst_docparam    type sfpdocparams.
       data: lfd_fname type funcname.
       data: lrf_cx_root     type ref to cx_root.
       clear: lst_opparam, lst_docparam.
       lst_opparam-getpdf   = 'X'.
       lst_opparam-preview = 'X'.
    *  lst_opparam-nodialog   = 'X'.
       call function 'FP_JOB_OPEN'
         changing
           ie_outputparams       = lst_opparam
      exceptions
        cancel                = 1
        usage_error           = 2
        system_error          = 3
        internal_error        = 4
        others                = 5
       if sy-subrc <> 0.
    * Implement suitable error handling here
       endif.
       try.
           call function 'FP_FUNCTION_MODULE_NAME'
             exporting
               i_name     = 'ZAFGLERC001'
             importing
               e_funcname = lfd_fname.
    *   E_INTERFACE_TYPE           =
    *   EV_FUNCNAME_INBOUND        =
         catch cx_root into lrf_cx_root.
       endtry.
       lst_docparam-langu = 'EN'.
       lst_docparam-country = 'IN'.
    call function lfd_fname      "   '/1BCDWB/SM00000213'
      exporting
        /1bcdwb/docparams        = lst_docparam
        appl                     = 'EREC_ONBRD'
        wa_ztbglerc049           = wa_ztbglerc049
        wa_ztbglerc050           = wa_ztbglerc050
        it_51                    = it_51
        wa_41                    = wa_41
        it_42                    = it_42
        wa_43                    = wa_43
        it_44                    = it_44
        it_45                    = it_45
        it_46                    = it_46
        it_47                    = it_47
        it_48                    = it_48
      importing
        /1bcdwb/formoutput       = formoutput
      exceptions
        usage_error              = 1
        system_error             = 2
        internal_error           = 3
        others                   = 4
    if sy-subrc <> 0.
    * Implement suitable error handling here
    endif.
       call function 'FP_JOB_CLOSE'
    * IMPORTING
    *   E_RESULT             =
    exceptions
      usage_error          = 1
      system_error         = 2
      internal_error       = 3
      others               = 4
       if sy-subrc <> 0.
    * Implement suitable error handling here
       endif.

  • Error while opening the Pdf Attachment  at the time sending mail ..

    Hi Frn's ,
       i am sending a mail with pdf attachment ... but the pdf is not opening ...it is giving error "There was and error opening this document . This file can not be open because it has no page ."
    Please resolve the problem ...below is the code pasted ..
    REPORT  ZPRI_TEST_LDB.
    DATA: it_pdf LIKE tline OCCURS 0 WITH HEADER LINE .
    Spool to PDF conversions
    DATA: gd_spool_nr LIKE tsp01-rqident,
          gd_destination LIKE rlgrap-filename,
          gd_bytecount LIKE tst01-dsize,
          gd_buffer TYPE string.
    DATA:  w_recsize TYPE i.
    DATA: gd_recsize TYPE i.
    DATA: gd_subject   LIKE sodocchgi1-obj_descr,
          it_mess_bod LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          gd_sender_type     LIKE soextreci1-adr_typ,
          gd_attachment_desc TYPE so_obj_nam,
          gd_attachment_name TYPE so_obj_des.
    data:     gd_error    TYPE sy-subrc,
          gd_reciever TYPE sy-subrc.
    PARAMETER: p_email1 LIKE somlreci1-receiver
                                        DEFAULT 'abc,
              p_sender LIKE somlreci1-receiver
                                        DEFAULT 'abc'.
    perform write_output .
    perform create_pdf .
    PERFORM process_email .
    FORM WRITE_OUTPUT .
      write:'Listed below are the employees in your area who are due a Performance Appraisal'.
      write:'during the month of May 2009 .A performance appraisal form can be found on-line'.
      write: 'in the MUD template section .The Performance Appraisal is to be completed and' .
      write:'discussed with the employee by the immediate supervisor .Signed forms should be '.
      write: 'returned to the Human Resource Department by May 31,2009 .'.
      skip 2 .
      write: 'employee name' .
      write: 'Job Date' .
      write: 'Date of last appraisal' .
    ENDFORM.                    " WRITE_OUTPUT
    FORM CREATE_PDF .
      DATA:  spoolno LIKE tsp01-rqident.
      DATA : p_repid LIKE sy-repid .
      DATA: v_len  TYPE i , v_len1  TYPE i .
      DATA: v_temp(8) TYPE c .
      DATA: p_uname LIKE sy-uname .
      DATA: it_tsp01 TYPE STANDARD TABLE OF tsp01 WITH HEADER LINE .
    DATA: it_pdf LIKE tline OCCURS 0 WITH HEADER LINE .
      TABLES: tsp01.
      data: var  type c .
    *-- STRUCTURES
      DATA:
        lc_rq2name LIKE tsp01-rq2name.
      DATA:
        mstr_print_parms LIKE pri_params,
        mc_valid(1)      TYPE c,
        mi_bytecount     TYPE i,
        mi_length        TYPE i,
        mi_rqident       LIKE tsp01-rqident.
    *-- INTERNAL TABLES
      DATA:
        mtab_pdf    LIKE tline OCCURS 0 WITH HEADER LINE,
        mc_filename LIKE rlgrap-filename.
    *-- SELECTION SCREEN
      DATA:
        p_linsz LIKE sy-linsz VALUE 132, " Line size
        p_paart LIKE sy-paart VALUE 'X_65_132'.  " Paper Format
    *-- Setup the Print Parmaters
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
        EXPORTING
          authority              = space
          copies                 = '1'
          cover_page             = space
          data_set               = space
          department             = space
          destination            = space
          expiration             = '1'
          immediately            = space
          new_list_id            = 'X'
          no_dialog              = 'X'
          user                   = sy-uname
        IMPORTING
          out_parameters         = mstr_print_parms
          valid                  = mc_valid
        EXCEPTIONS
          archive_info_not_found = 1
          invalid_print_params   = 2
          invalid_archive_params = 3
          OTHERS                 = 4.
    *-- Explicitly set line width, and output format so that
    *-- the PDF conversion comes out OK
      mstr_print_parms-linsz = p_linsz.
      mstr_print_parms-paart = p_paart.
    importing variable value set at first time to restrict the infinite loop .
      IMPORT var FROM MEMORY ID 'abc' .
      var = var + 1 .
      p_uname = sy-uname .
      p_repid = sy-repid .
    *checking variable to restricted scecond time exction of this block of code
      IF var = 1 .
       v_memid = 1 .
        EXPORT var TO MEMORY ID 'abc' .
    start ----p3d(02/13/2009)
    EXPORT it_pernr it_pernr_quali v_memid it_pernr_status
               p_file  p_file1 rb_pres rb_app rb2 TO MEMORY ID 'bcd' .
       EXPORT it_pernr it_pernr_quali v_memid it_pernr_status it_notqualified
                        p_file  p_file1 rb_pres rb_app rb1 rb2 rb3 rb4 TO MEMORY ID 'bcd' .
        EXPORT it_pernr it_pernr_quali v_memid it_pernr_status it_notqualified
                    p_file  p_file1 rb_pres rb_app rb3 rb4 TO MEMORY ID 'bcd' .
    end ----p3d(02/13/2009)
    submitting the spool request
        SUBMIT (p_repid) TO SAP-SPOOL
                         SPOOL PARAMETERS mstr_print_parms
                         WITHOUT SPOOL DYNPRO
                         AND RETURN.
      ENDIF.
      FREE MEMORY ID 'abc'.
      FREE MEMORY ID 'bcd'.
    *Calculating the lenth of report name
      v_len = STRLEN( p_repid ) .
    *consutrucing the database variable  rq2name to search the spool request
      IF v_len >= 9 .
        CONCATENATE p_repid+0(9)
                    p_uname+0(3) INTO lc_rq2name .
      ELSE.
        v_len1 = 9 - v_len .
        DO v_len1 TIMES .
          CONCATENATE v_temp '_' INTO v_temp .
        ENDDO.
        CONCATENATE p_repid v_temp
                    p_uname INTO lc_rq2name .
      ENDIF.
    *selecting the spool request using the above consructed varibale
      SELECT * FROM tsp01 INTO TABLE it_tsp01
              WHERE rq2name = lc_rq2name .
    *sorting the interbla table
      SORT  it_tsp01 BY rqcretime DESCENDING .
    *reading the first spool request
      READ TABLE it_tsp01 INDEX 1.
    *converting the spool request into pdf
      CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
        EXPORTING
          src_spoolid              = it_tsp01-rqident
         dst_device               = 'LP01'
        TABLES
          pdf                      = it_pdf
        EXCEPTIONS
          err_no_abap_spooljob     = 1
          err_no_spooljob          = 2
          err_no_permission        = 3
          err_conv_not_possible    = 4
          err_bad_destdevice       = 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
          OTHERS                   = 12.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    CHECK sy-subrc = 0.
    Transfer the 132-long strings to 255-long strings
      LOOP AT it_pdf.
        TRANSLATE it_pdf USING ' ~'.
        CONCATENATE gd_buffer it_pdf INTO gd_buffer.
      ENDLOOP.
      TRANSLATE gd_buffer USING '~ '.
      DO.
        it_mess_att = gd_buffer.
        APPEND it_mess_att.
        SHIFT gd_buffer LEFT BY 255 PLACES.
        IF gd_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    ENDFORM.                    " CREATE_PDF
    FORM SEND_eMAIL using p_email .
    REFRESH it_mess_bod.
    Default subject matter
      gd_subject         = 'Subject'.
      gd_attachment_desc = 'Attachname'.
    CONCATENATE 'attach_name' ' ' INTO gd_attachment_name.
      it_mess_bod        = 'Message Body text, line 1'.
      APPEND it_mess_bod.
      it_mess_bod        = 'Message Body text, line 2...'.
      APPEND it_mess_bod.
    If no sender specified - default blank
      IF p_sender EQ space.
        gd_sender_type  = space.
      ELSE.
        gd_sender_type  = 'INT'.
      ENDIF.
    Send file by email as .xls speadsheet
      PERFORM send_file_as_email_attachment
                                   tables it_mess_bod
                                          it_mess_att
                                    using p_email
                                          'Example .xls documnet attachment'
                                          'PDF'
                                          gd_attachment_name
                                          gd_attachment_desc
                                          p_sender
                                          gd_sender_type
                                 changing gd_error
                                          gd_reciever.
    ENDFORM.                    " SEND_MAIL
    FORM process_email.
      DESCRIBE TABLE it_mess_att LINES gd_recsize.
      CHECK gd_recsize > 0.
      PERFORM send_email using p_email1 . .
    perform send_email using p_email2.
    ENDFORM.
    FORM send_file_as_email_attachment tables it_message
                                              it_attach
                                        using p_email
                                              p_mtitle
                                              p_format
                                              p_filename
                                              p_attdescription
                                              p_sender_address
                                              p_sender_addres_type
                                     changing p_error
                                              p_reciever.
      DATA: ld_error    TYPE sy-subrc,
            ld_reciever TYPE sy-subrc,
            ld_mtitle LIKE sodocchgi1-obj_descr,
            ld_email LIKE  somlreci1-receiver,
            ld_format TYPE  so_obj_tp ,
            ld_attdescription TYPE  so_obj_nam ,
            ld_attfilename TYPE  so_obj_des ,
            ld_sender_address LIKE  soextreci1-receiver,
            ld_sender_address_type LIKE  soextreci1-adr_typ,
            ld_receiver LIKE  sy-subrc.
    data:   t_packing_list like sopcklsti1 occurs 0 with header line,
            t_contents like solisti1 occurs 0 with header line,
            t_receivers like somlreci1 occurs 0 with header line,
            t_attachment like solisti1 occurs 0 with header line,
            t_object_header like solisti1 occurs 0 with header line,
            w_cnt type i,
            w_sent_all(1) type c,
            w_doc_data like sodocchgi1.
      ld_email   = p_email.
      ld_mtitle = p_mtitle.
      ld_format              = p_format.
      ld_attdescription      = p_attdescription.
      ld_attfilename         = p_filename.
      ld_sender_address      = p_sender_address.
      ld_sender_address_type = p_sender_addres_type.
    Fill the document data.
      w_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
      w_doc_data-obj_langu = sy-langu.
      w_doc_data-obj_name  = 'SAPRPT'.
      w_doc_data-obj_descr = ld_mtitle .
      w_doc_data-sensitivty = 'F'.
    Fill the document data and get size of attachment
      CLEAR w_doc_data.
      READ TABLE it_attach INDEX w_cnt.
      w_doc_data-doc_size =
         ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
      w_doc_data-obj_langu  = sy-langu.
      w_doc_data-obj_name   = 'SAPRPT'.
      w_doc_data-obj_descr  = ld_mtitle.
      w_doc_data-sensitivty = 'F'.
      CLEAR t_attachment.
      REFRESH t_attachment.
      t_attachment[] = it_attach[].
    Describe the body of the message
      CLEAR t_packing_list.
      REFRESH t_packing_list.
      t_packing_list-transf_bin = space.
      t_packing_list-head_start = 1.
      t_packing_list-head_num = 0.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE it_message LINES t_packing_list-body_num.
      t_packing_list-doc_type = 'RAW'.
      APPEND t_packing_list.
    Create attachment notification
      t_packing_list-transf_bin = 'X'.
      t_packing_list-head_start = 1.
      t_packing_list-head_num   = 1.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
      t_packing_list-doc_type   =  ld_format.
      t_packing_list-obj_descr  =  ld_attdescription.
      t_packing_list-obj_name   =  ld_attfilename.
      t_packing_list-doc_size   =  t_packing_list-body_num * 255.
      APPEND t_packing_list.
    Add the recipients email address
      CLEAR t_receivers.
      REFRESH t_receivers.
      t_receivers-receiver = ld_email.
      t_receivers-rec_type = 'U'.
      t_receivers-com_type = 'INT'.
      t_receivers-notif_del = 'X'.
      t_receivers-notif_ndel = 'X'.
      APPEND t_receivers.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
           EXPORTING
                document_data              = w_doc_data
                put_in_outbox              = 'X'
                sender_address             = ld_sender_address
                sender_address_type        = ld_sender_address_type
                commit_work                = 'X'
           IMPORTING
                sent_to_all                = w_sent_all
           TABLES
                packing_list               = t_packing_list
                contents_bin               = t_attachment
                contents_txt               = it_message
                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.
    Populate zerror return code
      ld_error = sy-subrc.
    Populate zreceiver return code
      LOOP AT t_receivers.
        ld_receiver = t_receivers-retrn_code.
      ENDLOOP.
    ENDFORM.
    Thanks and Regards ..
    Priyank

    hi this is the part of code ...
    PERFORM process_email .
    CHECK sy-subrc = 0.
    Transfer the 132-long strings to 255-long strings
      LOOP AT it_pdf.
        TRANSLATE it_pdf USING ' ~'.
        CONCATENATE gd_buffer it_pdf INTO gd_buffer.
      ENDLOOP.
      TRANSLATE gd_buffer USING '~ '.
      DO.
        it_mess_att = gd_buffer.
        APPEND it_mess_att.
        SHIFT gd_buffer LEFT BY 255 PLACES.
        IF gd_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    ENDFORM.                    " CREATE_PDF
    FORM process_email.
      DESCRIBE TABLE it_mess_att LINES gd_recsize.
      CHECK gd_recsize > 0.
      PERFORM send_email using p_email1 . .
    perform send_email using p_email2.
    ENDFORM.
    FORM SEND_eMAIL using p_email .
    REFRESH it_mess_bod.
    Default subject matter
      gd_subject         = 'Subject'.
      gd_attachment_desc = 'Attachname'.
    CONCATENATE 'attach_name' ' ' INTO gd_attachment_name.
      it_mess_bod        = 'Message Body text, line 1'.
      APPEND it_mess_bod.
      it_mess_bod        = 'Message Body text, line 2...'.
      APPEND it_mess_bod.
    If no sender specified - default blank
      IF p_sender EQ space.
        gd_sender_type  = space.
      ELSE.
        gd_sender_type  = 'INT'.
      ENDIF.
    Send file by email as .xls speadsheet
      PERFORM send_file_as_email_attachment
                                   tables it_mess_bod
                                          it_mess_att
                                    using p_email
                                          'Example .xls documnet attachment'
                                          'PDF'
                                          gd_attachment_name
                                          gd_attachment_desc
                                          p_sender
                                          gd_sender_type
                                 changing gd_error
                                          gd_reciever.
    ENDFORM.                    " SEND_MAIL
    FORM send_file_as_email_attachment tables it_message
                                              it_attach
                                        using p_email
                                              p_mtitle
                                              p_format
                                              p_filename
                                              p_attdescription
                                              p_sender_address
                                              p_sender_addres_type
                                     changing p_error
                                              p_reciever.
      DATA: ld_error    TYPE sy-subrc,
            ld_reciever TYPE sy-subrc,
            ld_mtitle LIKE sodocchgi1-obj_descr,
            ld_email LIKE  somlreci1-receiver,
            ld_format TYPE  so_obj_tp ,
            ld_attdescription TYPE  so_obj_nam ,
            ld_attfilename TYPE  so_obj_des ,
            ld_sender_address LIKE  soextreci1-receiver,
            ld_sender_address_type LIKE  soextreci1-adr_typ,
            ld_receiver LIKE  sy-subrc.
    data:   t_packing_list like sopcklsti1 occurs 0 with header line,
            t_contents like solisti1 occurs 0 with header line,
            t_receivers like somlreci1 occurs 0 with header line,
            t_attachment like solisti1 occurs 0 with header line,
            t_object_header like solisti1 occurs 0 with header line,
            w_cnt type i,
            w_sent_all(1) type c,
            w_doc_data like sodocchgi1.
      ld_email   = p_email.
      ld_mtitle = p_mtitle.
      ld_format              = p_format.
      ld_attdescription      = p_attdescription.
      ld_attfilename         = p_filename.
      ld_sender_address      = p_sender_address.
      ld_sender_address_type = p_sender_addres_type.
    Fill the document data.
      w_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
      w_doc_data-obj_langu = sy-langu.
      w_doc_data-obj_name  = 'SAPRPT'.
      w_doc_data-obj_descr = ld_mtitle .
      w_doc_data-sensitivty = 'F'.
    Fill the document data and get size of attachment
      CLEAR w_doc_data.
      READ TABLE it_attach INDEX w_cnt.
      w_doc_data-doc_size =
         ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
      w_doc_data-obj_langu  = sy-langu.
      w_doc_data-obj_name   = 'SAPRPT'.
      w_doc_data-obj_descr  = ld_mtitle.
      w_doc_data-sensitivty = 'F'.
      CLEAR t_attachment.
      REFRESH t_attachment.
      t_attachment[] = it_attach[].
    Describe the body of the message
      CLEAR t_packing_list.
      REFRESH t_packing_list.
      t_packing_list-transf_bin = space.
      t_packing_list-head_start = 1.
      t_packing_list-head_num = 0.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE it_message LINES t_packing_list-body_num.
      t_packing_list-doc_type = 'RAW'.
      APPEND t_packing_list.
    Create attachment notification
      t_packing_list-transf_bin = 'X'.
      t_packing_list-head_start = 1.
      t_packing_list-head_num   = 1.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
      t_packing_list-doc_type   =  ld_format.
      t_packing_list-obj_descr  =  ld_attdescription.
      t_packing_list-obj_name   =  ld_attfilename.
      t_packing_list-doc_size   =  t_packing_list-body_num * 255.
      APPEND t_packing_list.
    Add the recipients email address
      CLEAR t_receivers.
      REFRESH t_receivers.
      t_receivers-receiver = ld_email.
      t_receivers-rec_type = 'U'.
      t_receivers-com_type = 'INT'.
      t_receivers-notif_del = 'X'.
      t_receivers-notif_ndel = 'X'.
      APPEND t_receivers.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
           EXPORTING
                document_data              = w_doc_data
                put_in_outbox              = 'X'
                sender_address             = ld_sender_address
                sender_address_type        = ld_sender_address_type
                commit_work                = 'X'
           IMPORTING
                sent_to_all                = w_sent_all
           TABLES
                packing_list               = t_packing_list
                contents_bin               = t_attachment
                contents_txt               = it_message
                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.
    Populate zerror return code
      ld_error = sy-subrc.
    Populate zreceiver return code
      LOOP AT t_receivers.
        ld_receiver = t_receivers-retrn_code.
      ENDLOOP.
    ENDFORM.

  • Error while opening the installation file

    when i run my installation file, and click 'run', the following error appears: "the program can't start because MSVCR100.dll is missing from your computer. try reinstalling the program to fix this problem". what do i do?

    Hi,
    Can you pls. let us know which installer are you using (Reader/Acrobat). List down the exact steps that you are following.
    Also let us know the answer of the following queries:
    1. OS version and Language
    2. CPU architecture
    3. Installer downloaded and language
    You can download the Adobe Reader installer from the following link.
    http://get.adobe.com/reader/enterprise/
    Thanks,
    Vinod

  • "The server is unavailable this is offline copy of the server workbook" error while opening the sharepoint library file

    Hi Techys,
    can you give me the suugestions for below error in sharepoint 2010.
    Error: "The server is unavailable this is offline copy of the server workbook" error while opening the sharepoint library file.
    User having the contribute permission.
    as a admin i can open the document without any error.
    user wants to open the document via online and VPN connection.
    while the user seeing the document info the below error is indicationg .
    Offline Copy, Work book is readonly Mode.
    The server is unavailable this is offline copy of the server workbook" error while opening the sharepoint library file which was upto date.
    Many Thanks,
    Madhu

    Make sure that the user is able to access workstream from the site collection through VPN. If the user is able to access already, try to download the file locally and see if the data is getting loaded and upload again.
    --Cheers

Maybe you are looking for

  • App-V and Microsoft Office 2013 Home Premium O365 Edition - Is it possible?

    Hello, Over the past couple of days I have been trying to sequence Office into an App-V app. As far as I can tell, the app is created successfully, the problem is publishing the app and actually installing it on clients. I have tried to get this to w

  • Preview check box

    Hi, I'm sure there's a simple way to do this that I just don't know about (somewhat new to AI). When I'm using the "scale" dialog box to scale an object, or "rotate", or the "round corners" function (just to name a few), the "preview" check box is al

  • Wont print 12 x 12 paper

    I have a HP Large format printer,  HP Officejet 7610.  When I first got it I used to be able to print on 12 x 12 paper, that size showed as an option when I went to print.  Well, I didn't try it for a long time, now when I go to print the 12 x 12 siz

  • Abobe Illustrator CS3 Classroom in a book.

    Can anyone help me with this problem? Not only new to my laptop and Windows 7 I have recently bought the above book and for the life of me on page 3 I cannot restore my default settings for Adobe Illustrator CS3 having tried to follow the instruction

  • Error When Installing X11...

    I was trying to install X11 so I can use GIMP, a free photoshop like program. Anyways, when trying to instal, it says "You Cannnot install X11 on this volume. Software already exists on your computer. I was trying to install it on the Macintosh HD. I