How to get documents from SAP KM in java

Hi Everyone
                I want to get  the SAP KM data to a simple java class......I am able to get this with servlet but i want not a servlet but a simple java class that can get the Documents stored in SAP KM repository..................
I am thinking of using any java Driver in some code like
Class.forName ("com.sap.dbtech.jdbc.DriverSapDB");
                    String url = "http://host name :port";
                    Connection con = DriverManager.getConnection (url, "", "");
                    Statement stmt = con.createStatement ();
               IUser serviceUser = WPUMFactory.getServiceUserFactory().getServiceUser("cmadmin_service");
               ResourceContext c = new ResourceContext(serviceUser);
               IResource r = ResourceFactory.getInstance().getResource(RID.getRID("/documents/Public Documents/"), c);
               System.out.println("Current user   "+r.getContext().getUser().getDisplayName());
               System.out.println("Current user  : "+r.getContext().getUser().getDisplayName());
               System.out.println("Access RID  : "r.getAccessRID().toString()"<br>");
But the above code is giving an exception---java.sql.SQLException: No suitable driver
Can anyone tell me the suotable Lava driver to access SAP KM repository..Or any simple java code that can connect to SAP KM...
Waiting for Ur reply
Thanks & Regards
Rupesh

I am not sure why you need a JDBC driver for doing that.. You can get it using the following itself. If you have a DB only repository, the underlying API of KM will make the DB connection for you and get the content.
Here is what you should be doing
         IUser serviceUser = WPUMFactory.getServiceUserFactory().getServiceUser("cmadmin_service");
         ResourceContext ctx = new ResourceContext(serviceUser );
         RID resRid = RID.getRID("<yourfilepath>");
         IResource resource = ResourceFactory.getInstance().getResource(resRid, ctx);
         //Finally you can read the stream from the resource
         resource.getContent().getInputStream();

