PDF opening error for smartform

Hi All.
after excuting dmartform ,
it will generated Pdf and sending to mail.
when iam opening pdf file in SOST transaction or mail
it will giving error like " There was on error opening this  document. this file is damaged and could not be repaired.
how should overcome this issue.
saimedha

Hi saimedhaa ,
What Karthik said is correct
i faced same problem
please check wheter OTF conversion hapen or not
    gt_otfdata is having data or not
if it have data than u will not get any problem

Similar Messages

  • SCMS_AO_TABLE_GET - PDF Open Error

    Hi All,
    Iu2019ve a required to attach a vendor invoice attached to Miro document stored using Archive Link.
    I'm using SCMS_AO_TABLE_GET to get the archived document into internal table. The internal table is in binary format (1024).
    Inoder to convert binary internal table from 1024 to 255 as required by SO_DOCUMENT_SEND_API1, I am converting the raw data using FM SCMS_BINARY_TO_FTEXT and followed by another function module to convert it to solisti1.
    I do get an email with a PDF attached but when I click on PDF, it gives an error. Looks like there is some problem decoding the data.
    Please help!
    Hereu2019s my piece of code.
       DATA: binobject      LIKE TBL1024 OCCURS 200,
             archivobject   LIKE DOCS    OCCURS 200 WITH HEADER LINE,
             length_bin     TYPE I,
             length_att     TYPE I,
             length_archive LIKE SAPB-LENGTH.
       REFRESH: binobject, attachment.
       CALL FUNCTION 'SCMS_AO_TABLE_GET'
         EXPORTING
             ARC_ID          = archiv_id
             DOC_ID          = arc_doc_id
             COMP_ID         = 'data'
         IMPORTING
             LENGTH          = length_bin
         TABLES
             DATA            = binobject
         EXCEPTIONS
             error_http      = 1
             error_archiv    = 2
             error_kernel    = 3
             error_config    = 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
                  RAISING ERROR_RETRIEVAL.
       ENDIF.
       CALL FUNCTION 'SCMS_BINARY_TO_FTEXT'
          EXPORTING
             input_length         = length_bin
          IMPORTING
            output_length         = length_att
          TABLES
            binary_tab            = binobject
            ftext_tab             = archivobject
          EXCEPTIONS
            failed                = 1
            others                = 2.
        IF sy-subrc <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4
                  RAISING ERROR_RETRIEVAL.
        ENDIF.
        length_att = length_bin.
        length_archive = length_att.
        CALL FUNCTION 'Z_WF_CONVERT_DOCTABLE_2_OFFICE'
           EXPORTING
              LENGTH             = length_archive
           TABLES
              ARCHIVOBJECT       = archivobject
              ATTACHMENT         = lt_objbin.
        length = length_archive.
    Email Attachment Details
        CLEAR l_tab_lines.
        DESCRIBE TABLE lt_objbin LINES l_tab_lines.
    Creation of the entry for the compressed attachment
        l_objpack-transf_bin = 'X'.
        l_objpack-head_start = 1.
        l_objpack-head_num   = 1.
        l_objpack-body_start = 1.
        l_objpack-doc_type   = 'PDF'.
        l_objpack-obj_name   = l_obj.
        l_objpack-obj_descr  = l_obj.
        l_objpack-body_num   = l_tab_lines.
        l_objpack-doc_size   = l_tab_lines * l_c_255.
        APPEND l_objpack TO lt_objpack.
        CLEAR  l_objpack.
    Completing the recipient list
        l_reclist-receiver = p_email.
        l_reclist-express  = 'X'.
        l_reclist-rec_type = 'U'.
        APPEND l_reclist TO lt_reclist.
        CLEAR  l_reclist.
        CONCATENATE 'GOS Attachment'(018)
                     sy-datum  INTO l_obj SEPARATED BY space.
        APPEND l_obj TO lt_objhead.
    Email Body Details
        CLEAR l_tab_lines.
        DESCRIBE TABLE lt_objtxt LINES l_tab_lines.
        l_doc_chng-doc_size = ( l_tab_lines - 1 ) * 255 +
                                STRLEN( l_string ).  "size of doc in bytes
        l_doc_chng-obj_name = sy-repid.
        l_doc_chng-obj_langu = sy-langu.
        l_doc_chng-obj_descr = l_string.
        l_doc_chng-sensitivty = 'P'.  
    Send the document
        CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
          EXPORTING
            document_data              = l_doc_chng
            put_in_outbox              = ' '
            commit_work                = 'X'
          TABLES
            packing_list               = lt_objpack
            object_header              = lt_objhead
            contents_bin               = lt_objbin
            contents_txt               = lt_objtxt
           contents_hex               =  lt_contents_hex
            receivers                  = lt_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.
    ENDFUNCTION.
    FUNCTION Z_WF_CONVERT_DOCTABLE_2_OFFICE.
    ""Lokale Schnittstelle:
    *"  IMPORTING
    *"     VALUE(LENGTH) LIKE  SAPB-LENGTH
    *"  TABLES
    *"      ARCHIVOBJECT STRUCTURE  DOCS
    *"      ATTACHMENT STRUCTURE  SOLISTI1
    Die ArchiveLink-API liefert das Dokument in einer internen
    Tabelle, der Länge 1024 zurück.
    SAP-Office-API benötigt eine interne Tabelle der Länge 255.
    Diese Funktion konvertiert von der ArchiveLink-Tabelle in
    die SAP-Office konforme Tabelle.
       DATA: currentPos   TYPE I,   " Zeiger auf die Leseposition in
                                    " der ArchiveLink-Tabelle
             writePos     TYPE I,   " Zeiger auf Schreibposition
             remain       TYPE I,   " Anzahl Zeichen in der aktuellen
                                    " Zeile des ArchiveLink-Objektes,
                                    " Max=255
             written      TYPE I,   " Anzahl bytes übertragen
             targetLines  TYPE I,   " Größe der Zieltabelle in Zeilen
             lines_attachment TYPE I,  " Anzahl der Zeilen im Attachement.
             currentIndex TYPE I, " Aktuelle Zeile in der Quelltab.
             line_out(255) TYPE C,
             line_attachment TYPE solix,
             line_len     TYPE I.      " Länge derselbigen
       currentPos = 0.
       writePos   = 0.
       REFRESH: attachment.
       CLEAR: line_out, attachment.
       targetLines = length / 255.
       " Rest prüfen
       remain     = length - ( targetLines * 255 ).
       IF remain <> 0. " Ja, noch eine Restzeile
          ADD 1 TO targetLines.
       ENDIF.
       remain       = 255.     " Wieder initialisieren
       currentIndex = 1.
       WHILE lines_attachment <= targetLines.
          READ TABLE archivobject INDEX currentIndex.
          line_OutwritePos(remain) = archivobjectcurrentPos(remain).
           " Concat schluckt spaces
          written = remain.
          line_len = writePos + remain.   " writePos beginnt ja bei 1
          writePos = writePos + remain.
          IF writePos = 255. " Voll gefüllt, dann appenden
             APPEND line_out TO attachment.
             CLEAR line_out.
             writePos = 0.
          ELSEIF writePos > 255.
             " exception
          ENDIF.
          " Jetzt prüfen, ob dies bereits der Rest der Quell-Zeile war.
          " Wenn ja, dann müssen wir beim nächsten Durchlauf die
          " nächste Zeile lesen.
          IF currentPos > 769.
             ADD 1 TO currentIndex.
             " Und den Rest ausrechnen, mit dem die nächste Zeile
             " noch gefüllt werden muss.
             remain = currentPos + 255 - 1024.
    *---> Insert part IIId
             " Wenn die letzten Bytes exakt reingepaßt haben, dann eine
             " neue volle zeile lesen
             IF remain <= 0.
                remain = 255.
             ENDIF.
    *<---- end of Insert
             currentPos = 0.
          ELSE. " Die aktuelle Zeile enthält noch genügend Bytes, um
                " voll zu lesen.
             ADD written TO currentPos.   " Zeiger weiterschieben
             IF currentPos > 769.     " Nächste Zeile kann nicht mehr
                                      " voll gefüllt werden, da keine
                                      " 255 byte übrig sind
    *---> Insert part IIId
                IF currentPos >= 1024.   " Hat genau bis zum Ende gereicht
                   remain = 255.
                   ADD 1 TO currentIndex.
                   currentPos = 0.
                ELSE.
                   remain = 1024 - currentPos.  " Rest ausrechnen
                ENDIF.
    *<---- end of Insert
             ELSE.
                remain = 255.                " sonst voll befüllen
             ENDIF.
          ENDIF.
          DESCRIBE TABLE attachment LINES lines_attachment.
       ENDWHILE.
    ENDFUNCTION.

    Hi Sandra,
    I get the arc_id from the TOA01 table.
    The result of the data parameter is a HTML file saying that file doesnt exist.
    But, when I access the OAR transaction, the file is there.
    Thanks for helping

  • PDF Preview Error for ISR Form in tcode SFP...................

    Hello All,
    Have few issues regarding ISR.
    Q1. I am trying to copy existing standard PDF Form <b>ISR_FORM_SRQ2</b> from  Transaction <b>SFP</b> but ....
    If the Standard form has any layout then it gives me error <b>"Internal Error Occured  SAFP API"</b>
    If No layout is designed its blank then it allow me to copy that Form.
    Q2. Also If I try to Preview PDF i get this Information
           Script failed(Language is FormCalc , Context os data..*...etc
                              Controlparameter ISR Mode = Display........................
    In case you want to refer the entire error message, please mail me on <i><b>[email protected]</b></i> & ill forward the same to you.
    Awaiting Reply.
    Thanks,
    Smita

    Hi,
                Please check the XDP file size of the original form..that you are trying
                to copy...( in the command line type-FB_XDP_DOWN )..
               Check if the file size is more than 1 MB...there could be a problem..during
               copying ,saving and activating forms with more than 1MB...

  • Reader 9.4.0 pdf opening error "This document is trying to access the following database"

    Hi, I am having pdf save functionality using trusted functions in my application. earlier we used adobe reader 8.1.3 and it worked fine, now we upgraded to adobe reader 9.4.0 and there on the problem comes in. when ever we are saving it is creaing a code in DBConnects.sav file. we as having large number of users we use to push this file to the field. now that with this upgrade this file is becoming system depending. how can we get ridoff this. Please help me out.
    some of the sample data from my DBConnect.sav file as shown below. the code before Provider is appeding all the time.
    7DE10A1A000010000A002FF200203029, Provider=MSDASQL.1;Persist Security Info=False;User ID=pmxuser;Data Source=ides;Initial Catalog=ides
    E22BBE8EFFFF1FFF0A002FF1FF503028, Provider=MSDASQL.1;Persist Security Info=False;Data Source=edocExcel

    Thanks Paul for your response.
    While doing research I found out that Adobe generates a file called DBConnects.sav inside "C:\Documents and Settings\.....\Application Data\Adobe\Acrobat\8.0" which remebers the data connection. If I am making an entry of my data connection (eg. Provider=MSDASQL;Persist Security Info=False;Data Source=eDocMDB;) in this file then for all the forms which are having the same data connection is not asking any confirmation for allowing the data connection. Adobe made the same entry even If you check the checkbox "Remeber this choice" in the database confirmation dialog.
    Now the problem which I am facing is for Adobe Reader 9.4 version. Adobe 9.4 is also making an entry in DBConnects.sav file but now it is form dependent. It is appending an unique string before the actual data connection string. It is making an entry like "9805AD51FFFF1FFF0A002FF1FFE03028, Provider=MSDASQL;Persist Security Info=False;Data Source=eDocMDB;" in DBConnect.sav. Now even the other form is also using the same connection string, it is asking me to allow the connection at least once for each form. If I checking the remember choice at least once for each connection of each form, it works fine. Myforms are dynamic and they change everyday for every user. Please let me know if you have any idea so that Adobe 9.4 do not append the unique string before makning entry into DBConnects.sav.

  • Getting Runtime errors for smartforms in Quality.

    |    The function module " " is called,                                                         
    |    but cannot be found in the library.                                                      
    |                                                                               
    |    Error in the ABAP Application Program                                
    |                                                                               
    |    The current ABAP program "ZMMRFQ_SERVICE" had to be terminated because it has             
    |    come across a statement that unfortunately cannot be executed.    
    653|  SELECT SINGLE bedat FROM ekko INTO edate WHERE ebeln = p_ebeln.                          
    |  654|ENDFORM.                    " get_data                                                     
    |  663|FORM smartform .                                                                            |
    |  664|  CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'                                                  |
    |  665|      EXPORTING                                                                             |
    |  666|        formname                 = 'ZMM_RFQ_SERVICE'                                        |
    |  667|*   VARIANT                  = ' '                                                          |
    |  668|*   DIRECT_CALL              = ' '                                                          |
    |  669|      IMPORTING                                                                             |
    |  670|        fm_name                  = fm_name                                                  |
    |  671|      EXCEPTIONS                                                                            |
    |  672|        no_form                  = 1                                                        |
    |  673|        no_function_module       = 2                                                        |
    |  674|        OTHERS                   = 3.                                                       |
    |  675|                                                                                |
    |  676|  IF sy-subrc <> 0.                                                                         |
    |  677|    WRITE: / 'ERROR 1'.                                                                     |
    |  678|* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO                                         |
    |  679|*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.                                         |
    |  680|  ENDIF.                                                                                |
    |  681|                                                                                |
    |  682|*loop at t_final.                                                                           |
    |>>>>>|  CALL FUNCTION fm_name                                                                     |
    |  684| EXPORTING                                                                                |
    |  685|                                                                                |
    |  686|                                                                                |
    |  687|  control_parameters         = control                                                      |
    |  688|    output_options             = output_options                                             |
    |  689|    user_settings              = space  "'X'                                                |
    |  690|                                                                                |
    |  691|*    sum                    = sum                                                           |
    |  692|                                                                                |
    |  693|*    bdoc                     = bdoc                                                        |
    |  694|                                                                                |
    |  695|*     l_tlines1    =   l_tlines1                                                            |
    |  696|*      l_tlines2    =   l_tlines2                                                           |
    |  697|                                                                                |
    |  698|*      l_tlines3    =   l_tlines3                                                           |
    |  699|*                                                                                |
    |  700|*       l_tlines4    =   l_tlines4                                                          |
    |  701|*                                                                                |
    |  702|*       l_tlines5    =   l_tlines5                                                          |
    Any kind of help or inputs will be appreciated.
    Regards,
    Abhinab Mishra
    Edited by: Abhinab Mishra on Sep 4, 2009 2:52 PM

    Hi,
    put a break point at FM 'SSF_FUNCTION_MODULE_NAME' and  check what is the value you are gettting in variable fm_name, then go to SE37 and check the FM name in fm_name is available or not..
    Hope it helps!!
    Rgds,
    Pavan

  • Pdf open error

    Eine PDF-Datei kann unter Android nicht geöffnet werden. Unter Windows ist diese Datei zu öfnnen.
    Eine andere PDF-Datei kann in gleicher Situation unter beiden Betriebssystemen geöffnet werden.
    Can´t open PDF-File under Android, but same File could be opend under Windows.
    Another PDF-File could be opend under Android an Windows.

    I Found the problem:
    Android App can´t handle multiple layers in pdf-document

  • About  'PDF Open Parameters'  in Android environment.

    Hello;
    I'm writing an application for GalaxyTab.
    I need to show a specified page of the pdf file.
    So, I wrote the following code.
        Intent intent = new Intent(Intent.ACTION_VIEW);
        intent.setDataAndType(Uri.parse("file:///mnt/sdcard/download/mypdf_doc.pdf#page=3"), "application/pdf");
        this.startActivity(intent);
    In the 2nd line, I specified pag3 as described in 'PDF Open Parameters for Adobe Acrobat 7.0'.
    But the Acrobat Reader X always shows the top page.
    Could anyone help me?
    'PDF Open Parameter' says.
    URL Examples
    http://example.org/doc.pdf#nameddest=Chapter6
    http://example.org/doc.pdf#page=3
    http://example.org/doc.pdf#page=3&zoom=200,250,100
    Thank you.

    Thank you for your kind reply, Padlikar san.
    I'm happy that I can save my time to worry about this.
    Would you let me know when the feature will be implemented if you know.
    Regards,
    Kiharu

  • File open error at ftp even the file is not open.....

    Hi,
    i get the error File open with the fm GUI_UPLOAD while uploading the XML file from FTP server.
    What is interesting is that i did not open the file, furthermore i closed all the windows else that sap window,
    but still i get the file open error.
    We create the xml file when created a new delivery. And this xml file is sent to a bukrs's ftp and they also sent the same xml after some validations done.
    When it arrives to our ftp server i make it post goods issue automatically but from yesterday i got the file open error, it was working fine just before today.
    What could be the problem?
    Hint: Yesterday and previous day files still work fine but files created today are faulty.
    Thanks.

    Thanks for replies.
    My code is that:
    call function 'HTTP_SCRAMBLE'
        EXPORTING
          source      = gv_password
          sourcelen   = slen
          key         = gv_key
        IMPORTING
          destination = gv_password.
      describe field gv_password length gv_pwd_len in character mode.
      call function 'FTP_CONNECT'
        exporting
          user            = 'HHH\GrupMMM'
          password        = gv_password
          host            = '10.10.10.10' "assume that is the host
          rfc_destination = 'SAPFTPA'
        importing
          handle          = gv_handle
        exceptions
          not_connected   = 1
          others          = 2.
      if sy-subrc eq 0.
        "concatenate 'put' ld_full_path '[' ld_full_path ']'
        *gv_com = 'lcd C:\MMM\RETURN_FILES'.*
        clear mtab_data.
        free mtab_data.
        call function 'FTP_COMMAND'
          exporting
            handle        = gv_handle
            command       = gv_com
          tables
            data          = mtab_data
          exceptions
            tcpip_error   = 1
            command_error = 2
            data_error    = 3
            others        = 4.
        if sy-subrc eq 0.
        endif.
    When i get the list of the return files i get data of each file via gui_upload.
    CALL FUNCTION 'GUI_UPLOAD'
            EXPORTING
              filename   = filename
              filetype   = 'BIN'                             
            IMPORTING
              filelength = totalsize
            TABLES
              data_tab   = xml_table[]
            EXCEPTIONS
              FILE_READ_ERROR = 1
              FILE_OPEN_ERROR = 2
              NO_BATCH = 3
              GUI_REFUSE_FILETRANSFER = 4
              INVALID_TYPE = 5
              NO_AUTHORITY = 6
              UNKNOWN_ERROR = 7
              BAD_DATA_FORMAT = 8
              HEADER_NOT_ALLOWED = 9
              SEPARATOR_NOT_ALLOWED = 10
              HEADER_TOO_LONG = 11
              UNKNOWN_DP_ERROR = 12
              ACCESS_DENIED = 13
              DP_OUT_OF_MEMORY = 14
              DISK_FULL = 15
              DP_TIMEOUT = 16.
    However i get the open error for all files created today.
    By the way, how can i use open dataset instead of ftp commands? How can i see the files at apllication server?
    i get the files via IP of the FTP but how can i get files from application server?
    Thanks.

  • Some elements of downloaded PDF not showing (Error: "For the best experience, open this PDF portfolio...")

    I'm on a PC attempting to view a downloaded PDF. It's an application so the document is generated by our online system and aggregates info from the applicant as well as documents they uploaded. I can see most of the final product but the document uploaded by the applicant gives the error "For the best experience, open this PDF portfolio in Acrobat 9 or Adobe Reader 9, or later." I downloaded the latest Reader (DC) and when I searched to download the latest Flash Player I got a message that it should be up-to-date since I use Chrome. I've seen other folks having this problem; any suggestions?? Thanks in advance.

    Thanks for your response! The document appears the same either way. I downloaded the file and have opened it with both Adobe Acrobat and Adobe Acrobat Reader DC.

  • 'failed to open the PDF file' error - Indesign CS3 on Mac

    Hi,
    Whenever I place PDFs that were created by any other app besides indesign or Illustrator I get a 'failed to open the PDF file' error, previously these PDFs were fine to place but all of a sudden they're not... Help?
    I'm not too keen on opening in Illustrator and resaving for the rest of the foreseeable future either...
    Jared

    Thanks for the reminder, Scott.
    http://indesignsecrets.com/failed-to-open-pdf-error-show-options-to-fix-it.php
    Bob

  • Reader 9.3 produces Runtime error for all .pdf files on hard drive and email

    Does anyone have a resource that can show me how to eliminate a runtime error with Reader 9.3.1, Windows XP w/ SP3 and IE7. I have recently had all .pdf files located on my hard drive and in emails refuse to open because of this message:
    "Runtime Error!
    Program C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe
    This application has requested the Runtime to terminate it in an unusual way.  Please contact the application's support team for more information."
    So far, I have uninstalled and reinstalled Reader 9.3 from the website; added update 9.3.1 and tried to reopen files with no success.
    My organization sends a ton of .pdf files and it is not good when you can't open them for review and action.

    Hi All,
    Although I don't normally post in forums, I thought it prudent to lay this matther to rest.  I have tested the following solution:
    It appears that Adobe Reader likes to check access to each parent folder as well as the actual application data folder.  Apparantly there are other programs that also do similar things. As a result if you have your appdata redirected to \\server1\profiles\%username%\appdata adobe reader would first try directly access \\server1\profiles.  If the user does not have to Traverse folder permission, this fails. Typically you will need to change your permissions on you profile share from:
    -                   Users - Read Attributes (Apply to: This folder, subfolders and files)
    -                   Users - Read Extended Attributes (Apply to: This folder, subfolders and files)
    -                  Users - Create Folders/Append Data (Apply to: This folder, subfolders and files)
    -                   Users - Read Permissions (Apply to: This folder, subfolders and files)
    To the share permissions suggested by Microsoft in KB 274443:
    -                   Everyone - Create Folder/Append Data (Apply onto: This Folder Only)
    -                   Everyone - List Folder/Read Data (Apply onto: This Folder Only)
    -                   Everyone - Read Attributes (Apply onto: This Folder Only)
    -                   Everyone - Traverse Folder/Execute File (Apply onto: This Folder Only)
    Hopefully this helps everyone.

  • Error in Smartform: No output request open.End not possible..

    Hi Experts,
    I am getting below mentioned error while trying to execute smartform..
    NO OUTPUT REQUEST OPEN..END NOT POSSIBLE..
    Message no. SSFCOMPOSER154.
    Help me to resolve the issue..
    Thanks in advance..
    Hampanna Kamatar

    Hi experts,
    I am getting the same error and found found that its because ssfcstat-tdopen getting false in the FM ssfcomp_close.
    if ssfcstat-tdopen = c_false.
        err_comp ssf_err_close_unstarted 'A' 154 space space space space.
      endif.
    I want to know the reason why and where exactly the field is getting populated with c_false.
    ps: I am using a Zprogram and it PRINTS FOR FEW DELIVERIES AND THIS ERROR FOR FEW DELIVERIES.

  • PDF File opening error

    Hi,
    I have an BSP application in which I am fetching the pdf file data from an oracle table to a variable of data type xstring.
    Now I have to display this xstring again in pdf format in this BSP. The pdf file is generated but while opening it is giving error "There is an error in opening this document.The file is damaged and could not be repaired".
    What could be the reason.
    My On initialisation code is as:
    data: outputx type xstring.
    (The pdf file data is fetched from oracle table to outputx.)
    CREATE OBJECT cached_response TYPE CL_HTTP_RESPONSE EXPORTING add_c_msg
    = 1.
        cached_response->set_header_field( name  =
              if_http_header_fields=>content_type
                                      value = 'application/pdf' ).
        cached_response->set_status( code = 200 reason = 'OK' ).
        cached_response->server_cache_expire_rel( expires_rel = 180 ).
        l_pdf_len = xstrlen( outputx ).
        response->set_data( data = outputx
                                 length = l_pdf_len ).
         response->set_header_field(
                            name  = 'content-disposition'
                            value = 'attachment; filename=attach_pdf.pdf' ).
    CALL FUNCTION 'GUID_CREATE'
          IMPORTING
            ev_guid_32 = guid.
        CONCATENATE runtime->application_url '/' guid '.pdf' INTO
    display_url.
        cl_http_server=>server_cache_upload( url      = display_url
                                             response = cached_response ).
      navigation->response_complete( ).

    Still the pdf file is not opening.
    My On Initilisation code is as below:
    EXEC SQL.
      OPEN CUR FOR SELECT ORDER_NO,ORDER_DESC,DOC_TYPE
                 FROM SAPIBM.T_ORDER
                 where ORDER_NO = :orderno
    ENDEXEC.
    refresh : t_order.
    do.
      clear : wk_order.
      EXEC SQL.
        FETCH NEXT CUR INTO
                         :wk_order-ORDER_NO,
                         :wk_order-ORDER_DESC,
                         :WK_ORDER-DOC_TYPE
      ENDEXEC.
      if sy-subrc = 0.
        append wk_order   to t_order.
      else.
        exit.
      endif.
    enddo.
    EXEC SQL.
      CLOSE CUR
    ENDEXEC.
    if not t_order[] is initial.
      read table t_order into wk_order index 1.
      w_doctype = wk_order-doc_type.
      case w_doctype.
        when 'P'.
    outputx = wk_order-order_desc.
    CREATE OBJECT cached_response TYPE CL_HTTP_RESPONSE EXPORTING add_c_msg
    = 1.
    IF XSTRLEN( OUTPUTX ) > 0.
    response->delete_header_field(
    name = if_http_header_fields=>cache_control ).
    response->delete_header_field(
    name = if_http_header_fields=>expires ).
    response->delete_header_field(
    name = if_http_header_fields=>pragma ).
    response->set_header_field(
    name = if_http_header_fields=>content_type
    value = 'application/pdf' ).
       response->set_status( code = 200 reason = 'OK' ).
       response->server_cache_expire_rel( expires_rel = 180 ).
        response->set_header_field(
                          name  = 'content-disposition'
                           value = 'attachment; filename=attach_pdf.pdf' )
        response->set_header_field(
                       name  = 'cache-control'
                       value = 'max-age=0' ).
        l_pdf_len = xstrlen( wk_order-order_desc ).
        response->set_data( data = wk_order-order_desc
                                 length = l_pdf_len ).
        CALL FUNCTION 'GUID_CREATE'
          IMPORTING
            ev_guid_32 = guid.
        CONCATENATE runtime->application_url '/' guid '.pdf' INTO
    display_url.
        cl_http_server=>server_cache_upload( url      = display_url
                                             response = cached_response ).
      navigation->response_complete( ).
    endif.
      endcase.
    endif.

  • How to resolve this error for "This PDF document might not be displayed correctly." ?

    All of our PDF file build in Abode Indesign CS4. If any pdf open with mozilla, will come error message will be come on top of page. why this error coming every time and every pdf files.

    hello, the pdf viewer is still somewhat experimental and under very active development - you could try if the same error is occurring in the current development version, which you can download as an addon from http://mozilla.github.io/pdf.js/extensions/firefox/pdf.js.xpi
    in case it has the the same rendering problems, you could then file a bug report at https://github.com/mozilla/pdf.js/issues (a github account is necessary for it though) - please also provide a sample document where the error is apparent!

  • Convert spool (which is for smartform output) to PDF?

    how to Convert spool which is for smartform output  to PDF?
    CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF' is not working for smartform output,
    if i use this there will be error spool not contain list output?
    than whats the function module or way to convert spool contain smartform output to pdg?
    regards,

    hi,
    use this instead
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
          EXPORTING
            formname                 = 'ZNAK_SMARTFORM_CORRESPONDENCE'
      VARIANT                  = ' '
      DIRECT_CALL              = ' '
         IMPORTING
           fm_name                  = func_name
         EXCEPTIONS
           no_form                  = 1
           no_function_module       = 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.
        printer-getotf = 'X'.
        printer-no_dialog = 'X'.
        CALL FUNCTION func_name
          EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
       control_parameters         = printer
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
      OUTPUT_OPTIONS             =
      USER_SETTINGS              = 'X'
            validity                   = ls_smart-validity
            lifnr                      = ls_smart-lifnr
            name1                      = ls_smart-name1
            pstlz                      = ls_smart-pstlz
            regio                      = ls_smart-regio
            stras                      = ls_smart-stras
            smtp_addr                  = ls_smart-smtp_addr
    IMPORTING
      DOCUMENT_OUTPUT_INFO       =
       job_output_info            = printer1
      JOB_OUTPUT_OPTIONS         =
         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.
        t_otf[] = printer1-otfdata.
    DATA gt_tline like TABLE OF tline occurs 0 with header line.
        CALL FUNCTION 'CONVERT_OTF_2_PDF'
      EXPORTING
        USE_OTF_MC_CMD               = 'X'
        ARCHIVE_INDEX                =
         IMPORTING
           bin_filesize                 = w_file
          TABLES
            otf                          = t_otf
            doctab_archive               = gt_docs
            lines                        = gt_tline
      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.

Maybe you are looking for

  • How do I set up a local testing server?

    Hey again everyone. I am trying to figure out how to set up a local testing server. I've read a couple different tutorials online and i still can't figure it out. I added a new server, named it test server, I'm connecting using local/network, my serv

  • [SOLVED] drm:radeon delays xorg start for 30 secs

    Does anyone knows about a reason why starting the X.org server could take over 30 seconds? Jun 19 15:15:59 Arch kernel: [drm] Initialized drm 1.1.0 20060810 Jun 19 15:15:59 Arch kernel: [drm] radeon kernel modesetting enabled. Jun 19 15:15:59 Arch ke

  • Upcoming UPDATES

    Is apple going to come out with any type of video camera for the Iphone. and are they ever going to be able to send pictures to other phones in the future? They say theres an App for everything....Why cant it do easy things that my moms old cheap cel

  • Bitmap indexes have effect on query execution and equation of values.

    Hi, I have a Fact table and 17 dimension tables linked to it. On each foreign-key in the Fact-Table I have created a BITMAP Index. After that I Analyzed the fact table and made sure that the referential constraints were valid. Everything seem to be O

  • Where are the media files?

    I can't believe I'm asking such a basic question but I can't find the answer! Where are the media clips stored in iMovie 6? In past versions, the media was kept in a folder titled "Media". I've searched my computer for clips I want to export to FCE b