Java dictionary

Hi All,
Can i retrive or store data in java dictonary using simple java coding/ using JDBC..?? Is it possible if so, request you to let me know the sample code.
Thanks in adv

Hi
try this for MSSQL server
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
Connection conn= java.sql.DriverManager.getConnection("jdbc:microsoft:sqlserver://<Server>:1433;user=<UserName>;password=<Password>;database=<DBName>");
//do other parts like normal java
see the thread
Re: How to get datasource from SAP WAS 6.40 from standalone java?
Kind Regards
Mukesh

Similar Messages

  • Error while saving date value in Java dictionary

    Hello Everybody,
    I got following error while saving date value in one of the fields of the Java table.
    Internal error occured in submit request: Error in method updateRequestContact : The object of type java.sql.Date with the value '2005-12-04 08:00:00.0' assigned to host variable 9 is not normalized. It must not contain time components in the time zone running the virtual machine.
    I can't find why it is taking time value in the date object.
    This value is coming from the RFC as a date value, and I am saving this value in Java dictionary table.
    Same code for this was working fine earlier. But, now suddenly it gives error like this.
    Even if I provide date on the screen from webdynpro application, this date value can't save in the Java dictionary and gives same error.
    What should be the problem behind this?
    Regards,
    Bhavik

    Hi Satyajit,
    I am getting date value from the screen of the webdynpro application from date picker control and passing this value in Java dictionary.
    More Information:
    I have dat value in the Date object: <b>target_date</b>
    But Now I have made new Date object as following:
    Date target_Date1 = new Date(target_date.getYear(),target_date.getMonth(),target_date.getDate());
    Then I am passing this object to Java dictionary. Still it gives same error.
    Then I have changed code as following:
              int l_year;
              int l_month;
              int l_days;
              l_year = target_Date.getYear();
              l_month = target_Date.getMonth();
              l_days = target_Date.getDate();
         Date target_Date1 = new Date(l_year,l_month,l_days);
    Now it works for me.
    But I guess this is not the perment solution. It looks very strange. I have used so many date objects at various palces. So, this solution is not the final for me.
    I want to findout the main cause of it.
    One more thing: This code was working for a mornth or two. But, now suddenly it is giving this error.
    Please help me if anybody knows.
    Regards,
    Bhavik

  • VALUES NOT GETTING ADDED IN JAVA DICTIONARY

    HIII ,
    AM DOING AN APPLICATION IN WHICH I AM TRYING TO INSERT VALUES IN A TABLE(CREATED THRU JAVA DICTIONARY), USING EJBS(ENTITY BEAN AND SESSION BEAN) AND COMMAND BEAN..AND WEBDYNPRO....
        AFTER DEPLOYMENT EVRYTHNG IS RUNNING FINE BUT VALUES NOT GETTING ADDED IN THE TABLE...
    THE CODE FOR THE "ADD" BUTTON IS :
    wdContext.currentEmp_cmdElement().modelObject().add(wdContext.currentEmp_cmdElement().getEmpno(),wdContext.currentEmp_cmdElement().getEmpname());
    THE CODE FOR ADD function IN COMMANDBEAN IS
    public void add(String empno,String empname){
              try {
                     local.createdata(empno,empname);
                   } catch (Exception e) {
                        e.printStackTrace();}
    PLZZ DO HELP OUT!!!

    The message in simple English just means that "You are doing something really bad" !!! It is absolutely not the communication problem, but understanding problem.
    Though you may be executing the same function using SE37 or in the webshop application through JCo, the runtime context is different and without knowing what exactly your Z rfc is doing, it is very difficult to help. To start with, the userid - that is who is running the RFC is different in both situations. In SE37, it is the logon user and in the web, depending upon whether the connection is stateless or stateful, it could be the anonymous ICSS user or the logged in user. Here again, if you have used UME, it is the user id and if you have used ALIAS user, then it is the alias user id. This is just an example. Your runtime context can be different due to many other reasons too.
    So, to make this simpler - what is that you are trying to do?
    BTW, try not to create multiple threads for the same issue..

  • Java dictionary database table in web dynpro application

    Hi,
    I want to access java dictionary database table in my web dynpro application in java.
    Right now I have created one java dictionary DC.
    and in that Dc i have created two database table .
    Now I want to use this table in my web dynpro application.
    Can anyone help me.

    You can use the Dictionary Projects to create tables in Database. You must use codes to access these database tables that is created using Dictionary projects.
    You have to use the DataSource in order to get connection ; Use Visual Administrator to see the data source name.
    You can use the following code to access the database table.
    ResultSet result = null;
    try
         InitialContext initialcontext = new InitialContext();
         DataSource datasource = (DataSource)initialcontext.lookup("jdbc/<DataSourceName>");
            Connection connection = datasource.getConnection();
         Statement statement = connection.createStatement();
         result = statement.executeQuery( <Query>);
         connection.close();
    } catch (NamingException e) {
         // TODO Auto-generated catch block          
              e.printStackTrace();
    } catch (SQLException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
    Regards
       Vinod

  • How to query Database via Mobile WebDynpro with Java Dictionary?

    Hi all,
    I'm developing a simple mobile webdynpro appplication using Dictionary(DC). My Question is, how the Java Dictionary can query/insert/update/delete the underlying default database tables? I'm reluctant to use EJB as it is just for a simple application. Is there any quick and simple way to achieve this?
    Any help would be much appreciate.

    Hi,
    Dictonary project will helps you in creating tables in the backendand creating the same context structure in your WebDynpro application..
    But for doing update/add records you need to write code .Please check this How to create tables in Database when webdynpro project is deployed
    Regards, Anilkumar

  • Problems with Java Dictionary Tables

    Hi Experts,
    I have some problems with the Java Dictionary tables that I have created for my
    application. There are around 15 dictionary tables, each one of them having
    several hundred records, added in due course.
    As much as I understand these tables (created using the dictionary perspective)
    are stored in the default schema of the J2EE engine where the dictionary project
    is deployed and there is no direct way to insert records into these tables, we have
    to separately write methods to insert, update and delete records.
    I've already done this. Now the problem is that i have moved my project DC from
    development to testing. Now here the tables are existing, but not the data that i
    inserted during development.
    NOW, the main question: IS THERE ANY WAY IN WHICH I CAN TRANSFER
    THE CONTENTS OF THESE JAVA DICTIONARY TABLES??
    I have tried solutions like creating a DBLINK between the databases, but it is
    tedious, and unpredictable in behaviour. Also Please do not advise to first
    download them to excel and then upload using jxlapi, etc.
    Thanx in Advance.
    Alka.

    Hi Alka,
    The dblink is a good solution, but just a bit slow. You can also use a SQL Loader, first export the data from the source table in a text file (i.e. using a tool like TOAD), then sql loader loads the data in the destination table. This is more fast.
    Hope this help,
    Vito

  • Create database view with Java Dictionary

    Hi,
    is there a possibility to create and deploy a database view with the
    Java Dictionary (in SAP NetWeaver Development Studio)?
    It seems as if you can only create and deploy database tables.

    or else, with prior versions, use somethinig like this...
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/7094c365-e8c4-2910-62b6-93712dd555d4

  • Using Java Dictionary With Oracle

    Can Someone tell how can i configure my java dictionary with oracle...Currently if a create a table from my IDE and then deploy it it  deploys to the Default SAP DB ...how do  i directrly create  tables in oracle by just  specifying the Deploy option ...
    And further  on  I want my web Dynpro application to talk with oracle db..how do i acheive this..
    Please Help!!

    Hi, 
             Does this mean that the additional features of The Java Dictionary (bufferring etc ) can only be implemented if we ONLY connect to the SAP DB---- YES
    If I have to utilize the services of Java Dictionary in my application i can only use The SAP DB database -- YES
    You deploy a dictionary project to create a table in the DB.
    When it is a DB created and used by Web AS ,it is possible to create tables in that DB with dictionary project using the standard connection parameters specified in visual admin.
    Java Dictionary purpose is to create a DB abstraction by providing a standard interface to create tables whatever the DB used by WebAS maybe.
    Regards
    Bharathwaj
    Edited by: Bharathwaj R - Hope this makes it clear !

  • Modify a standard webdynpro( RFC import created ) java dictionary?

    hackers , geeks .
    here is the scenario I imported a RFC model from a non-standard RFC.
    the webdynpro i make does not work, i created a jco client and  the connection worked.
    i have mapped the problem , to the java dictionary created by the import process ,
    there is  a "Date" type that when i send via the JCO client i send as a String
    webdynpro  understands the "Date" data type as a java.sql.Date
    as a standard behaviour we cant change the standard dictionary
    is there a work around ?
    or a way to hack away at DEveloper Studio to be able to change the dicionary type ?
    thanks in advance ,
    Guy

    this works (from my test Jco Client) :
              JCO.ParameterList entrada = funcao.getImportParameterList();
              entrada.setValue("20041025, "DATA");
              client.execute(funcao);
              JCO.ParameterList recebido = funcao.getExportParameterList();
              System.out.println(recebido.toString());
              JCO.ParameterList tableExportList = funcao.getTableParameterList();
    this does not (from webdynpro):
    public void executarBapi( )
        //@@begin executarBapi()
        try {
           wdContext.currentY_Ssd_Get_Remessas_Novo_InputElement().setData(java.sql.Date.valueOf("25-10-2004"));
    wdContext.currentY_Ssd_Get_Remessas_Novo_InputElement().modelObject().execute();      
           wdContext.nodeOutput().invalidate();
        }catch(Exception e){
          e.printStackTrace();
    when i pass the value DATA via string , it goes no problem
    put when i change it to sql.Date , it does not work =[ .
    thats why i wanted to change the java dictionary

  • How to deploy java dictionary to other scehma/DB

    I can't find any way to delpoy java dictionary to customized schema  or database.
    Because it deploy to SAP Schema like SAPNWTDB.
    DO I have to create table with SQL in ohter database?
    It's NW 7.3.
    Thanks.

    You can deploy the .sda file using the SDM interface.  On the system where the engine is located, you must run the .bat file.
    C:usrsap<sysid>JC01SDMprogramRemoteGui.bat
    From here you can deploy.
    Regards,
    Rich Heilman

  • How to save data from a server log to the java dictionary table?

    Hi,
    I need a java dictionary and a program which will read data from the log file and save records into tables.
    Can somebody help how to achieve this? Please help!
    Thanks & regards
    Amita

    Hi folks, Give some inputs here....
    Thanks & regards
    Amita

  • Java dictionary table access

    HEllo all,
    I have to access a table created using the java dictionary perspective . I know how I do it by means of creating an ejb and sharing a reference.
    But how do i acess the table if i have to do it using the jsp dynpage model.
    Thank you

    Hi,
    do you use JSP or Web Dynpro?
    - In JSP the procedure is the same as with EJB
    (lookup the jdbc data source via JNDI, using a resource reference you map to the jndi name in deployment descriptor)
    View an example "Getting Started With Open SQL) existing in the examples folder of your SAP NW Developer Studio,
    and the corresponding tutorial in the Docu:
    http://help.sap.com/saphelp_nw04/helpdata/en/bd/b127af68234e868cfd4e9f440aa0bf/frameset.htm
    - In Web Dynpro resource references are not available so you use the JNDI name of the data source in the lookup string.
    Regards, Katharina

  • Preferred Uses of Structure from Java Dictionary

    Hello Friends ,
    I am confused about the scenarios where the structure can be used as the data type from the java dictionary
    It will be help full if could be known about some scenarios which could make the usage of structure clear

    Hi,
    Java Dictionary can be used as a central repository for cross-platform definitions of data types and database objects.
    Data type descriptions in the form of structures are used in Web applications and can be created in the Java Dictionary independently of the program code. Structures created in the Java Dictionary can be reused in different Web Dynpro contexts.
    This useful document link: https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/00c062ec-f90d-2a10-52bd-df57de2d1ddb
    Regards,
    Anagha

  • Java Dictionary and Text

    Hello,
      I'm creating an application that requires me to store a large amount of text (around 5000 characters).  The first part of the dilema is how I should persist the data in the java dictionary.  Should I just create one large field?  Or do I need to do something complex and split up each text into smaller lines and have some retrieval method?  The next part of the question has to do with searching this text.  What is the best way to make this text searchable?  Any ideas are much appreciated.
    Thanks,
    Dustin Gronso

    Hi Dustin,
    if you want to have the text searchable, you have to split it up. For columns of type 'string' there are two possibilities in the Data Dictonary:
    1. varchar: the length is limited to 1000 characters, but you can search with a WHERE condition
    2. CLOB allows longer length, but no index or WHERE condition for this column is possible.
    Hope this helps,
    Juergen

  • Java Dictionary Primary Key

    Hello,
      I'm creating some database tables in the Java Dictionary on Web AS 6.40.  What is the best way to create unique identifiers for the primary key of these tables?  In ABAP Dictionary you would use a number range.  Is there an equivalent or other technique for the Java Dictionary?
    Thanks,
    Dustin

    Hi Dustin,
    the best way is if the logic of your data represent a primary key. If your central data object for example is a project, it will have a project number, and this is unique, so predestinated to be the primary key. If a customer has an order for this project (maybe the project is handled via two or three single orders), you will have an "order" table. For single customers having unique order IDs, the combination of the customers order id and the project id (foreign key) are predestinated to be the primary key.
    If such a logic does not work, it's up to you to implement something (automatic PK generation does not work with the Java Dictionary). A number range seems to be ABAP... I would prefer a PKGenerator, for example generating them out of a combination of timestamp and random number or chars (sure, managing that the generated keys are unique).
    Hope it helps
    Detlev

  • Java Dictionary Project + create autonumber for KEY field?

    Hi there,
    I would like to create a Java Dictionary project that has a table with an AUTONUMBER as the key field.
    I know exactly how to do this in SQL Server using the IDENTITY field but cannot see an option when using the Java Dictionary project?
    Any ideas?
    Thanks for the help
    Lynton

    Has there been an update to this recently?  I am in need of exactly the same information.  The FAQ lists this:
    <i>Can I deploy a Java Dictionary table along with the table content?
    Yes. You can deliver the Java Dictionary table along the table content. There are two possibilities:
    Export from a reference database
    Specification of the table entries in an XML file (since SP5)
    Note that there is no modification support for table entries that are delivered in this way. Therefore, you can deliver table entries with program character or for examples, but not for templates or customizing data.</i>
    Now, I may be reading the note incorrectly, but it makes it sound like if you do populate a table with a XML file, the records cannot be modified thereafter.  Is this true?
    I'd also like to know how to develop the XML and where to put it, etc.  I've had no luck searching for this information.
    Thanks!

Maybe you are looking for

  • ASA5505 - Blocking internal traffic between 2 servers

    Hi guys/ladies I have a cisco ASA5505, it runs a wide site to site VPN network and has 4 servers connected to it 10.50.15.4 > fileserver 10.50.15.5 > domain controller (exchange) 10.50.15.6 > terminal server 10.50.15.7 > terminal server Now yesterday

  • Photo stream photos not showing up in screensaver after update

    AFter the current update my Apple TV has been unable to find any pictures from my "photo stream" which I used as a screensaver for my apple tv. My phone and computer both show "846" photos in iCloud. Any suggestions would be appreciated. Already trie

  • Question about dock bar when using external screen

    Hey. For a while now, I have been using an external monitor with my 24" iMac. It has been running fine and the dock bar has been on the iMac's display along with the menu bar. Today, I switched it around and when I plugged the screen back in, the doc

  • Print on network printer

    How can I print from I pad 2 on my desk top printer which is shared on the network? when I click select printer I pad is unable to find the printer it does not give any other options to find it. I could not find anything in settings which helps set u

  • Why Is Adobe employee Directory don't display picture properly?

    I've been wondering about that for a while, and did think that it was because the picture were resized by the APP, but they are not....it seems that the rendeering process is saving the photos all jagged?! That's ED out of the box... it give all empl