on 09-20-2010 11:34 AM
Hi all,
I am very new to WD development, I am trying to create a WD project which will:
- Accept some parameter
- Read data from a 3rd party database (i.e. Not the SAP system database)
- Display the result
I created the dataSource to the 3rd party database at VA, created a new J2EE DC, and created a entity bean, and trying to map the entity bean to the table.
I get stuck while I try to create the table in the dictionary:
1) It seem that the tables created in the dictionary will create in the DB when deploy, but I am using existing tables
2) I am not sure how the tables in the dictionary relate to the database (I find datasource at EJB side, maybe that's the relation?)
I understand the question is kind of stupid, any pointer for me to study will be more then welcome.
Thanks in advance
Regards
Bill
Hi Bill,
You can use EJBs or Web services to manipulate (insert/update/delete) the database tables created in java dictionary.
Please go though the following links.
2) http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b030e7fb-2662-2b10-0dab-c4aa52c35...? QuickLink=index&overridelayout=true
3) http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/80a30ef0-8d5d-2910-e987-cc8e49... [original link is broken]
Regards,
Radhika
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Radhika,
Thanks for the reply, this give me some info on the WD development.
But in my case, I am difference from normal development that I am trying to use existing tables (existing table, multi-table for one result, sure read only), but not trying to create some new tables for use.
So, I would like to know what should I do because all the resources I find assume I will create a new table to use.
And I find nothing seem to allow me to choice existing table
Regards
Bill
Hi Bill,
Let us assume that the existing table is in oracle database (as you said u want to access non-sap database).
If you need not create a new table, then you can use only the EJBs (Entity Bean to access the database table), no need to have java dictionary.
You can refer to the following links. These posts tell about how to use web dynpro java with EJBs to access database tables.
Regards,
Radhika
Edited by: Radhika Parag Rajopadhye on Sep 22, 2010 6:10 AM
Hi Radhika,
Thanks for the helpful reply again, but too bad I am stuck when create the entity bean
Let me explain more details here, as far as I know, when I develop entity bean I need to
1) Link up the bean with a table definition in the data dict
2) Create the persistent fields
3) Use EJB QL statement to define query
So, my problem is (relate to the points above):
1) It is a existing table, did I still need to create a table def in data dict? It seem not possible because it will modify the database table, and I don't want this happen
2) without the data dict it seem somewhat pointless to create the fields here
3) It seem that EJB QL need data dict...
Here is what I guess after I done some reading (relate to the points above), please let me know if I am wrong:
1) I don't need to define the table, I can just let the setting empty
2) I will need to define the fields, if not the entity bean is useless and cannot use in WD
3) I can use vendor SQL, but I must make the entity bean read only
BTW, I tried to assign some points to you, please let me know if that did not work, am petty new here.
Regards
Bill
Hi Bill,
As per you requirement, you need to access existing table in non-sap database. So, you can use JDBC to do the same. Because using EJBs becomes quite complicated at times.
Please refer to the following wiki:
http://wiki.sdn.sap.com/wiki/display/WDJava/WebDynproApplciationwithDatabaseMS+Access
Regards,
Radhika
Hi,
if your ejb is ready, you can import the ejb as model, which can be consumed without any coding(code generated with wizard).
what's the version of your environment? server, ide..
Best regards,
John
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.