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

Similar Messages

  • 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

  • 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 Dictionay tables

    Hi all..for my webdynpro application i need fast processing database operation on SQl server werin it takes 15-20 secs for insertion or selection of database tables..And i need to reduce this time to
    3-4 secs..
      Well i hav come across java dictionary tables..it can be used for webdynpro application..but i dont know how to utilize it..
          If anybody knows or having small application PDF or docs  related to insertion or selection data on  java dictionary tables then plz reply me...
    Thanx in advance
    Regards:
    Hanif

    Hi
    Check these threads
    1.[java dictionary table access|/message/792522#792522 [original link is broken];
    2.[Java Dict in WedDynpro|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/ded11778-0801-0010-258f-ac3b9408a194]
    3.[FAQ on JAVA Dict|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/604ceb90-0201-0010-99bb-b930c4c576c7]
    4. [How to create table in Java Dict|How to create table in Java Dictionary ?;
    Best Regards
    Satish Kumar

  • 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

  • Regd: Insert DATE into Dictionary Table

    Hi All,
    I've problems in inserting the Date value into java dictionary table (Oracle is the backend). i'm getting the below error: "type check error: new value (element number 2) is not assignable to column". what is the format it accepts while inserting date?
    i've done almost all the possible ways to insert the date into dictionary table. plz suggest me if there are any other ways or i'm i missing anything?
    tnx,
    -JB

    hi Siva,
    thanks for your comments. i'm using java.sql.Date only,  where ever required to insert into DB. i guess this is the problem with OpenSQL (Open JDBC) framework which is not accepting any kind of date format while inserting.
    and when i print the insert statement the value portion looks like : "... VALUES (1,(2009 - 8) - 7)", dont understand wt is that??
    i've just tried "Date today = new Date(System.currentTimeMillis());"
    its giving the same error it gave me before, below is the error:
    type check error: new value (element number 2(SMALLINT)) is not assignable to column >>SDATE<<(DATE)
    i hope this error will give you some idea toward the solution, i'm tried with all the options. even PrepareStatements are not supported by Open JDBC framework.
    tnx,
    -JB

  • 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!

  • 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

  • Accessing dictionary tables from dynpro?

    Hi all
    As far as i know, there are 4 approches to access dictionary tables from webdynpro.
    -entity bean
    -sqlj
    -jdbc
    what are the advantages and disadvantages for all above?
    and which one to go for?

    Hi swathi
    See the persistence API--Adv and Disadvantages what ever you mentioned come under the persistence API
    Relational Persistence
    =================
    SQL-based coding: expressive!
    SQLJ: for static SQL, checked at design time,
    recommended
    JDBC: for dynamic SQL, can be combined with SQLJ
    =======================
    Object-relational Persistence
    ======================
    SQL-free! Portable!
    JDO: light-weight object persistence, Java-like dynamic
    query language
    EJB CMP: part of J2EE standard, relatively heavy-weight,SQL-like static query language
    Regards,
    Venkata Kalyan Karanam

  • How to access the java stack table "xi_af_msg" from the ABAP engine.

    Hello Guys,
    How to access the java stack table "xi_af_msg" from the ABAP engine.
    I need to access this table.

    These 3 are the tables that are for XI Adapter in ABAP Stack.
    SWFRXICNT
    SWFRXIHDR
    SWFRXIPRC
    You can also try the following tables.
    SXMSAEADPMOD                   XI: Adapter and Module Information
    SXMSAEADPMODCHN                XI: Adapter Module Chains
    SXMSAEAGG                      XI: Adapter Runtime Data (Aggregated)
    SXMSAERAW                      XI: Adapter Runtime Data (Raw Data)
    Cheers,
    Sarath.
    Award if helpful.

  • Java Dictionary or ABAP tables

    Dear all,
    Can anybody tell me when to make use of Java Dictionary?
    I've seen different projects that make use of ABAP tables as well as Java dictionary to store data. But what will be the criteria to decide which one I should choose for  my data persistence?
    For example, I've a requirement at my hand, which will have huge data transfer per day & the number of records in the table will be in lacs. Where will I persist my data in Java dictionary or ABAP tables?
    What are the pros & cons of each?
    Regards,
    Aparnna

    Hi
    Sir as your question : I wanted to know the pros & cons of using Java Dictionary (Dictionary DC) as well as ABAP tables ?
    Please try to understand both are different things in their context , OK let me try again
    1.  Java Dictonary is used used to define the table structure its data types and  used for portal database if it is small/ lightweighted.
    2.ABAP table is again for defining the structure , datatypes , which is used in RFC/BAPI.
    3. When to use what or Pros & Cons
    Java supports more models (Javabeans, web services, adaptive RFC, and XMI) . Data Dictonary is common every where  ,OK
    Compared to the function module model in  ABAP,
    (so u can think like this that  ABAP tables are base in SAP environment to define metadata of the databse , Similar concept java has implemented using data dictonary)
    There is nothing comparable because both have their own purpose to serve, except Java Dictonary are mostly use for small project or if project involvment is only in Java., where as ABAP table has no limit .
    and ,
    Second thing is both has code wizards to generate the metatdata after definition.
    Best Regards
    Satish Kumar

  • Deleted Tables in Java Dictionary

    Hi all,
    I have deleted a table within the Java Dictionary. The documentation tells that it is not possible to reuse the name of a deleted table.
    But unfortunately i have to reuse this name. So my question is:
    Is there any possiblity to undelete the table or to reuse the name?
    Thanks in advance....

    Hi Florian,
    the creation of Java dictionary projects is checked against the name server. That is the reason why you cannot re-use the name just after the deletion of the table, as it could be possible that this table is already transported and re-used in another project.
    If you really know that this table name is not used somewhere else, you can remove the name reservation. This has to be done in the SLD that acts as the Name Reservation Server (in most cases it's the SLD that you also use for creating your SCs).
    There, go to the section "Name Reservation" and have a look at the reserved names of type "DB table". Delete the desired entry.
    Then you only have to restart the NWDS, as this is chaching the info from the name server. 
    On the DB, there is no issue re-using the table. But you have to keep in mind that this will result in a drop of the existing table with all the data before it is recreated.
    Best regards,
    Timo

  • HELP:  Connecting to the Java Dictionary from your Local NDS Environment...

    In order to simplify local development and remain consistent with the use and data in the Java Data Dictionary, we would like our developers to connect to the JDD on the development server.  We believe we can accomplish this, but the question is "How do we set security on the central JDD so that developers cannot update tables and data that do not belong to them"?? 
    Any help would be greatly appreciated.

    Hello,
    I work with Peggy and wanted to clarify our issue.  We know we can contorl access to the Java Dictionary within NetWeaver by assigning them to tracks.  That's not our concern right now.  What we're worried about is that our developers will have to set up a DataSource to the Oracle DB on the development server, and will therefore know the password to that database.  Once they know the password they would be able to access the data in all the tables - including ones not in their own tracks - because they could use any database tool to get to that data.
    In addition, we're concerned not only about developers updating data, but even reading, as some of our data is sensitive data that only those working on the project should be allowed to even see.
    Thanks for any other advice you have,
    Jennifer

  • X I and Java Dictionary

    Hi Friends,
    I have created some tables in Java Dictionary Project in NDS and deployed it on the server.I want to access those tables directly from XI. For that i have done JDBC connection to the underlying data base of the Java Stack on server. Connection established succesfully but it is giving that no tables found.Then i tried to access the tables using Oracle SQL+ environment,there also i can't see the tables that i have created through Java Dictionary .
    My question is that " I have created tables through Java Dictionary but want to access the data directly using some Oracle Client." Is it possible?????/
    Regards,
    Gowtham K

    yes it is very much posiible. You just login to oracle enterprise manager there search ur tables under the installed databses. Login to database as an administrator.You will definately find the tables there.So if u want to access these tables from ur editor ,create a user if needed or use the existing user and configure ur client.
    It will definately work.U will be able to access the data too.
    regards,
    datta

  • 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..

Maybe you are looking for