Display filename in url for custom items

Hi - I'm rying to find out how to open a word doc in a browser and display the FILENAME (xyz.doc) instead of the NAME (123.doc) - which comes from the wwdoc_document$ tbl .
The word document was added to a portal page via a file attribute within custom text item. It seems that the document is not referenced within the actual page group when using the custom item compared to using standard file item format.
I can open the doc in browser using the NAME format - eg, .../portal/pls/portal/docs/1/1234.doc but I need to open via the PAGEGRP/FILENAME format eg, .../portal/page/portal/PAGEGRP/xyz.doc
BTW - We're using portal 10.1.4
Any ideas appreciated
Cheers,
Justin

Hi guys,
I finally discover the solution. Just try this:
First, create a Procedure like this:
PROCEDURE ShowSaveDoc (pFile wwdoc_document$.name%TYPE) IS
v_BlobContent wwdoc_document$.blob_content%TYPE;
v_MimeType wwdoc_document$.mime_type%TYPE;
v_Filename wwdoc_document$.filename%TYPE;
BEGIN
SELECT blob_content, mime_type, filename
INTO v_BlobContent, v_MimeType, v_Filename
FROM wwdoc_document$
WHERE name = pFile;
owa_util.mime_header(v_MimeType, FALSE);
htp.p('Content-Length: ' || DBMS_LOB.getlength(v_BlobContent));
htp.p('Content-Disposition: attachment; filename="' || v_Filename || '"');
owa_util.http_header_close;
wpg_docload.download_file( v_BlobContent );
EXCEPTION
WHEN NO_DATA_FOUND THEN
htp.p('Error - No Data Was Found');
WHEN OTHERS THEN
htp.p('Error - ' || || SQLERRM);
END;
On the HTML code where you have the link try this:
htp.p('< a id="someid" title="download" alt="download"
h_ref="/portal/pls/portal/portal.galeria_pkg.showsavedoc?pFile=' ||rec.id_doc || '"> Download '||rec.docDescription||'</a>');
where the rec.id_doc is the wwdoc_document$.name of your document.
Try it and tell me if it worked.
Its Working for me.
Thanks.

Similar Messages

  • PR and PO should be display in IWBK report for stock item.

    Hi Exterts,
    Our client requirement is to display PR and PO number in IWBK report for stock item as well.
    I know PR and PO can be display in IWBK report for non-stock item but how we can display PR and PO for stock item,as PR is generated through MRP for stock item.
    Please share your ideas on this.
    Regards
    Vishu

    Vishu,
    In typical MRP settings you "procure to stock" not "procure to order".
    This means that there is no direct link between the PM/CS orders and any PR/POs created via MRP.
    Subsequently you will not be able to show this data in IWBK.
    However, we are currently designing a customer-specific report similar to IWBK that also counts the number of open POs for a given material on a PM/CS work order. The user can then navigate to ME2M (PO list) or MD04 (stock requirements list) to get further details.
    PeteA

  • Is there any way to display filenames or captions for photos?

    is there any way to display filenames or captions for photos?

    Thanks. There are so many it's very hard to see which one does what. Since I edit  on the MacBook Pro using Photoshop Elements, all I really need is a way of seeing the filenames, and secondarily re-arranging thumbnails on the iPad screen manually.

  • Vendor Line Item Display-Default value for customer items

    Is it possible in selection screen of transaction FBL1N (Vendor line item display) the default value of field "customer items" to be checked?
    Thanks in advance.

    hi Tsiami
    it's not possible. if u want check customer line items go throw this TC:FBL5N
    plz assign points
    regards
    sivareddy.

  • Selecting from wwsbr_all_items for Custom Item Display

    I'm trying to call a procedure that will create custom HTML for an item I created. In that procedure I'm trying to get the name of the object I'm passing from the wwsbr_all_items view. However, when I try to select from the view I get the following error
    (p_url is a VARCHAR2 with a valid ID number)
    SELECT name
    FROM wwsbr_all_items
    WHERE id = p_url
    ERROR:
    ORA-14551: cannot perform a DML operation inside a query
    ORA-06512: at "Portal.WWCTX_SSO", line 2954
    ORA-06512: at "Portal.WWCTX_SSO", line 3483
    ORA-06512: at "Portal.WWCTX_SSO", line 1735
    ORA-06510: PL/SQl: unhandled user-defined exception
    ORA-06512: at "PORTAL.WWCTX_SSo", line 1578
    ORA-06502: PL/SQl: numeric or value error
    ORA-06512: at "Portal.WWCTX_SSO", line 1820
    ORA-06512: at "Portal.WWCTX_API", line 199
    I also get a similar error if I try to select * from the view. Any ideas??
    Thanks!

    I believe you need to set your context up. Try the following. You will need to substitute with your own parameters.
    portal.wwctx_api_private.set_context(p_user_name => 'PORTAL',
    p_password => 'password', p_update_flat => true);
    You may have to wrap your code, so the password is not visible.

  • Item level security for custom items in 902

    I've created several custom item types and created some items in a page
    that enables Item Level Security.
    Enabling item level security on any of these items cause
    Error 30694: Error in API - update item failed
    Steps:
    1. Create custom item type
    Extended simple text type
    added image attribute
    2. Create custom item
    3. Edit custom item just created
    Select Access / Item Level Security
    Select Define Item Level Access Privileges
    Hit Apply or OK
    -> Error 30694: Error in API - update item failed
    Same error is using a "Image" item type.
    The above steps do not cause an error if using the default types; e.g. Simple Text and Simple URL
    Also tried promoting the item type so its shared. No effect.
    Is item-level security only for base "simple" item types??? If so then this is a MAJOR restriction.
    Any help would be greatly appreciated.
    --jason mathews                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi Jason
    I filed a bug on this. See 2529787
    I narrowed the problem down to custom item types that have a file or image attribute and only when the item is edited by someone other than the orginial publisher.

  • Procedure Links for Custom Items & Folders

    I created both a custom item type and custom folder type. Each was given a procedure call to a form application component created in Oracle Portal. When I created the custom item type, I checked "Display Procedure Results With Item". I used the following HTTP link: http://collins:7777/pls/portal30/portal30.wwa_app_module.new_instance?p_moduleid=1710562983
    When I view a folder of the custom folder type or a folder containing an item of the custom item type, the folder displays briefly and then is replaced with a full browser version of the form.
    Is it possible to get the form to display within the folders instead of replacing the folder in the browser window?
    I am running version 3.0.6.6.5 on Solaris 2.6.

    Fran,
    Try using the component's show procedure. On the component's Develop tab, click the Show link next to Call Interface to see the structure of the URL to call the component directly.
    Jerry

  • GetItemData integration api: unable to read data for custom item

    Hello,
    I am trying to retrieve the data of an custom item via the getItemData api but i am gett the error message
    "Not implemented for this item type"
    I checked the api documentation, the list of supported item types include custom methods.
    Is there any thing that i need to maintain for the custom method so that i can read the data stored by it using the getItemData api.
    or is it simply not possible to read custom item data.
    Thanks for the help,
    Regards,
    Saurav

    Hi Ruediger,
    Thanks for the reply.
    To test the getItemData API i have implemented the hello world custom method example (java script).
    I created an item using the UI and edidted the content.
    when i try to read the saved data using the api i am getting the message
    encountered an error:
    Server returned HTTP response code: 400 for URL: https://streamwork.com/v1/items/5EXAbr-TgVCJV1qgL8-g1W/item_data?
    <?xml version="1.0" encoding="UTF-8"?>
    <error>
      <http_status>400 Bad Request</http_status>
      <message>Not implemented for this item type.</message>
    </error>
    When i try to read the data of a text item using the same API I am getting the correct response
    <text_item>
       <text_content><p>Hello testing</p></text_content>
    </text_item>
    So i was wondering how i can implement the getItemData for my custom method.
    Thanks and regards,
    Saurav.

  • "On Create" for custom items?

    Does anyone know of a way to simulate an "on create" event for creating a new custom item? For example, if I want to populate some of the attributes of the item based on a database lookup when the item is created.
    Thanks in advance,
    Wayne

    There is currently no supported way to do this. This feature is planned for a future release.
    Regards,
    Jerry
    PortalPM

  • How to display international version infor for customer when creating SO?

    Hi Gurus:
                Is there any possibility to display the international version information for customer when creating the SO.like customer name / address etc.
    thanks!

    See notes 598197 and 610289

  • Search help for Custom Item level field

    Hi All,
    I have two custom fields at Item level. Both of them has fixed values defined at domain. The fixed values have a short text also given with them.
    The problem I am facing is when SRM provides default search help for these custom fields, for first field the 'Value' and 'Description' comes in the search result screen, but for second, only 'Value' comes in the search result.
    When I try to debug, it shows the SHLPTYPE as 'SH' for first one and for the second as 'FV'.
    What does this indicate?
    My requirement is to display both value and description in the search result screen.
    Please suggest.
    Thanks
    Nandalal

    Hi
    Sorry for the delay. My User got locked for some time.
    I have seen the document you sent me on my email id.
    <b> I noticed in the case where the Search help is working fine, there is no space in between the contents of the Fixed values and their short text under the value range tab of the Domain element.
    But in the case, where there is a problem with the search help. There both the Fixed values and their short description is having a space in between the words.
    Try maintaining COND_A instead of "COND A". Also with the short description use "COND_A" instead of "COND A".</b>
    <u>I hope this will resolve the issue.</u>
    <b>Update me once you have any issues.</b>
    Please reward suitable points, incase it suits your requirements.
    Regards
    - Atul

  • Problem in Calling URL for Line Item of Perticular Purchase Requisition.

    Hi Experts,
       I am calling a external window from the web dynpro which is working fine. I am trying to open transaction ME53 in the browser and i am successful in that. But now when i open that transaction there were two requirements:
    *1) It should open the purchase requisition directly bypassing the initial screen {which is completed while posting this query}*
    *2) and it should open the purchase requisition according to the specific line item. eg. for PR 1234569 Line Item 0010 should only be visible.
    Please help me out with this.
    Thanks in advance.
    Regards Saurabh Kerkar
    Edited by: saurabh s kerkar on Dec 20, 2010 12:45 PM

    Currently the URL is as follows:
    lv_url = 'http://p10dev.ril.com:8000/sap/bc/gui/sap/its/webgui?~TRANSACTION=ME53%20EBAN-BANFN='.
      concatenate  lv_url lv_banfn into lv_url.
      concatenate  lv_url '&~OKCODE=/00' into lv_url.
    this is opening transaction ME 53 skipping the initial screen with all the line item.
    i want to use it for specific line item how to do it?
    Edited by: saurabh s kerkar on Dec 21, 2010 8:23 AM

  • Sync Addon Setup says "Please enter valid server URL" for Custom Sync Server settings

    While setting up the Sync add-on, I selected "Use a custom server" setting.
    I wish to keep the syncing information on my own server space where my personal website is also hosted.
    No matter what URL i enter (the ftp one or the http addr) it still show a "Please enter a valid server URL" message under the textbox and the next button stays disabled.
    Please help!
    This is important for me because xmarks is of no use to me anymore as it is blocked by our company firewall.
    Hoping "Firefox Sync" proves to be the solution!
    Thanks in advance.

    If you follow the "strong recommendation" to use the Weave Minimal server make sure to watch out for these pitfalls. Took me a while...
    # Don't try to create a new account in Firefox. You must create the account on the command line on the server.
    # Don't forget to take note of the long string printed by the create_user script, that's your SyncKey, and you need it later.
    # In the server URL field in the "sign in with existing account" dialogue, you must enter a trailing slash, ie. if you installed Weave Minimal at https://myserver/weave, you must enter this at https://myserver/weave/
    Good luck. It does work!

  • ICR - Selection times for Customer vs Vendor open items

    All/Ralph
    We have implemented note 1349849 and tested the selection again. I now have a strange result. The selection of customer open items is fast i.e. 120 000 records in 850 sec, however, the selection of the vendor items takes takes 3600 sec for same volume of items??...and times out.
    I have executed several test runs using the selection parameters for both customer and vendor number (just to restrict to one associated company) and the results are consistent, the vendor items take around 3 to 10 times the time as for Customer items.
    The respective total data volume in the open item tables was as follows:
    BSID - 1.8 mil records
    BSIK - 950K records
    Has anyone experienced the above scenario?
    Regards
    Kris

    Hello Kris,
    I suggest you run a trace on the selects and check which indices are used for the tables. You may want to create an additional index for BSIK (or BSAK?) to speed up processing.
    Best regards,
    Ralph

  • HTML Client: How to display the edit screen of an item given its ID?

    To edit a selected item, I could easily add a new button on the command line and choose the existing method, "editSelected"
    But how to edit another item instead of the selected item? Like How to edit an item whose ID # is 10? i.e How to display the edit screen for an item with ID # 10?

    The methods such as 'editSelected' apply to screen property collections. Picking these pre-selected options automatically configure the parameter as '<my-collection>.selectedItem'.
    If you want an action not directly related to the screen properties then you can choose one of the screen commands under the 'Navigation' list starting with 'show', as in 'show<my-screen-name'. If the screen command accepts parameters then you can
    configure the parameter passing manually. In your example, if you added a local 'int' data property to the screen you could assign the ID to that and bind the parameter passed to the screen to that.
    In the instances when not even that is sufficient, well then you write your own custom method.
    Dave
    Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer.

Maybe you are looking for