Download a Document from a custom table

Hello,
Currently I maintain HTML documents in a CLOB and I want to provide the user a means to download it as a file.
I followed the instructions for this in the HOWTO but I am having problems executing my procedure via a URL along the lines of:
#OWNER#.my_proc?my_var=1
I get the following error:
The requested URL /pls/htmldb/scott.my_proc was not found on this server.
Any tips on how to debug this? I'm pretty sure it has nothing to do with HTML DB itself but thought someone in this forum would know where to point me.
Regards

hey peter--
did you already grant execute on scott.my_proc to your mod_plsql DAD user or Public? not doing so is one cause for error in these cases. anyhow, that error's a generic one, so you'd probably want to check your apache error logs if you wanted more info. if it were me, i'd grant execute first to see if that worked. try either or both angles when you get a chance and let us know if you need further assistance.
regards,
raj

Similar Messages

  • Downloading blob content from a custom table

    In our hosted Apex application, the following code from the Application Express Developer's Guide works great for allowing a user to download blob content from one of our custom tables via a download button. However, the code doesn't work on the Oracle Cloud because the "owa_util" package is no longer available. The code is as follows:
    CREATE OR REPLACE PROCEDURE download_my_file(p_file in number) AS
    v_mime VARCHAR2(48);
    v_length NUMBER;
    v_file_name VARCHAR2(2000);
    Lob_loc BLOB;
    BEGIN
    SELECT MIME_TYPE, BLOB_CONTENT, name,DBMS_LOB.GETLENGTH(blob_content)
    INTO v_mime,lob_loc,v_file_name,v_length
    FROM file_subjects
    WHERE id = p_file;
    -- set up HTTP header
    -- use an NVL around the mime type and
    -- if it is a null set it to application/octect
    -- application/octect may launch a download window from windows
    owa_util.mime_header( nvl(v_mime,'application/octet'), FALSE );
    -- set the size so the browser knows how much to download
    htp.p('Content-length: ' || v_length);
    -- the filename will be used by the browser if the users does a save as
    htp.p('Content-Disposition: attachment; filename="'||replace(replace(substr(v_file_name,instr(v_file_name,'/')+1),chr(10),null),chr(13),null)|| '"');
    -- close the headers
    owa_util.http_header_close;
    -- download the BLOB
    wpg_docload.download_file( Lob_loc );
    end download_my_file;
    Besides using web services, does anyone know of a way to do this? Is there a way to add access to the "owa_util" package in the cloud? I have also tried apex_util.get_blob_file_src but that is also unavailable in the Oracle Cloud.
    Thanks,
    Steve

    Following Joel's advice:
    The way I solved this was to split the code between two page processes and one application process. The download button first calls a page process to move the report data into a blob column and then calls another page process which is of "run application process" type. This calls the application level process where the download code, shown below, is called.
    Notice the following changes to the code from the one posted earlier (also from Joel)
    1) added sys.htp.init;
    2) "sys." to all htp, owa and wpg_docload calls
    3) added apex_application.stop_apex_engine; after the wpg_docload statement at the bottom of the script.
    Now the download button launches a "save as" dialog box and the report content is downloaded to the client.
    The code now looks like:
    CREATE OR REPLACE PROCEDURE download_my_file(p_file in number) AS
    v_mime VARCHAR2(48);
    v_length NUMBER;
    v_file_name VARCHAR2(2000);
    Lob_loc BLOB;
    BEGIN
    SELECT MIME_TYPE, BLOB_CONTENT, name,DBMS_LOB.GETLENGTH(blob_content)
    INTO v_mime,lob_loc,v_file_name,v_length
    FROM oehr_file_subject
    WHERE id = p_file;
    -- set up HTTP header
    -- use an NVL around the mime type and
    -- if it is a null set it to application/octect
    -- application/octect may launch a download window from windows
    sys.htp.init;
    sys.owa_util.mime_header( nvl(v_mime,'application/octet'), FALSE );
    -- set the size so the browser knows how much to download
    sys.htp.p('Content-length: ' || v_length);
    -- the filename will be used by the browser if the users does a save as
    sys. htp.p('Content-Disposition: attachment; filename="'||replace(replace(substr(v_file_name,instr(v_file_name,'/')+1),chr(10),null),chr(13),null)|| '"');
    -- close the headers
    sys.owa_util.http_header_close;
    -- download the BLOB
    sys.wpg_docload.download_file( Lob_loc );
    apex_application.stop_apex_engine;
    end download_my_file;
    Thanks Joel for your help.
    Steve

  • Visual Studio download a document from a document libary and upload it to a jaxrs webservice in java

    I have created a custom ribbon action and a application page in visual studio. The user
    presses my ribbon in sharepoint and it calls the application page that in turn downloads that file. here is the code:
    namespace Save_to_PLM.Layouts.Save_to_PLM
    public partial class ApplicationPage : LayoutsPageBase
    protected void Page_Load(object sender, EventArgs e)
    if (Request.QueryString["file"] != null)
    DownloadDocument(Request.QueryString["file"].ToString());
    private void DownloadDocument(string fileName)
    SPSecurity.RunWithElevatedPrivileges(delegate()
    using (SPSite oSiteCollection = new SPSite(SPContext.Current.Site.Url))
    using (SPWeb mi_web = oSiteCollection.OpenWeb())
    string path = System.Web.HttpContext.Current.Server.MapPath(fileName);
    string name = System.IO.Path.GetFileName(path);
    Console.WriteLine(name);
    Microsoft.SharePoint.SPFile spFile = mi_web.GetFile(fileName);
    Response.ClearHeaders();
    Response.ClearContent();
    Response.ContentType = "application/force-download";
    Response.AppendHeader("content-disposition", "attachment; filename=" + name);
    Response.BinaryWrite(spFile.OpenBinary());
    Response.End();
    But i want to http post that file to my jaxrs webservice in java. How do  i do that
    programmatically? I am very new .net i usually code in java.

    Hi,
    Here is a blog about how to call a Java EE Web Service from a .Net Client for your reference:
    http://blogs.msdn.com/b/bursteg/archive/2008/07/19/how-to-call-a-java-ee-web-service-from-a-net-client.aspx
    If you want to download a document from a Sharepoint library, we can use the REST API provided by SharePoint and use Apache HttpComponents in Java.
    http://www.rgagnon.com/javadetails/java-get-document-sharepoint-library.html
    About how to upload file using jaxrs webservice in C# code, I suggest you post it to C# or ASP.Net Forum, you will get more help and confirmed answers from there.
    https://social.msdn.microsoft.com/Forums/en-US/home?forum=csharpgeneral
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Download iWork documents from iCloud to Mac in Pages 5.0 and Numbers 3.0

    Does anyone know how to download iWork documents from iCloud to Mac, most specifically from Pages 5.0 and Numbers 3.0. It seems that Apple have taken away the ability to do so, as in the past I believe there was a download button... All I am trying to do is download the document to attach and send via Gmail.
    Extremely frustrating as I can't find any discussion surrounding this problem.

    Have you tried right-clicking the document to get an option to download it.

  • Giving Error When Selecting From a Custom Table

    There is a custom report 'Z*'  which archives data.
    In this report, while selecting data(needs to be archived) from a custom table 'Z*_T', giving runtime error in Production Server.
    The select statement is written below :
    *data izX like z_t occurs 1000 with header line._
    *select * from z*t into table i_zX.*_
    How can I change the select statement so that it will work properly?

    Sas..
    From your example code it appears you are trying to use a wild card for both your dbtable and the internal table.
    To do this, you will lilkely need to use a Field Symbol for the target internal table and your FROM will need to be a varible
    FROM (dbtabname)
    The ABAP Helps gives this example for the Select Table
    DATA  TABNAME(10).
    DATA: BEGIN OF WA,
            ID   LIKE SCUSTOM-ID,
            NAME LIKE SCUSTOM-NAME,
            REST(134),
          END OF WA.
    TABNAME = 'SCUSTOM'.
    SELECT * INTO WA FROM (TABNAME).
      WRITE: / WA-ID, WA-NAME.
    ENDSELECT.

  • Restrict download of documents from a Document library

    Hi,
    I am working on a trial version of SharePoint online E3. I enabled IRM on it with a hope that it will restrict "DOWNLOAD" of documents from a document library itself. However to my bad, it seems it allows downloading... with imposed restrictions. 
    Can anybody help me in this? I need only some of the users to be able to download/print/copy documents from library and NOT all of them. Rest can only view the document. Is it possible in SP Online? 
    Is it possible in SharePoint 2010 or is it the same in here as well?

    Hi 
    yes,sharepoint online we can Use IRM. please refer yes, 
    http://office.microsoft.com/en-in/office365-sharepoint-online-enterprise-help/set-up-information-rights-management-irm-in-sharepoint-admin-center-HA102895193.aspx
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • Hi, i am not able to download PDF document from email in the ibook in both iphone 4s and ipad 1 mini. The received PDF document appears as image. This matter is experienced only from week. Appreciate your help

    Greeting
    I am not being able since last week to download PDF document from email to ibooks. Once the PDF document in the email open it is shown as image document and cannot be downloaded to ibooks. This recent problem is also experienced in my ipad mini. Currently, i have to download the PDF document to my ibooks via the itunes only
    Appreciate your help  

    Greeting
    I am not being able since last week to download PDF document from email to ibooks. Once the PDF document in the email open it is shown as image document and cannot be downloaded to ibooks. This recent problem is also experienced in my ipad mini. Currently, i have to download the PDF document to my ibooks via the itunes only
    Appreciate your help  

  • Select MAX(BUDAT) from ztab (custom table) where... NOT work!

    We use the following statement where BUDAT is one of the fields in our custom table ztab:
    Select MAX(BUDAT) from ztab (custom table) where...
    When activating the above code, get the following error:
    "Unknown column name "MAX(BUDAT)". not determined until runtime, you cannot specify a field list."
    How to resolve this problem to get a max value of the field BUDAT in custom table ztab (it's not an internal table)?
    <REMOVED BY MODERATOR>
    Edited by: Alvaro Tejada Galindo on Apr 10, 2008 3:56 PM

    HI,
    Tyr having a space after and before BUDAT.
    ( BUDAT ).
    Hope it helps,
    Shreekant

  • 10.5.8 can't download iwork documents from icloud anymore

    I am not sure what changed.
    I can no longer download iwork documents from icloud because "Download Document" is greyed out.
    I was able to download documents from icloud just until recently
    I am having this problem with my Powerbook G4 running 10.5.8.
    As I said it worked until recently...
    Help

    Sorry, I'm a bit confused - you said you're using a Powerbook G4 with 10.5.8? According to these system requirements:
    http://support.apple.com/kb/HT4759
    You are not able to take advantage of iCloud with a Powerbook.
    So which model are you actually using if it worked previously?

  • How to download a document from an email to edit

    Hey guys
    How do I download a document from an email to edit?

    This is explained in the Help file which is in the Adobe Reader app. Read that, and if you still have questions, please ask.

  • Error in multiple operation with change document object for custom table

    hi all,
    I have developed a change document object for a custom table ZTEST and developed a report program for insertion, updation & deletion..everything works fine if I do only once ie. if I created only 1 entries. If I created 2 new entries , I am getting an Error "DUPREC:POS&Z3RL_TAB&Z3RL_TAB" and EXIT the transaction.
    why I am getting this error??? is it not possible to do multiple operation with the change document???
    kindly help.
    Edited by: JaiKarthik on Apr 7, 2010 6:20 AM

       LOOP AT ts_mod INTO wa_mod.
                READ TABLE <i_itab> INTO <wa_tab> INDEX wa_mod-row.
    * Select the existing entries in table Z3RL for change history
                    SELECT SINGLE * FROM z3rl
                           INTO wa_z3rl
                           WHERE vkorg   = <wa_tab>+3(4)
                           AND   zzkunnr = <wa_tab>+7(10).
    * Move the old entries
                    IF sy-subrc = 0.
                      CLEAR ls_z3rl.
                      ls_z3rl = wa_z3rl.
                    ENDIF.
    * Update the table
                 MODIFY (viewname) FROM <wa_tab>.
                   CLEAR wa_z3rl.
                    wa_z3rl-mandt      = <wa_tab>+0(3).
                    wa_z3rl-vkorg      = <wa_tab>+3(4).
                    wa_z3rl-zzkunnr    = <wa_tab>+7(10).
    * Populate change tables
                    CLEAR wa_change.
                    wa_change-teilobjid = 'Z3RL'.
                    wa_change-textart = 'TEST_2'.
                    wa_change-textspr = 'EN'.
                    wa_change-updkz = 'U'.
                    APPEND wa_change TO ts_change.
    *call the fM to log the values in CDHDR table.
                    CALL FUNCTION 'Z3RL_WRITE_DOCUMENT'
                      EXPORTING
                        objectid                 = 'Z3RL'
                        tcode                    = sy-tcode
                        utime                    = sy-uzeit
                        udate                    = sy-datum
                        username                 = sy-uname
                        planned_change_number    = ' '
                        object_change_indicator  = 'U'
                        planned_or_real_changes  = 'U'
                        no_change_pointers       = 'U'
                        upd_icdtxt_z3rl= 'U'
                        n_z3rl= wa_z3rl
                        o_z3rl        = ls_z3rl
                        upd_z3rl= 'U'
                        lv_opt                   = ' '
                      TABLES
                        icdtxt_z3rl= ts_change.
                CLEAR : wa_mod, <wa_tab>.
              ENDLOOP.
    Edited by: JaiKarthik on Apr 7, 2010 6:49 AM

  • Document attachment to custom tables / records

    Good morning,
    do you know if it is possible to attach external documents to custom tables / records, in the same way as it is possible for standard transactions (Services for Object)?
    If yes, can you please advise me on some reference documetns about how to customize this functionality?
    Thanks in advance
    AS

    Hi ,
    Displaying attachments is not available in the Interaction record view.You need custom development to enable the attachemnts there.
    usually the process would be to create a followup activity from the interaction record and attch documents there.
    Thanks,
    Rajiv.

  • Downloading an image from a remote table via dblink

    Hi
    I am building an Apex 3.0 app that will access data remotely, via a database link. One of the tables has a BLOB column, that I need to display in the app as an image (in a single-record form page) and allow the user to update it as well, uploading a new image if required.
    As it is not possible to select blobs over a dblink, but it is ok to insert/update them, I was planning to:
    - insert the blob into a local temporary table which would have only one column ("image")
    - select from the local table to get a reference to the blob and do the usual stuff to download it to the client
    Though this might work, it seems a bit inefficient to me. Is there any other way to do this?
    Thanks,
    Luis

    http://developer.apple.com/Documentation/Cocoa/Conceptual/URLLoadingSystem/URLLo adingSystem.html

  • Mass download of documents from SM to PC

    Hi,
    I am using Solution Manger 4.0
    Up to now, i am only able to download one document (already stored in SM) from SM to my PC.
    I would like to select N documents to download them at once on my PC.
    How to proceed ?
    Kind regards,
    Yann

    Hello Yann,
    Unfortunately, the functionality of downloading several documents at the
    same time in transaction SOLAR01 or 02 is currently not provided in
    Solution Manager. The only possibility to download documents, is to do
    it one by one.
    You can download a defined set of documents by creating a blueprint document which downloads all blueprint relevant documents based on the selection made.
    But, for other document types, there is no possibility to download several at same time, and no such plan to development it further.
    Sorry for the inconveniences,
    Dolores

  • Mass downloading of Documents from DMS

    Dear SAP gurus,
    How to download the multiple documents from DMS in one step?
    Thanks in advance.
    Venkat

    Dear Prasanna,
    We have to download all the document info records (along with Documents attached to it) and upload them to new server.
    How should go about this?
    Thanks in advance.
    Venkat

Maybe you are looking for