Open document from bsp

I created sample document under the
content management->documents. ( for example word.xls )
I want to link this document to my BSP and want to
open this document from my bsp report application.
How can i do this.
Thank for your help.

here is a sample code also...
READ TABLE application->doc-t_attachments
                    INTO l_attachment
                    INDEX l_index.
         CALL METHOD application->document_display_attachment
           EXPORTING
             attachment       = l_attachment
           IMPORTING
             s_return         = ls_return
             file_content     = l_file_content
             file_content_hex = l_file_content_hex
             mime_file_type   = l_file_mime_type.
         IF NOT ls_return IS INITIAL.
           APPEND ls_return TO application->t_return.
         ELSE.
           CREATE OBJECT cached_response TYPE cl_http_response
                 EXPORTING add_c_msg = 1.
           IF NOT l_file_content IS INITIAL.
             cached_response->set_cdata( l_file_content ).
           ELSE.
             cached_response->set_data( l_file_content_hex ).
           ENDIF.
           IF l_event_tableview->itemclick = 'ClickName'.
             cached_response->set_header_field(
                 name  = if_http_header_fields=>content_type
                 value = l_file_mime_type ).
             cached_response->set_header_field(
                 name  = 'Content-Disposition'
                 value = 'inline' ).
           ELSE.
             cached_response->set_header_field(
                 name  = if_http_header_fields=>content_type
                 value = 'application/x-download' ).
             CONCATENATE l_attachment-name '.' l_attachment-type
                     INTO l_filename.
             CONCATENATE 'attachment; filename=' l_filename
                     INTO l_value.
             cached_response->set_header_field(
                 name  = 'Content-Disposition'
                 value = l_value ).
           ENDIF.
           cached_response->set_status( code = 200 reason = 'OK' ).
           cached_response->server_cache_expire_rel( expires_rel = 180
           CALL FUNCTION 'GUID_CREATE'
             IMPORTING
               ev_guid_32 = guid.
           CONCATENATE runtime->application_url '/' guid INTO l_url.
           cl_http_server=>server_cache_upload(
                 url      = l_url
                 response = cached_response ).
           RETURN.
         ENDIF.
the method document_display_attachment is in the class
CL_BSP_HAP_DOCUMENT_IF.
Message was edited by: manasa

Similar Messages

  • Word Viewer will not open documents from Sharepoint 2013 in IE11

    I've run into an issue while trying to open documents from SharePoint 2013 after upgrading to IE11. My organization uses Word Viewer with the compatibility pack and all other Word documents (local files, intranet hosted) will open with no problems. When
    trying to open a Word document from SharePoint the Word Viewer will open, but the file does not. We have verified that all Windows Updates are installed. We have tried opening SharePoint in Compatibility View and Enterprise Mode. We have re-downloaded the
    latest version of Word Viewer and reinstalled it along with the compatibility pack. If we open the SharePoint site in Explorer view and then open a Word document it will open in Word Viewer with no problem. Excel and PowerPoint documents open from SharePoint
    with no problem. This is only affecting Word documents with Word Viewer. When using the full version of Word the documents open fine. Within SharePoint we have tried activating the site collection feature "Open Document In Client Applications by Default"
    but it made no difference. We're completely at a loss how to make this work as there doesn't seem to be much information specifically pertaining to issues with Word Viewer.

    Hi Victoria.
    1. The PCs do not have Microsoft Office installed, nor are we using the Office Web Apps. "Word Viewer" means the Microsoft Word Viewer application available here (http://www.microsoft.com/en-us/download/details.aspx?id=4) that is available
    free for read-only viewing of Word documents.
    2. There are no errors when I open Word docs in Word Viewer. The Word Viewer application launches after clicking a Word document link in Sharepoint, but there is no file open in it. When that happens the IE11 Sharepoint window on the taskbar is flashing
    yellow, but when I click back to it there are no messages or alerts to click on.
    3. This issue does occur with all Word documents (.doc, .docx) in SharePoint. However, it does not occur when opening Word documents in the Word Viewer when they are local files or through IE11 from a non-SharePoint website like our local intranet.
    Those files will open with no problem in Word Viewer.
    4. I will try to get a screenshot, but we are working on creating images for deployment and I don't currently have a machine configured the same way. I'll work on reconfiguring one and post a screenshot.
    Thank you for your help!

  • Pages tells me I need to upgrade to 5.0 to open documents from iCloud.  When I go to the mac app store it says pages 5.0 is installed, but Pages says it's running 4.3.  I just want to open documents on my mac that were created on my iPad.

    Pages tells me I need to upgrade to 5.0 to open documents from iCloud, but the mac app store says its already installed and won't let me upgrade.  when I check the version of pages I am running it says 4.3.  I just want to be able to open documents on my mac that were created on my iPad.  How can i get Pages 5.0?

    Welcome to Apple Support Communities
    You already have got Pages 5.0, but you still have got Pages 4.3, so Pages 4.3 is being opened instead of the newest version, being this the reason why you get a message telling you to update Pages to the most recent version.
    If you don't need the old version, open a Finder window, choose Applications in the sidebar and delete the old Pages icon or move it to an external drive. I don't recommend you to do this, as users are complaining about the lack of features of the new version.
    Instead, what you can do is to put the new Pages icon in the Dock by dragging it from the Finder window to the Dock, so you can open the new Pages version from the Dock and you can open all your documents with it after opening the application

  • Just upgraded my system to snow leopard...now when I open documents from my memory stick, its in 'pages' not word...how do I fix that??

    Just upgraded my system to snow leopard...now when I open documents from my memory stick, its in 'pages' not word...how do I fix that??

    Did you click on the little triangle? Did you select one of the document files before pressing COMMAND-I to open the Get Info window? If the panel is closed it looks like this:
    If you then click on that little triangle gadget you get this:
    A temporary solution is to CTRL- or RIGHT-click on the document file, navigate to the Open With item, and select from the sub-menu.
    The first method makes the association permanent. This method only applies to the currently selected document.

  • Open documents from within

    I was a moderate user of FInal Cut Studio, but I am completely new to anything concerning Final Cut X. My apology in advance if this is obvious.
    I am trying to open  someone's FCS X project file on their machine, with .fcpproject extension. I double click it, but the dialog box says "The document could not be opened. Open documents from within Final Cut Pro". Now in FCP X, there is no File > Open option under the file menu.
    Any ideas for a complete newbie?

    There is a tut currently floating around the Web titled something like Learn Final Cut in 30 minutes.
    It's quite possible to FUBR projects by trial and error approaches because the app is so database driven.
    My 2¢…spend a little time getting some info on organization, terminology, and workflow. Whether it's the tut I mentioned  or not, It will not take long and it really will be a worthwhile investment.
    Good luck.
    Russ

  • Open documents from LabVIEW

    I want to open documents from one aplication made up with LabVIEW. The documents can be Word, Pdf, Excel and so on.
    Coes anybody know how do this?
    Thanks

    Hi Miguel
    Perhaps when trying to open a word doc you will get an empty word.
    If so, modifie the vi as in attached doc to change /n option for an empty string.
    In this way, word will open whit your document on screen.
    saludos
    Alipio
    "Qod natura non dat, Salmantica non praestat"
    Attachments:
    Worddoc.doc ‏44 KB

  • Issue in WAD 7.0 regarding opening document from MIME repository

    Hi Experts,
    I am facing an issue in WAD 7.0 regarding opening document from MIME repository..
    My requirement
    I want to have a button , on clicking of this button one excel file ( already located at MIME Repository) should open in a new window.
    To achieve the same, I have added one button. and also added one java script web item in my web template.
    And as per my understanding, I need to write command/code in the script web item.
    I have tried with several standard commands available, but not yet succeeded.
    Please suggest the appropriate command or code , that I can put into the java script web item.
    Also please provide me, if there is any other solution.
    Thanks and Regards,

    I think you might be posted in the frong forum, what is WAD 7?
    this forum is for WebIntelligence related questions, part of Business Objects software suite.

  • Can't Open Documents From Finder

    Sorry- the topic title is a little deceiving. I wasn't quite sure where this issue would go because really it's an issue I'm having with Word.
    Word doesn't seem to want to open ANY documents. Every time I try, it stops responding and I have to Force Quit. I don't think it's a problem with the documents themselves because TextEdit can still open them. Also, I know that Word installed properly because it's been opening documents fine for two years-- this only started a couple of days ago. Ordinarily I'd simply reinstall, but I don't have the disk. Word won't open documents from Finder, or after I launch and select open from the options. It also won't open any downloads.
    Any suggestions as to what's going on and how I should fix this would be much appreciated. (Also, if you could tell me where this topic SHOULD be, that would also be appreciated).

    Welcome to Apple Discussions.
    Choose a doc and command-i (Get Info) Be sure "Open With" it says, MS Word. If not then choose it and click on Use this app to open all files like this"
    If that doesn't help check in support the forums here...
    http://www.microsoft.com/mac/default.mspx
    -mj

  • How do I change the preferred application to open documents from Libra office to Microsoft office?

    How do I change the preferred application to open documents from Libra office to Microsoft office?

    Select a document of that type in the Finder, choose Get Info from the File menu, click on Open With, select the desired application, and press the Change All button.
    (116411)

  • WAD 7.0 issue regarding opening document from MIME repository

    Hi Experts,
    I am facing an issue in WAD 7.0 regarding opening document from MIME repository..
    My requirement
    I want to have a button , on clicking of this button one excel file ( already located at MIME Repository) should open in a new window.
    To achieve the same, I have added one button. and also added one java script web item in my web template.
    And as per my understanding, I need to write command/code in the script web item.
    I have tried with several standard commands available, but not yet succeeded.
    Please suggest the appropriate command or code , that I can put into the java script web item.
    Also please provide me, if there is any other solution.
    Thanks and Regards,
    Biswarup Ghosh

    Yes I tried it at first with Script Item but it did not work. I am not sure how should I change the path because of the portal:
    "/sap/bw/Mime/Customer/.../file.htm" - this path is not working anymore
    Another option that you mentioned I do not want to use. I have about 20 different html files in MIME repository so I would have to create 20 different web application. I do not like this solution.
    Regards
    Erwin

  • I need to open documents from SARS South Africa. What version must I download?

    I need to open documents from SARS South Africa. What version must I download? Why are they not opening now?

    What type of documents?  What software is this posting concerning?

  • Open Document from a webi report

    Hi
    I am trying to open the webi document from a report and the data source is BW , can u guys help me out and give me the syntax
    thanks

    Hello,
    There no fine-grained control over the "Document Properties" frame specific to visibility of the "Created by:" field displayed, either in the Java Report Panel or DHTML Interactive Editor Extension Points. 
    You can try editing the Interactive Editor JSP file that controls that panel - it's relatively straightforward - but that would take your deployment out of support.
    One way for definiteness would be - instead - to modify the "createdby" Web Intelligence document property to something else, using ReportEngine Java SDK:
    documentInstance = reportEngine.openDocument(id);
    properties = documentInstance.getProperties();
    properties.setProperty(PropertiesType.AUTHOR, "pookie");
    documentInstance.setProperties(properties);
    documentInstance.save();
    Of course, this isn't what you want if you want to keep the "Created by:" field, but merely prevent it from being displayed in the viewers.
    Sincerely,
    Ted Ueda

  • Open document from interactive report

    Application Express version 4.0.2.00.07.
    In apex I am trying to accomplish the following:
    1. create a link to a pdf or Word document stored on local network using the file browse button.
    2. store the link to that file in my table but not store the actual document in the oracle table.
    3. open the document from link in interactive report.
    My dba does not want to store anymore documents into oracle because of performance issues we are experiencing with current applications that do this. Does anyone know the where to find sample code that will accomplish this task or will load the linked document into the oracle table but delete the document from the blob when the document is closed.

    You're probably looking to use the BFILE functionality - a pointer to a LOB on the filesystem.
    Try looking at some of the following sources for guidance
    http://docs.oracle.com/cd/B10501_01/appdev.920/a96591/adl12bfl.htm
    APEX BFILE
    http://monkeyonoracle.blogspot.com.au/2009/10/storing-images-outside-oracle-xe-with.html
    Scott

  • How to open document from business content in weby dynpro ?

    Hello experts,
    I've cretaed a webdynpro where I want to display a document which is attached
    to a product in tx commpr01 in business content.
    I've tested method o_cl_crm_documents->get_with_url , but
    there I do not get a url in webdynpro.
    Does anybody know another method/fm to display such a document from
    business content in webdynpro ?
    Thanks and best regards
    Gerd

    Hello Mr. Jung,
    I'm sorry but I didn't find this method linktourl.
    In my web-dynpro I'm getting the url for my document after
    cklicking on the selected row.
    Then I just want to give this paramter to this linktourl method
    and open the document.
    How can I implement this method ? which class ?
    Thanks Gerd

  • How to open document from mac when using windows without transferring the file?

    How can i open a document from mac when i am using windows without transferring it?

    depend on the document program more then anything else really
    when ever I open a doc with word it make a history for undo and redo action file in the same dir
    with bootcamp you only have read not write access to the osx partition so it would fail to be able to create that file
    but if you can get word or whatever program you use to open the file not to place a temp file in the same dir
    or use a program which did not make any type of temp file or used a program where the temp file would be located elsewhere where you decide it would work file

Maybe you are looking for

  • Withholding tax issue while doing Down payment Clearing - Help needed

    Hi, 1. I have posted vendor downpayment  for 5000--> TDS was deducted here Bank Credit = 4500 Vendor Debit =5000 TDS Credit =500 2. I have posted vendor invoice for 5000 --> TDS was calculated Material Debit = 5000 Vendor Credit =4500 TDS Credit =500

  • %20 on Download file Names

    Hi, Can anyone can tell me why I get the names of the files that I have downloaded to my iPad from my computer via wi-fi, full with %20 scattered all over the file name? I have got this phenomenon with two different applications. Thanks, Amnon

  • Acrobat Pro XI trial destroyed Acrobat Pro X

    I downloaded the trail Acrobat Pro XI and it deleted by Acrobat Pro X. Due to company restrictions, I cannot purchase XI yet but need by X back after the trial ends. How do I get Acrobat X back when it's no longer available for download? Message was

  • ACR 6.2 noise reduction settings shown only after zoom in or pushing sliders

    Hi! I Believe its an operator error, but still, i need your help, either to correct the situation ou learn how to work around it! Begining: to properly adjust noisre reductions settings we have to zoom in to about 100%, however, when zoom to fit in s

  • Rewrite subdomain to another port number

    My problem: I have two machines running Leopard Server with Web services on. Server1 serves out our main site on Port 80. Server2 will serve out an intranet of sorts on Port 8000, which will still be accessible from outside the office. Both use the s