cancel
Showing results for 
Search instead for 
Did you mean: 

get the values from a table

Former Member
0 Kudos

Hi,

I am new to webdynpro. I have created one table with four columns in MAX DB. I have to write a webdynpro application such that when the first page loads, all the records will be display.

How to proceed for this using webdynpro for java..Please give the procedure so that I will try..

Thanks & Regards,

Mastanvali Shaik.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Mastan,

i would suggest you next steps:

1) Define a new DataSource in your JDBC service setting in Visual Admin app.

This new DataSource should be pointed to your MAX DB. There you should select an Java class (sort of driver) to work with this DB type.

<b>Then you have 2 possibilities:</b>

2a) You can build an SQL script to read your DB and send it via jdbc connection:


Context ctx = new InitialContext();
DataSource ds = (DataSource) ctx.lookup(jdbc/<your DS alias>);
Connection cn = ds.getConnection();
PreparedStatement stm = cn.prepareStatement("Your SQL");
ResultSet rsl = stm.executeQuery();

Then you go through your ResultSet and fill-in some of your context nodes (datasource for an TableView).

2b) Or you can define a new dictionary project, create your table in there and deply. Don't forget to set right DS alias. And then you can import and use that dict. object in your WD application. From programming point of view it's even easier because you can use it as data Model.

Hope it helps.

regards.

mz

Former Member
0 Kudos

Hi Maxim Zalevski,

Thanks for your reply. I have one doubt..How will you import the creted dictionary project in your webdynpro application?

Thanks & Regards,

Mastanvali Shaik

Former Member
0 Kudos

Mastan,

there is no possibility to import Dictionary table structure directly.

But you can achieve it by using DCs. You can find more info about the necessary steps:

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00c062ec-f90d-2a10-52bd-df57de2d1ddb">here</a>

and

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ded11778-0801-0010-258f-ac3b9408a194">here</a>

regards.

mz

Former Member
0 Kudos

Hi Murtuza ,

Thanks alot.

Regards,

Mastan

Answers (1)

Answers (1)

Former Member
0 Kudos

HI,

Go trough this link http://help.sap.com/saphelp_nw70/helpdata/en/82/fdbf2085f65f43a71e755fc904478d/frameset.htm.

Would be helpful in creating your application.

Regards,

Murtuza