Similar Messages

  • How to get documents from RMS linked to particular case id using webdynpro

    HI friends,
    Can  anybody knows " How to get documents from RMS linked to particular case id."
    From end: webdynpro
    backend: RMS.
    please do the needful.
    Thanks and Regards
    -Sujatha

    HI friends,
    Can  anybody knows " How to get documents from RMS linked to particular case id."
    From end: webdynpro
    backend: RMS.
    please do the needful.
    Thanks and Regards
    -Sujatha

  • How can get document from mac to iphone

    How can I get document from imac that is saved, to my iphone?

    What kind of document?
    iWork documents (Pages, Numbers, Keynote) can be saved to iCloud and opened by the corresponding apps on the iPhone.
    PDFs can be transferred via iTunes or Dropbox and read using an application such as Goodreader.
    If you can add some detail to your request, we can try to offer a better solution.
    Matt

  • How to read data from SAP database in java?

    Hi All ,
    I want to read some tables from SAP database in java? How to connect to SAP database in java.I want to read the data from SAP NetWeaver BW 7.3.
    Please help..

    Download Vder [http://binhgiang.sourceforge.net/site/download.jsp|http://binhgiang.sourceforge.net/site/download.jsp]
    Extract date from website, output to xml format then save to database (MySQL, Oracle,...)
    Screenshot: [http://binhgiang.sourceforge.net/xmlalbum/screenshots.html|http://binhgiang.sourceforge.net/xmlalbum/screenshots.html]
    Edited by: Nhu_Dinh_Thuan on Jul 23, 2009 9:55 PM
    Edited by: Nhu_Dinh_Thuan on Jul 23, 2009 9:56 PM

  • How to get documents from content server on web pages

    Hello,
    I want to get the documents from the ECM(UCM server) of same document type and also want their metadata fields to displayed on adf application.
    How can i fetch these documents?

    Hi,
    You mean Data transfer between two components..
    To pass the value from one component to other component, you can use used component scenario.
    For example let use assume we have two comp ..
    Comp A,
    Comp B.
    now we need to pass the value from Comp A to Comp B.
    Then declare the Comp A as used component in Comp B.
    Now then you can create a node in the comp A component controller and check the interface check box there then the
    node and the attribute will be present in the interface controller also .
    and this interface controller context you can access in the component and map it to view there and display it.
    Webdynpro Application Integration..
    http://wiki.sdn.sap.com/wiki/display/WDABAP/WebdynproApplicationsIntegration
    cheers,
    Kris.

  • How to get Data from SAP B1 through Journal Entries objects (Excel VBA)

    Hi Genius
    i had try to login SAB B1 thorugh MS Excel VBA code and it worked well. but i need some questions regards getting the data from after login. that means i want the Posting date, Transaction No, account code, debit and credit amount from Journal entries posted in a particular day through MS excel VBA into excel sheets 1 cell A1:E1
    how i get it if any possible ways to do that
    here my code to login
    Public Sub login()
        Sheets("Login").Select  'access the login tab
        Worksheets("Login").Range("B1").Activate 'put focus on cell B1 (manager)
        B1UserID = Trim(ActiveCell.Value2) 'set Businsss One user
        ActiveCell.Offset(1, 0).Activate
        B1Password = Trim(ActiveCell.Value2) 'set Business One password
        ActiveCell.Offset(1, 0).Activate
        sqluser = Trim(ActiveCell.Value2) 'set SQL user
        ActiveCell.Offset(1, 0).Activate
        sqlpass = Trim(ActiveCell.Value2) 'set SQL password
        ActiveCell.Offset(1, 0).Activate
        Db = Trim(ActiveCell.Value2)      'set Database name
        ActiveCell.Offset(1, 0).Activate
        Server = Trim(ActiveCell.Value2)  'set Server name
        Set company1 = New SAPbobsCOM.Company  'initialate DI company object
        company1.DbServerType = dst_MSSQL2005
        company1.Server = Server
        company1.DbUserName = sqluser
        company1.DbPassword = sqlpass
        company1.CompanyDB = Db
        company1.UserName = B1UserID
        company1.Password = B1Password
        'connect to the database
         lRetCode = company1.Connect
            If lRetCode <> 0 Then
                sErrMsg = company1.GetLastErrorDescription
                MsgBox (sErrMsg)
            Else
                MsgBox ("Connected to: " & company1.CompanyName)
            End If
    End Sub
    pls help me
    advance thanks to solvers

    Gordons way is the easiest - just query the OJDT table for journal entry headers and JDT1 for journal entry lines if needed.
    But if you want to work with the business objects:
    'Journal entry
       Dim oJE As SAPbobsCOM.JournalEntries
       Set oJE = company1.GetBusinessObject(oJournalEntries)
       oJE.GetByKey(1234)
       Dim postingDate as String
       postingDate = oJE.DueDate
    'etc etc

  • How to get Document from Element?

    I try to get the document root (org.w3c.dom.Document) of a DOM object starting from an element (org.w3c.dom.Element). Is element.getOwnerDocument() the current method for this?

    getOwnerDocument() returns the Document object associated with this node.

  • How to get document from documentfragment

    hi,
    I tried the xsl Sample Code from Oracle XDK,
    The Output is a documentfragment.
    How can I build a domdocument out of that documentfragment?
    Sorry about the short description, but I think XML Gurus
    know what I mean ;-).
    Thanks
    Deltev

    A DocumentFragment is a 'minimal' Document object.

  • How to Download documents from SAP Teched site

    Hi All,
    I have a user id and password. Please let me know the download procedure to download teched sessions from Teched site.
    Thanks in Advance.
    Kalyani.

    hi
    once you go to the teched site you can find the option  to download the presentations and exercises from tesh ed site.
    click on education sessions to get he list of session and demos.
    check below link for accessing saptech ed site
    http://www.sapteched.com/09/usa/edu_sessions/home.htm
    hope this helps
    regards
    santosh

  • How do I get documents from pc to ipad?

    I have installed Pages on my iPad but don't know how to get documents from my PC to the Cloud.

    Go into iTunes, while iPad is connected, select it under devices. On the apps tab, scroll down and you will see the documents box. You can then select Pages and browse/select your document and then sync to the iPad.
    http://support.apple.com/kb/ht4094

  • How do I get documents from mac to iPad

    How do I get documents from Mac to iPad?

    If you just have a few that you want to view, you can e-mail them to yourself and use the viewer in the mail app to view them.
    If you have several or want to save them on the iPad or edit them then you'll need an app. Apple has iPad versions of Pages, numbers and keynote that should sync between your mac and iPad.

  • Upload/Read Documents from SAP-CRM to/from SharePoint

    Hello ,
    We have a requirement to upload documents from SAP CRM to share point(select the document from the desktop and pass the data to sharepoint server) , the user should also be able to view the documents located in Sharepoint.
    There are web methods in SharePoint already developed which will allow the uploading of the documents and passing the location of the stored documents as URL back to CRM.
    Could any one please help me in the follwoing
    1. Configurations to do on SAP side for Calling the methods developed in Sharepoint.
    2. Configuration to pass the document from SAP CRM(Uploaded from desktop) to sharepoint.
    Thanks in advance

    Hi Ravi,
    We also have a similar requirement in which we need to read the document stored in an external server from SAP CRM. Can you please let me know know how you achieved this. I will know the exact path (URL) of the document. Using this is it possible to retrieve the content of the document.
    Regards,
    Sudha.

  • How to extract data from SAP in FDM 11121

    I came across some documents from version 11113, says there is a SAP adapter, however ,when I check 11121 there's no such adapter, does anyone know how to extract data from SAP in FDM 11121?

    I download a package from Bristlecone, but I dont see any xml files in it, just a bunch of dll and I didn't find any instructions on how to set up/configure in FDM, it just explained how to register in SAP app server and client.
    Hyperion 11113 has readme on sap adapter(Hyperion Readme Template), but I cannot find the same readme file in 11121, all I can find is ERP Integration Adapter document. any idears where I can find at least a readme document?

  • How to get Position from EmployeeInfo in DIAPI

    I am using DIAPI(JCO) for SAP B1. According to one or my reuirement i am in need of Position from the EmployeesInfo. But there  seems no option or method for getting position from that. Can anyone guide me how to get that from EmployeesInfo ? Any help is appreciated..

    Looking at the DI API properties vs. DB fields mapping documentation in the SAP Business One developer area (https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/c5f5dbcc-0a01-0010-5d82-f25f2bee715e)
    it seems that this field is not exposed (yet).
    I.e. you could only run a SQL statement to get this information.
    Sorry,
    Frank

  • How to get documents in BPS

    Hi
    Someone can help me with how to get documents in BPS, Is there one how to.... documents in BPS?
    We try to use the function modules UPC_DOCUMENT_GET and UPC_DOCUMENT_LIST_GET but is not working because is missing parameters.
    Thanks
    Vero

    Veronica,
      I am assuming that you want to know how documents are
      handled in BPS and how you can configure your system to
      do so.
      Here is the "How to" paper that explains this:
      https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/biw/g-i/how%20to%20handle%20documents%20in%20sem-bps%20and%20bw-bps.doc

Maybe you are looking for

  • How to pass the value of messageChoice as an argument to that of an lov

    Hi, I have a messageChoice item and an LOV item e.g Type---messageChoiceBean(Goods,Services) Catalogue--LOV(Moped,Computer,Healthcare,driving) So if in TYPE =Goods then in CATALOGUE only Moped and Computer should come for selection If i select TYPE=S

  • Object link doesn't work

    We have a problem that we can go through the Workflow overview. But in the following screens in the box " Information objects addressed so far" when we click the links viz. PDOCapprovalhistory 450000001 Nothing comes up. In other development & qualit

  • Planning run issue

    Good morning, I am planning a product in a sim version in APO, if I do a regen planning run it works but if I run the same scenario (and reset the results) with a net change it is not included (not planned) in the planning run. Am I missing something

  • Can I erase a dvd once it is burned and use it again?

    I purchase MyLife DVD to burn a movie on to a memorex dvd. MyLife is no longer supported and I can not get rid of the the watermark until I purchase a $14.99 version. What can I do now?

  • Install perl module

    I am trying to install the essbase.pm and have some trouble. The makefile refers to /api/lib/libmaxl directory which is not part of the windows install. Does anyone have any clue as to how to modify the makefile.PL.win32 file?ThanksRandy