cancel
Showing results for 
Search instead for 
Did you mean: 

How to access SQL tables from WebDynPro ABAP application ?

praveenkumar_kadi
Active Contributor
0 Kudos

Hi,

I am trying a scenario, where I need to send an user ID to SQL server table (update/modify/delete) from webDynpro ABAP application.

Basically ,I am trying to know:---

a>How to write a SQL Connection from ABAP code within webdynpro ABAP application

b>What are the ways to do it.(by code or any other API/mechanism)

I appreciate if anybody knows this.

Thanks

Praveen

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

We can use the classes related to connection objects.

Check out these classes and Interfaces-

CL_CDS_CONNECTION_DATA

Regards

Lekha

praveenkumar_kadi
Active Contributor
0 Kudos

Hi

Any docs or examples which refers to SQL connection usage if possible.? My knowledge on WebDynPro ABAP is minimal.

Thanks

Praveen

Edited by: Praveen kumar Kadi on Sep 16, 2008 2:02 PM

Former Member
0 Kudos

Hi,

We can use the classes related to connection objects.

Check out these classes and Interfaces-

CL_CDS_CONNECTION_DATA

CL_CDS_CONNECTION_DATA_FACTORY

Or

we can use this in ABAP for Connection.

EXEC SQL.

SET CONNECTION {con|DEFAULT}

ENDEXEC.

Or

We can create an Iview for this webdynpro application and from the portal we can connect to the database.

Regards

Lekha

praveenkumar_kadi
Active Contributor
0 Kudos

Hi

Thanks for the reply. Please see further queries below.

We can use the classes related to connection objects.

Check out these classes and Interfaces-

CL_CDS_CONNECTION_DATA

CL_CDS_CONNECTION_DATA_FACTORY

>> How to use them or any code example you have ? that will be familar to me.

Or

we can use this in ABAP for Connection.

EXEC SQL.

SET CONNECTION {con|DEFAULT}

ENDEXEC.

>>Any application/examples you may have ?

Thanks

Praveen

Former Member
0 Kudos

Hi,

The EXEC CONNECT ... is usually used in the procedural ABAP code. For this you can refer to the ABAPDOCU.

I dont have any sample code on the classes I listed try to check out them for the parameters and the methods they have.

In WD for Java, we have these connection classes to connect to any databsae server.

Or try to create an RFC with DESTINATION for this

Pls check out this link for this -

Regards

Lekha

praveenkumar_kadi
Active Contributor
0 Kudos

Hi.

Thanks

I have a last question. Can we directly place above SQL statements in the ABAP code.? don't we need any database bridge to connect to SQL server.something like jave we use JDBC connection and then try to connect to database.?

Thanks again

Praveen

Former Member
0 Kudos

Hi,

We can use the direct SQL statements also.

In the ABAPDOCU or in SDN search for the NATIVE SQL where we can use the database specific statements.

In order to connect to any other database we have to establish a connection usign the CONNECTION object as I specified in the earlier posts.

Regards

Lekha