cancel
Showing results for 
Search instead for 
Did you mean: 

How can I configure databases other than the system with Web Dynpro?

Former Member
0 Kudos

Hi,

According to this article, https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00c062ec-f90d-2a10-52bd-df57de2d... , there is a way to deploy dictionary table to external database other than default data source.

􀃖 How can I configure databases other than the system with Web Dynpro?

Accessing DB from Web Dynpro:

To work with databases other than system database:

Configure a server side data source for your DB (this can be done using the Visual Administrator tool - JDBC connector service). When a DB is 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.

Look up the appropriate data source up using JNDI interfaces in Web Dynpro.

My question is, after configuring new data source in Visual Admin JDBC connector, how do i deploy Java dictionary to create table in the new data source?

Any help would be much appreciated. Thanks.

- julius

Accepted Solutions (1)

Accepted Solutions (1)

siddharth_jain
Active Contributor
0 Kudos

Hi Julius,

You should follow the SAP Recommended way to Work with DATA base in WD ,Which is mentioned in the Tutorial link

Suggested in the earlier replyes:-

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c0b53558-6df6-2910-cfbf-a63316bb...

i think if you follow this Approach your Application will become more flexible and scalable for future migrations and requirements.

-- If you are using external data bases then you should configure your data source in Visual Admin in JDBC Adapter option.

-- If you are using System Data base which is WEB AS Data Base

then you can create an Enterprise Application DC Project

Right click on it from the context menu choose datasource-Alias.xml

define your data source Alias here and deploy the ear file.

Now look up the data source by this Alias Name in DAO Layer.

Regards,

Siddharth

Answers (3)

Answers (3)

Former Member
0 Kudos
siddharth_jain
Active Contributor
0 Kudos

Hi Julius,

i think when you deploy Java Dictionary it by default Deployed on Your Web AS Data Base.

To Deploy it on the Data base other than the System DataBase let say Oracle you can try the Following :

Right click on the JavaDIctionary Table in NWDS and from the Context Menu Choose Generate DDL script ---> Choose Oracle, a file will be generated with ora extention ,Copy the Content of this file and try to run the DDL Script on Oracle SQL Prompt.

Other Wise if it does not work you can create your DataBase Table Manualy in the DB.

and you can Setup the Data Source Alias for oracle in JDBC Adapter in Visual Admin ,It will require some Driver Jar files which are Database Specific.

Than you have to look up that DataSource Alias Configured for Oracle in your WD Application.

Check this thread Also:

Regards,

Siddharth

Former Member
0 Kudos

Thanks for the quick responses. However, the answer raised another question.

My Steps to use external database schema:

1. Deploy jdbc driver.

2. Define datasource via Visual Admin or define data-sources.dtd and data-sources.xml in the META-INF directory.

I know i can use JDBC connection, ie, with SQL statement, but i would prefer to use Java Persistency framework.

What are the options that i would have then? Eg, EJB, JDO etc?

Any recommendations?

- julius

Former Member
0 Kudos

Hi julius,

for first one u can go with JDBC n JDO combination.

for thorough info aboutit go through this :[http://help.sap.com/saphelp_nw04/helpdata/en/bf/0d74f651fe48c1a748dea6900b1663/content.htm]

u have second option where u can define datasource via data-sources.xml in the META-INF directory. for this u use java dictionary n EJB combination..

as an example u can check this:[https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/ca4a9c90-0201-0010-c389-8738cd51a88e]

hope it will hlp u..

Regards,

Khushboo

Former Member
0 Kudos

Hi julius,

chk out this link for deplyment of data source after jdbc configuration: [http://blog.zsapping.com/2007/04/17/datasource-deployment-in-nwds/]

hope it helps..

Regards,

Khushboo