cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting iView to the back-End

Former Member
0 Kudos

hi all,i am hanif,new to the portal.Well i hav made a iView with survey question in it and i hav to connect it to non-sap backend i.e.SQL database .Plz show me the detail how to connect to SQL and how to insert values in it.

THanx in advance.]

Regards:

hanif

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

answered thanks

Former Member
0 Kudos

Hi Hanif,

I think you can create iview using Existing Function that calls a stored procedure which can update your back end.

or you can also Write Code in NWDS to connect and update the data as Lokesh said. or you can write a EJB to insert the values into BackEnd and expose that EJB as WebService and create iview using that Webservice.

Regards

Raghunandan

lokesh_kamana
Active Contributor
0 Kudos

Hi,

This is not none of the both.

If you have netweaver devloper studio you craete a wed dynpro project and deploy it on the j2ee engine.

now your application will be avaialble on portal.

so that you can create a customized iview for your application on portal.

Thanks & Regards,

Lokesh

lokesh_kamana
Active Contributor
0 Kudos

Hi,

This is one way of connecting to a backend like sql.

If you have NWDS you craete a application in NWDS and write the below code in ur view

Hi,

You place the code where ever you want to establish the connection to the data base which is located remotely in a diffrent IP from NWDS.

The requirement for this we have 3 jar files.Which you have to copy in the lib folder.

those are:-

1.msbase.jar

2.mssqlserver.jar

3.msutil.jar

XX.XX.XX.XX->IP Address

XXXX---->Port no

Code:-

Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");

conn = DriverManager.getConnection( "jdbc:microsoft:sqlserver://XX.XX.XX.XX:XXXX;databaseName=TrackingSystem","sa","sa" ) ;

Statement st = conn.createStatement();

String str = "select * from User Table";

ResultSet rs = st.executeQuery(str);

while(rs.next())

{

String str1 = rs.getString(1);

wdComponentAPI.getMessageManager().reportSuccess(str1);

}

Then you create a iview for this webdynpro application and place it in portal.

If you any doubts in creating an iview for web dynpro application.Please let me know.

Thanks & regards,

Lokesh.

Former Member
0 Kudos

hi lokesh ,

Wether this code shud be written on simple iView or on the database object template iView ?plz clear this doubt.

And how to insert the values in the SQL database from this iView,Plz provide assistance regarding this .

thanx in advance

Regards:

Hanif

Former Member
0 Kudos

Hi Haniff,

To connect to non SAP BackEnd we need to configure some settings in System Administration like

1) Create a JDBC System - Under System Configuration, create a JDBC system and give System Object name.

2) Provide the necessary Connection Properties of your Non-SAP backend like

Connection URL:

Driver Name

Connection Timeout etc.,

3) Assign the particular User to that System Object(alias) under User Administration.

4) Create JDBC iview by specifying the System Alias name

and then choose the Option Existing Function or Query, such that you can retrieve data.

Regards

Raghu

Former Member
0 Kudos

Hi raghunanadan,

hanif here, i read ur msg for configuring the database object from the std template.well regarding this i hav question i.e through this iView tamplate for SQL conection i want to insert values.plz help in detail how to do this.

waiting for ur reply.

thanx in advance.

Regards:

Hanif

Former Member
0 Kudos

Hi

go through this link

cheers,

Anil.