KM Root folder path in Web Dynpro

Hi,
How can I get full path (inlcuding drive of the file system) of documents root folder, which is configured in KM.
If any body knows give me the details to get it.
Thanks
Bobby M

Hi Bobby
Here is the code for ur requirement
<i>
   IWDClientUser wdClientUser = WDClientUser.getCurrentUser();
   com.sap.security.api.IUser sapUser = wdClientUser.getSAPUser();
   // create ep5 user from current user
   IUser ep5User = WPUMFactory.getUserFactory().getEP5User(sapUser);
   IResourceFactory factory = ResourceFactory.getInstance();
IResourceContext context = new ResourceContext(ep5User);
RID root_rid = RID.getRID("/documents");
ICollection root = (ICollection) factory.getResource(root_rid,context);
// Now read the file contents of say file1
  FileInputStream in = new FileInputStream(file1);
  Content content = new Content(in,"byte",in.available());
RID newRID = RID.getRID("/documents/" +  filename_portal);
   if(factory.getResource(newRID,context) == null){
        IResource newResource = root.createResource       (filename_portal,null,content);
// else file already exists</i>
(Please award the points )

Similar Messages

  • F4 help popup to browse file path in web dynpro

    I need F4 help popup to browse file path in Web dynpro (for example C:\dir\file.xls). Popup should come like FM "F4_FILENAME" in report programming.
    Am i need to create another window or is there any other standard functionality there for this help.
    Please give your view to achieve this.
    Thanks
    Gokul

    Hello Arun & Abhi,
    File upload UI element has showing File browse pop up. But i want to download file from an internal table to Excel. User need to give file path so that the directory selection needs to be done. And also the user will select the directory and type the file name (File so far not exist) for download.
    If i add UI element 'File Download' I am getting a link and i cant browse directory and give file.
    Give your suggesions.
    Thanks
    Gokul

  • How to browse for a folder with ABAP WEB DYNPRO

    Hi,
    I want to browse for a folder in my local file system with ABAP
    WEB DYNPRO. I am looking for a functionality which the function module
    TMP_GUI_BROWSE_FOR_FOLDER gives.
    Regards,
    Vinay

    HI Karl
    Good evening, I am Maruti from London. I would like to paractise ABAP WebDynpro.I am not sure which Vesrion of SAP R/3 supports for ABAP WebDynpro applications. Can you please suggest me .
    Thank you
    Maruti
    [email protected]

  • Create  PCD folder using web dynpro Java

    Hi All ,
    I would like to create pcd folder structure using web dynpro java
    i.e. My folder at top level and under this there will be iviews , roles , worksets  etc.
    Is it possible using WDJ ?
    I have checked the below link , but for folders I did not get anything.
    http://help.sap.com/saphelp_nw04/helpdata/en/44/6aaf92f5a23672e10000000a114a6b/frameset.htm
    Can you please help me ?
    Thanks,
    Sandip

    Hi,
    Please refer to the following document
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/508baf88-9335-2d10-efa6-c6ad61e5fc4b?quicklink=index&overridelayout=true
    The same can be implemented in webdynpro also.
    Regards,
    Raju Bonagiri
    Edited by: Raju Bonagiri on Sep 3, 2010 8:36 AM

  • Error:  The local root folder, ZZZZZZ, does not exist.  Please...

    Dreamweaver newest - Cloud
    Windows 7 Prof 64b SP1
    Everyday now upon firing up Dreamweaver I am getting the same error. As long as I worked on this certain site last the day before, dreamweaver of course tries to load that site upon the next startup.
    The error:  The local root folder, ZZZZZZ, does not exist.  Please choose a new local root folder
    I have typed the path myself and browsed to it many times.  When I go into the Site manager/edit site to correct this, it already has the correct path listed there.  If I just leave what is there and hit save, it doesn't work.  Once re entering is done it allows me to work on the site again. Connecting to remote/upload files and everything works fine.  I can close DW and reopen and all will be fine, for a while.    If I close it and maybe two hours later come back to work on it, DW will report that same error again on startup.
    Other editors of the site with same cloud version of DW and same site settings are not having this error. We've combed for differences.
    I've deleted the site definition altogether and recreated it.  It does not stop the error.
    I found some old references to this issue in the old macromedia forums dealing with Mac and spaces or odd characters being an issue in the local folder path. I'm on windows, but the complaints sounded so similar I decided to try a test suggested there.  Their suggestion was to create a new blank html file, without saving, add some text, select the text, use the link icon in the properties manager to drag a link out to any file in the files panel.  Upon doing so, DW creates a full local path that you can see in your html since you haven't saved the file yet.  The suggestors of this test said you should see if your "mac" and DW was having trouble with spaces or odd characters in the path.   Well the following path shows a PIPE character being created in the path by DW on my test page. 
    file:///W|/private/09 Websites/zzzzzz/index.html
    Could this be showing there is some kind of issue that I need to correct?  Or is this typical?  See the pipe character being listed after the network drive letter of W
    Our local root folder path:
    W:\private\09 Websites\zzzzzz\
    Server Settings:
         Root Directory:
    public_html/zzzzzz.com/
         Web URL:
    HypertextTransferProtocolCOLON//worldwideweb.zzzzzz.commercial/
    Any help or suggestions would be appreciated.

    Sudarshan Thiagarajan wrote:
    remote
    /home/zzzzz/public_html/zzzzz.com
    Is this how your remote setting is defined? If it is, do you have a folder called zzzzz.com on your remote server trailing public_html? Ideally public_html is your website root - index.html resides within that, unless your configuration states otherwise.
    To come to your actual question of the local root folder, yes, your file manager wont show files if the connection fails. However, accessing it depends on the permissions you have on your network drive. Have you checked that?
    I'm not sure why our guy has another folder underneath public_html. My guess is he has some company related hosted test folders for various things under there.  I can see a couple other folders under public_html while checking with filezilla. I suppose he just directed our domain to our web folder under public_html. 
    Again, two others here are using these exact same settings with no root folder errors from DW. We've checked many times and all is the same for them.
      Here are some screen grabs of the settings if this makes it more clear.
    This last one showing the remote connection address under the files/assets panel is the one that looks strange to me.  It shows a home folder / then a folder with our site name / then public_html / then our sitename.com .    Seems convoluted to me.  But it works for everyone else so I'm not sure if this error I'm getting has anything to do with these settings or if there is just some old DW settings file hung up in my system that I need to find and delete or what.
    Thanks for any ideas.

  • Open a Local File located in a Web Dynpro Project

    Hi, I'm trying to open a file saved in a new folder called (XSLT) created by me in a web dynpro project.
    When I try to do this, the following exception is thrown:
    ...java.io.FileNotFoundException: F:\usr\sap\DEP\JC00\j2ee\cluster\server0\XSLT\sad.xsl (The system cannot find the path specified)....
    The code that tries to load the file is the next:
    Document xslDoc = dBuilder.parse("XSLT/sad.xsl");
    My Question is: what should be the file path that I should use in order to be able to open a file that is saved into a folder inside my Web Dynpro Project, of course, using a relative path...
    Any ideas???

    Felipe,
    Classes from custom folders are not included in build.
    You may place "xslt" under src/packages and acces them via ClassLoader, i.e.
    Document xslDoc = dBuilder.parse
      this.getClass().getClassLoader().getResource("xslt/sad.xsl")
    Valery Silaev
    EPAM Systems
    http://www.NetWeaverTeam.com

  • Dreamweaver 6. I can't reference root folder on test server - any ideas please?

    Dreamweaver 6. I've set up a copy of a site onto a test server. All fine other than a problem with links to the root folder.
    The web URL for test server is set up as http://localhost:8080/bhtownsite/ but when I set up a link to the site root e.g. /photos/pictures.php, instead of going to http://localhost:8080/bhtownsite/ the system ignores the 'bhtownsite' folder and goes to http://localhost/photos/pictures.php which of course doesn't exist!!
    I've no hair left to pull - any suggestion would be greatly appreciated.
    Thanks

    @Murray,
    I don't have a Root Directory field in my Testing Server definition (CS6 12.2). 
    Server name:  Testing Server
    Connect using: Local/Network
    Server folder:  C:\wamp\www\MySiteName\
    Web URL:  http://localhost/MySiteName/
    Is that something new in CC?
    Nancy O.

  • Calling session bean's business method through web dynpro component

    Hi All,
    Can anybody tell me how to call a session bean's methods through a web dynpro WITHOUT java-model or web service model ??
    I have following scenario:-
    1. Stateless Session bean having two business methods
    2. Web Dynpro component
    3.Now i want to call business methods without using any model. I have got following piece of code but I dont know how to go about it.
    4.Where do i have to set JNDI name for session bean? which interface will be looked for?
    5. Do I have to declare public part for EJB DC? If yes, how?
    //This is inside web dynpro component
    InitialContext   context = new InitialContext();
    o = context.lookup(JNDIName);
    TestSessionbeanHome homeRef = (TestSessionbeanHome) PortableRemoteObject.narrow( o,                                                                               
    TestSessionbeanHome.class);
    TestSessionbean beanRef = homeRef.create();
    <returnValue> = beanRef.<ejb method name>
    Please help to get a step-by-step approach to this case.
    Thanks and regards,
    Amey Mogare

    Hi,
    If  I comment out the part that is using session bean's business method, DC is building fine.
    And if I uncomment, then compiler is unabl eto resolve business method(s).
    And i would like to mention that my EJB + J2EE App DC is building properly, but it havent yet deployed properly as I am waiting for data-source-alias name prefix to be configured by ERP team. So will this be a reason why Web Dynpro DC is not able to resolve business methods ??
    Because Web Dynpro DC is able to resolved all interfaces of Session bean and entity bean. But when it comes to business method, its not able to resolve.
    Any more ideas why it is not happening?
    Pls help.
    Now i went through some forum posts regarding this and found that we also need to add EJB DC to Java Build Path for WebDynproDC>Properties>Java Build Path.
    I did this and now it is able to resolve business methods and DTOs as well. So to summarize I did following:-
    1. Added EJB DC (complete DC) as a Used DC to Web Dynpro DC with Buid-n-Deploy-n-Run time dependency
    2. Added Sharing reference of J2EE application DC to Web Dynpro DC -->Properties
    This reference I constructed as follows:-
    <vendorname>/<name of j2ee application as appearing under display name tag in application.xml (replacing '/' with '~')>
    So my Sharing Reference becomes:- <vendorname>/reqpstapscreqpstapja_reqid
    3. Added EJB DC to Java Build Path in Web Dynpro DC's properties
    4. Then I added following piece of code to get object of SessionBean class
    InitialContext context = new InitialContext();
    Object o = context.lookup("java:comp/env/ejb/SessionRequestIDBean");
    SessionRequestIDHome homeRef = (SessionRequestIDHome) PortableRemoteObject.narrow(o, SessionRequestIDHome.class);
    SessionRequestID beanRef = homeRef.create();
    beanRef.<business method>
    But After doing this I am facing another problem :-
    The build fails saying it is not able find the package for DTOs. But when I see the Component Controller's code it is not showing any red or yellow marks.
    Can anybody pls help me out here?
    Thanks and regards,
    Amey Mogare

  • Publish the website to the root folder (without creating a new folder)

    Hi there! Sure this problem has already been discussed here many times and I'm not the only one who's interested this question, but how can I publish my website using FTP without creating a new folder, just to the root folder of my web hosting? Is that even possible or should I each time drag all the files from the folder created by iWeb and put them to the root folder manually? I'm a little bit confused. Guys help me with this, please! Many thanks in advance!!

    Yes, you're right, it has been discussed for the past several years and yes, you're not the only who's interested in that question.
    A simple googe search confirms it : avoid iweb sitename
    Try it, if you haven't done it already.
    Here's my answer :
    http://www.wyodor.net/htmlegg/TallCard/TallAjax.html?pg=avoidSitename

  • InteractiveForm UI Element in Web Dynpro Java - Image not displayed on form

    Hello Experts,
    Using: NetWeaver Developer Studio 7.0.1_06; Adobe Livecycle Designer 8.1.
    I have an image "image.png" in my src/mimes/components/com.mm.InteractiveFormComp folder within my web dynpro java project.
    I load the image into my context in wdDoInit method in the comp controller:
    wdContext.currentContextElement().setImage("image.png");
    In the interactiveform I have an ImageField on the form and have set its properties as follows:
    Field - URL = http:[host]:[port]/webdynpro/dispatcher/InteractiveFormComp/src/mimes/components/com.mm.InteractiveFormComp/image.png
    Field - Embed Image Data = "checked"
    Binding - Default Binding = Image
    However, no image ever shows up on the form. I have also been through many threads in the forums but havent found a solution. Can anyone please assist me?
    Regards,
    MM.

    Hello,
    I tried using jpg and bmp. Didn't work.
    Any other suggestions?
    Regards,
    MM
    Solved it!
    Edited by: Marshall Mathers on Mar 9, 2011 9:53 PM

  • Importing EJBs into web dynpros

    I have created EJBS and I would like to use these EJBs in
    web dynpros. How do I do it.
    I think I can create a jar file for the EJBS and reference them in my Web Dynpro project but I think that is not the right way to do it.
    Thanks,
    PKK.

    Hi Simon + Praveen,
      I will try to walk you through how to do it but I think you may need a bit of experience with EJB's, Web Dynpro and NWDS to understand it right away. <i>The following assumes you have created a session and entity bean.</i>
    First you need to make sure your table is deployed in the database that you created(dictionary perspective).
      Second deploy your EJB (.ear file) to the J2EE engine (J2EE development perspective)
      Third switch to Web Dynpro perspective and goto your project properties (right click on the project and click properties)
       Now goto Java Build Path - libraries - add external jars and add the EJB-Jar file. then choose the tab called "order and export" and move the jar file to the top.
    <b>THIS IS A LITTLE TRICKY</b>. Next you need to add the sharing reference. In the same properties wizard where you add the java build path select Web Dynpro References and then select the Sharing references tab. Click on Add and enter the vendor name and name of the ear file like this <vendor name>/<name of the ear file>, This is how your web dynpro knows where the ear file is on the j2ee engine. <b>IF YOU ARE NOT SURE WHAT IT IS</b> you need to access the J2EE visual administrator. and goto SERVER 0/Services/Deploy then select the "runtime" tab then look under <i>Server 0/EJBContainer</i> save all your meta data. your WD application now accesses your EJB logic.
    Good luck!!
    -wael
    *plz dont forget the rewards?

  • Using External JAR file within Web Dynpro DC

    Hi,
    I have created a Web Dynpro DC and I need to use an external JAR file.
    I want to use this external JAR file within the same Web Dynpro DC and NOT creating another DC to house the external JAR file as I can see from the blog.
    I have included the external JAR file in the "lib" folder of the Web Dynpro DC.
    When I tried to perform a DC build, it keeps complaining error....
    How should I solve this problem...
    Thanks.
    mike

    Hi Mike,
    Go through the below which might help you.
    Re: Lookup of RFC Destinations
    Re: Import a Java Bean from a different DC
    Web Dynpro References
    Re: j2ee library with webdynpro
    Re: Web Services :HTTP Destination not getting resloved.
    http://help.sap.com/saphelp_nw70/helpdata/en/46/3ce3e4df201d63e10000000a11466f/frameset.htm
    Thanks n Regards,
    Jhansi Miryala

  • Problems while accessing images outside the web document-root folder

    Our application runs on Oracle application server on Linux. Facing problems while accessing images outside the web document-root folder. This works with changes in global-web-application.xml by including the <virtual-directory> tag. The same change does not work when done on Linux machine. It is unable to find the image. Please help in resolving this issue.
    </locale-encoding-mapping>
    </locale-encoding-mapping-list>
    </web-app>
    <virtual-directory virtual-path="/img" real-path="/home/eposuat/" />
    </orion-web-app>
    Code in the jsp:
    <img width=700 height=700 src="/img/3.tif"></img>
    <img width=700 height=700 src="/img/WB.gif"></img>

    This is one of the least satisfactory aspects of site management in Dreamweaver, and several developers, including myself, have been pressuring the Dreamweaver team for some years to improve this. Who knows? They might eventually take notice.
    The only way to do this at the moment is to create two site definitions, one nested inside the other. Set up the site definition normally based on htdocs as your site root. Then create a new site definition based on site. Dreamweaver will nag you that it can cause problems, but it won't actually stop you from doing it. The only potential problem is with site synchronization.
    The problem with using site as the only basis for your site definition is that Dreamweaver automatically puts things like the Connections, Scripts, and other folders in the site root. So, everything ends up at the wrong level of the site hierarchy. Quite frankly, the whole thing is a bit of a pain. Dynamic site development was added to Dreamweaver only in version 6 (Dreamweaver MX), and no one had really thought through the need to store files outside the site root.

  • How to write the folder path in standard webi report - Most Accessed Documents

    How to write the folder path in standard webi report - Most Accessed Documents
    All
       -> Public Folders
                      -> Auditor
                      -> ABCD
    I want to give path of folder 'ABCD' and all the reports/ subfolders under it?
    Prompt - 'Enter the Folder Path(Add % at the end to include Sub Folders)' ?
    Give me exact path syntax

    Hi Daniel,
    But when I give my URL as
    http://serverA:80/irj/portal??NavigationTarget=ROLES://portal_content/crm-practice/14-Feb/Test_Page
    I am able to access the iview but the thing is I am getting TLN,Toolarea,Masthead,etc.
    I will tell my requirement,
    ServerA (EP 7.0) has some iviews,pages...
    I need to access these iviews from serverB(EP 6.0)....
    In ServerB only the iviews has to be displayed in the content area but not TLN,Toolarea,etc.
    Kindly help me in this regard.
    Thanks and regards,
    Purushothaman.
    Message was edited by: Purushothaman Vyasarao

  • Error 1324: the folder path 'webi/' contains an invalid character

    Hi pros,
    I am getting this error when trying to install bobj xi 3.1 client version. the service pack is zero.
    however, i previously had bobj xi 3.1 server / client components installed and bobj 4.0 client tools.
    i uninstalled bobj 4 and bobj xi 3.1 server components from control panel. also, deleted them from registry.
    still i am getting the above error.
    kindly advise.

    Hi,
    Can you please check the following thread which is for the exact same question :
    error 1324: the folder path 'webi/' contains an invalid character
    Regards
    Steph

Maybe you are looking for

  • Help Needed Creating AppleScript for Dial Up Access and Updates

    Hello, Due to my location I can only access the internet via Dial Up. I would like to create a script that wakes up my Mini early in the AM, dials my ISP and checks to see if there are any Apple Updates. I'd like to do this at night so my family does

  • Best camera for our use?

    hello, We are a web company that is interested in doing quality videos of our client speaking about their company or for testimonials to put on the site. We have a green screen, and have did some tests with a borrowed Sony HDR-HC3 HDV 1080i. THe resu

  • DAQCard6024e & USB-RS232 Conflicts?

    Has anyone had problems using both a DAQCard-6024E in a notebook computer that also uses a generic USB to RS232 converter? We've had several instances in different computers and different USB-RS232 converters where not long after installing and using

  • Cant install quicktime

    Hi there.. i bought myself a new mac book pro and deinstalled quicktime.. why is not so important.. stupid thing to do because i tried to install quicktime with the downloaded quicktime for leopard 7.5 and it says this "software is not meant for this

  • Booklet printing vertical alignment

    I am printing a 4-page booklet in Acrobat 9 Standard and would like the document to be aligned with the top of the page rather than vertically centered.  Is this possible? This is what is currently looks like: