How to browse local file using web dynpro

hi everyone
How can I browse local file using Web Dynpro?And read file names into Context or array. I have tried the following code but its not working
String resourcePath = WDURLGenerator.getResourcePath();
String depObjResourcePath = WDURLGenerator.getResourcePath(“Test”);
WDDeployableObjectPart appPart = WDDeployableObject.getPart(“Test”, “TestApp”, WDDeployableObjectPart.APPLICATION);
help required urgently
Thanks & Regards
Jaspreet Kaur

Reply in
how to browse local file using web dynpro
Regards,
Ashwani Kr Sharma

Similar Messages

  • How to call PDF file in Web Dynpro Appl?

    How to call PDF file in Web Dynpro Appl?

    Hi Gobinath,
    1. Create a value attribute of type byte called pdfSource.
    2. Insert an UI element called Interactive Form in your layout
    3. Set the source property of this Interactive From UI element to the context pdfSource.
    4. Insert a button which would open your pdf file.
    public void onActionsubmit(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionsubmit(ServerEvent)
       IPrivate<viewname>.IContextElement contextElement = wdContext.currentContextElement();
             byte[] bytes = contextElement.getPdfSource();
             try
                   File file = new File("C:
    temp
    example.pdf");
                   FileOutputStream os = new FileOutputStream(file);
                   os.write(bytes);
                   os.close();
                catch (IOException e)
                   // do something
                   e.printStackTrace();
        //@@end
    Warm Regards,
    Murtuza

  • File Visibility in uploading the file using web DynPro java

    hello,
    i have gone through the tutorial " uploading & downloading the file using web DynPro java".
    the upload functionalty is working fine. but i need to know thw path where these files are getting uploaded ??
    Waiting for the reply..
    Regards,
    Viren Gupta

    Hi Viren,
    Are you are refering to the below tutorial for upload and download:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0e10426-77ca-2910-7eb5-d7d8982cb83f?QuickLink=index&overridelayout=true
    If yes, then answer is that the file is stored in the context of the application only as "com.sap.ide.webdynpro.uielement-definitions.Resource" object. Please read through the tutorial to understand the full process.
    WD doesn't really upload to server automatically unless there is any explicit code written. All it does is to store the file in a temp context which you can access and write your own code to store it in a particular location.
    Regards,
    Mahesh

  • How to call DOC file using web.show_documents

    Hi friends ,
    If I use the built-ins web.show_documents for open the *.doc file
    I am getting the following error
    ORA-06550: line 5, column 2:
    PLS-00201: identifier 'README.DOC' must be declared
    ORA-06550: line 5, column 2:
    PL/SQL: Statement ignored
    DAD name: WebDB
    PROCEDURE : readme.doc
    URL : http://132.148.160.3:80/WebDB/readme.doc?
    PARAMETERS :
    ===========
    ENVIRONMENT:
    ============
    SERVER_PORT=80
    SERVER_SOFTWARE=Oracle WebDb Listener 2.1
    SERVER_NAME=132.148.160.3
    GATEWAY_INTERFACE=CGI/1.1
    SERVER_PROTOCOL=HTTP/1.0
    REMOTE_HOST=132.148.160.251
    REMOTE_ADDR=132.148.160.251
    REQUEST_METHOD=GET
    QUERY_STRING=
    SCRIPT_NAME=
    PATH_INFO=/WebDB/readme.doc
    HTTP_ACCEPT=*/*
    HTTP_ACCEPT_LANGUAGE=en-us
    HTTP_ACCEPT_ENCODING=gzip, deflate
    HTTP_USER_AGENT=Mozilla/4.0 (compatible; MSIE 5.01; Windows NT)
    HTTP_HOST=132.148.160.3
    HTTP_CONNECTION=Keep-Alive
    Please advice How to call Doc file in web.
    Thanx
    null

    The syntax to execute web.show_document:
    web.show_document('http://server_ip_or_server_name/virtual_path/filename.doc')
    The virtual path has been defined in Apache (if you run on web with Apache) or has been defined in Internet Inoformation Server (if you are runing with Internet Information Server.)
    null

  • How to get a r/3 file using web dynpro

    Hello Experts.
    Actually I have a new request, I hope you can help me please.
    I'm a web dynpro programmer (java), so my company need to take a r/3 file to download at the local pc. In fact, the file is en r/3 already.
    The matter is, i have no idea how to get that file since my web dynpro app. to download it. the file is a compressed file may be a .ZIP file... so any of you can let me see the light in this??
    thak you all.
    walex

    Hi Walex,
    You will first need a RFM that returns the file that you need.
    Then you can create a Adaptive RFC model in Web Dynpro to access this RFM and store the file in the Web Dynpro context. Web Dynpro provides APIs to save files to the local system
    You can check this article for downloading the file.
    http://wiki.sdn.sap.com/wiki/display/Snippets/WebDynproJava-ExportingTableDataUsingOn-DemandStreams-SAPNW+7.0
    Best Regards,
    Supriya

  • How to create dictionary table using web dynpro?

    Dear Experts,
    Please clarify my doubts.Im new in this EP development.
    Im using EP6 portal with NWDS6 for dev.
    My Doubts are :
    Im trying to develop a web dynpro application which captures some data and insert/update in Table.
    => If we create a structure Dictionary in web dynpro application will that automatically create the table in Portal database?
    => If it is automatically created how to insert or update that table.
    can any one plz help.
    thanks and regards,
    Viswes.

    Hi Visweswara
    This will use the concept of EJB.
    Refer these for creating Dictionary tables...
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/70929198-0d36-2b10-04b8-84d90fa3df9c]
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1f5f3366-0401-0010-d6b0-e85a49e93a5c]
    As far as answer to your second question is concerned,
    => If u create a structure Dictionary in web dynpro application  it will not create the table in Portal database..
    You can access that table via creating a web dynpro iview in Portal..
    Only application can accessed after deployment via iviews in Portal..
    Thanks...
    Rewards Appreciated...

  • How to send large files using web service

    hello everyone,
    I am new to this forum, so please pardon me if I post some silly problem...
    I have created one service which sends file when client (jsp) request it. I am using JBOSS as my server. purpose of this application is when client request some fle then service will send this file... and most of the time we need to send only pdfs and ppts...
    Problem is, this service sends txt, java files easily of any size but when i tried sending PDF, PPT then i got xml.SAXParseException.......
    I thought this error is because of some characters, but how to fix it....
    I am working on Linux.
    code snippet is:
    import java.io.*;
    public class MyHelloService
    public String file_size (String name)
         String s = new String("");
    byte[] sendata1=new byte[100];
         try
              System.out.println("name recived is :::::::::::"+name);
              FileInputStream in=new FileInputStream(name);
              int size=0;
              size=in.available();
              System.out.println("FILE SIZE IS:::::"+size);
              byte[] sendata11=new byte[size];
              i=in.read(sendata11);
              System.out.println(new String(sendata11));
              s=new String(sendata11);
         catch(Exception e)
                   System.out.println("EXCEPTION IN JWS:::"+e);
                   s=new String("nofilefounderror");
         return s;
    pls tell me what am i doing wrong ad how to fix this?
    and one more thing can i send byte array from a web service as i tried but couldnt do that... so i am reading everything in a single byte array and then converted to string.....
    is it possibel to send file in a chunk?if yes, how to do that?
    waiting for the reply..... pls reply as soon as possible....
    Rashi

    hi,
    I am sending file from server to client i.e client will request for a file and service will send it back....... no socket connection is there...I am using JBOSS and apache axis.
    pls help me out.....
    Rashi

  • How to browse local files in Client Side and pass to a text item?

    I am writing an Oracle 10g Form to get the path and filename from local PC (Windows XP) by clicking a Command Button, select the folder and files and then pass the full path and the filename to a Text Item.
    Does ORacle10g supports this feature?
    If yes, would this features also work for Linux?

    Hi,
    Check out WebUtil from
    http://www.oracle.com/technology/products/forms/htdocs/webutil/webutil.htm
    HTH.
    Regards,
    Arun

  • How to include Text file in Web Dynpro structure

    Hi Guys,
    I know that you can add a "File" object against a Java project (right click on project: New -> File).
    Is this possible with WebDynpro?  In other words, can I add a Text file "object" against my DC?  I need such a File because I need to store text values in it that I read in my View Contoller.
    Any suggestions?
    Christiaan

    Hi
    Yes
    Select the Navigator view --select the dc --right click --new --other --general --- here u will get the option .
    Note : put your file only under src--make one folder say util and then put your file here.
    Best Regards
    Satish Kumar

  • Create portal user using web dynpro abap application

    Dear All,
    I would like to know is it possible to create portal user-id through web dynpro abap application.
    My requirement is
    > I have to create a web dynpro abap application. In the web dynpro abap application I have name email-id and phone number as entry fields.
    > I will click on submit, one unique id will get created. This unique id will be the login id for portal.
    I found how to create portal user using web dynpro java, but i could not find regarding web dynpro abap.
    If it is possible to create the portal users using web dynpro abap pls share the code as well.
    Regards,
    Swapnil Indulkar

    Hi swapnil,
    I think by using BAPi.. BAPI_USER_CREATE1 you can create.
    Please check this...
    Create portal user from webdynpro abap
    Creating user and assigning a group through code
    user administration su01
    How can i get the portal user id from logon ticket in the webdyn 4 ABAP
    Cheers,
    Kris.
    Edited by: kissnas on May 21, 2011 8:47 AM

  • How to save file in km using web dynpro abap

    Hi Experts,
    We have a requirement that file should be saved in a folder in km, the name of the folder should be the employee number.
    Could you please tell me how to create folder with employee number in KM and store file in it using web dynpro abap.
    Thanks and Regards,
    Santhoshi.

    Thanks Naga Raju Meesala.
    How come all these methods are deprecated...getEP5User
    Also, since I am building a weddynpro DC, what is the proper way to include these jar files as Used DCs?
    Now proceed in the same way with the variable PORTAL_HOME and add the following .jar files:
    u2022 \lib\prtapi.jar The portal runtime APIs
    u2022 \portalapps\com.sap.portal.usermanagement\lib\com.sap.security.api.ep5.jar The user management APIs of the Enterprise Portal 5.0 are deprecated, but still in use in SAP NetWeaver 04
    u2022 \portalapps\com.sap.netweaver.bc.rf\lib\bc.rf.framework_api.jar KM Repository Framework APIs
    u2022 \portalapps\com.sap.netweaver.bc.rf.service\lib\bc.rf.global.service.urlgenerator_api.jar Repository Framework Utility: URL Generator
    u2022 \portalapps\com.sap.netweaver.bc.sf\lib\bc.sf.framework_api.jar Repository Framework: Repository Services
    u2022 \portalapps\com.sap.netweaver.bc.util\lib\bc.util.public_api.jar Repository Framework Utilities

  • How to use web dynpro's web service to import XML file

    Hi
    I have an xml file and I want to use a web dynpro's web service to cosume this file which is existing on my local drive. Can anyone help me which steps I have to do to use this file as a web service using web dynpro.
    Thanks

    Hi
    You can refer below Wiki Article on SDN. I hope that will help you out.
    [https://www.sdn.sap.com/irj/sdn/wiki?path=/display/emtech/consuming%2babap%2bweb%2bservices%2busing%2bflex]
    Thanks.

  • How to display the data of CJ2C(T-CODE) using web dynpro abap

    Hi all:
        How to display the data of CJ2C(T-CODE) using web dynpro abap.
        CJ2C used to display a Gantt Chart.
        Thanks.

    Hi,
    Create a Value attribute (resource) of type Resource, bind it with the property of File Upload UI element.
    On action place the code and Deploy the application
    byte[] bytes = new byte[ 1024];
    FileOutputStream out = new FileOutputStream( new File( <path in server>));
    InputStream in = resource.read( true);
    int len;
    while( ( len = in.read( bytes)) > 0)
         out.write( bytes, 0, len);
    in.close();
    out.close();
    Regards
         Vinod V

  • How to customize ESS Business package files in Web Dynpro

    Hi
    Does anyone know how we can customize the ESS Business Package using web dynpro. I tried opening one of its application but since it doesn't carry any .project file, it cannot be opened in the NWDS for customization.
    Also, if there is any document available describing the method to be used for this, can you please pass the link for that or mail at [email protected]
    Thanks & regards,
    Anupreet

    Hi Raj,
    try this SDN article on <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/21eb036a-0a01-0010-25a3-b2224432640a">Configuring the Business Package for Employee Self Service - mySAP ERP 2004</a>.
    Regards, Bertram

  • How can I open a popup after clicking in a table cell using Web Dynpro?

    Hello,
    I am using Web Dynpro to create an application and I would like to click in a table cell and then a popup with confirmation appears.
    I already have a table with the information that is displayed in the browser. In fact, I just added a column with images that are print icons.
    My problem is that I don't know how to implement the method to set the action: when clicking on the print icon, a popup appears.
    Thank you very much in advance.

    HI Rafael,
    Please check the below sample code
      To quickly create dialog boxes of a standardized layout (for example, for the confirmation of changes to current data) you can call the CREATE_POPUP_TO_CONFIRM method of the IF_WD_WINDOW_MANAGER. You do not need to create a separate window for this. The dialog box is created automatically by the runtime.
    ●      The CREATE_POPUP_TO_CONFIRM method creates an object of the type IF_WD_WINDOW; the dialog box can be created using its parameters.
    method onactionpopup4_1 .
      data: l_cmp_api          type ref to if_wd_component,
            l_window_manager   type ref to if_wd_window_manager,
            l_popup            type ref to if_wd_window,
            l_text             type string_table,
            l_api              type ref to if_wd_view_controller.
      l_cmp_api        = wd_comp_controller->wd_get_api( ).
      l_window_manager = l_cmp_api->get_window_manager( ).
      insert `Data where changed` into table l_text.    "#EC *
      insert `Do you want to save?`        into table l_text.    "#EC *
      l_popup = l_window_manager->create_popup_to_confirm(
                    text            = l_text
                    button_kind     = if_wd_window=>co_buttons_yesnocancel
                    message_type    = if_wd_window=>co_msg_type_question
                    window_title    = 'Test: Popup to confirm'
                    window_position = if_wd_window=>co_center )."#EC *
      l_api = wd_this->wd_get_api( ).
      l_popup->subscribe_to_button_event(
                   button            = if_wd_window=>co_button_yes
                   action_name       = 'YES'
                   action_view       = l_api
                   is_default_button = abap_true ).
      l_popup->subscribe_to_button_event(
                   button            = if_wd_window=>co_button_no
                   action_name       = 'NO'
                   action_view       = l_api
                   is_default_button = abap_false ).
      l_popup->subscribe_to_button_event(
                   button            = if_wd_window=>co_button_cancel
                   action_name       = 'CANCEL'
                   action_view       = l_api
                   is_default_button = abap_false ).
      l_popup->open( ).
    endmethod.
    The SUBSCRIBE_TO_BUTTON_EVENT method of IF_WD_WINDOW assigns the actions to the appropriate buttons
    Thanks
    Vinay

Maybe you are looking for

  • Crystal report - margins problem

    I have a problem with top and bottom margins in my report. In the designer view - File>Page Setup - I have the paper size (A4 210X297 cm). Both the top and bottom margins are set to 2 cm which, If I understand it correctly, printing should start exac

  • Question about POSTING_INTERFACE_CLEARING and POSTING_INTERFACE_START

    Hi people. Could you tell me what the following fm do? POSTING_INTERFACE_START POSTING_INTERFACE_CLEARING Thanks a lot!

  • Consignment stock GR Posting - system creates additional quant

    During GR posting for an Inbound delivery in WMS system, System is not clearing the negative quant created for consignment stock in interim storage area, instead it posts an addiitonal quant in the interim area. Observation: Inbound delivery replicat

  • Number of plays and last played date

    In the current version of iTunes, it no longer seems to update the number of plays for a song or the last played date. (Actually, it does update the date intermittently, but for the most part that feature is no lomger working.) Anyone know how to fix

  • Differentiate between wireless lans

    We are using ACS 5.2 as a radius server for our wireless network. Our current wireless lan is wpa2 with 802.1x enabled. ACS is checking against AD. We would like to setup a new wireless ssid for internal staff that we would grant permission to use. I