on 02-25-2009 6:42 PM
Hello,
I am currently use Web Dynpro and have a question about this. I need a way to save data but not in the context node. maybe in a data base? can anybody help?
Regards
Thomas
Hi,
Check this link to connect to R3 table.
http://help.sap.com/saphelp_nw04/helpdata/en/c3/76b45d9688e04abe1a1070410ddc1e/frameset.htm
and to connect to sql and store data here is the code to connect to sql.
String userName = "sa";
String password = "jktsql";
String url ="jdbc:microsoft:sqlserver://jothi:1433;databaseName=student";
String querry="select * from empDetail where name=?";
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
Connection con =DriverManager.getConnection(url, userName, password);
Statement st=con.createStatement();
PreparedStatement ps=con.prepareStatement(querry);
ps.setString(1,name);
ResultSet rs=ps.executeQuery();
while(rs.next())
{
String strn=rs.getString(1);
String strp=rs.getString(2);
}
Regards,
H.V.Swathi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thomas
In WebDynpro Context is just like a placeholder of data which also ensure that data will be available accross
different controller, To understand Context and model(Your Backend )relationship follow
[this|http://help.sap.com/saphelp_nw04s/helpdata/en/8f/db0c533a4e514d9720ed2307a40f84/frameset.htm] and
for WebService model [ read this thread|/message/1026147#1026147 [original link is broken];, [other links|; are ,[JavaBean Model|;
Best Regards
Satish Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
For that first you need to create Model.The model can be
1)Adaptive Webservice Model
2)Adaptive RFC Model
3)EJB Model
4)Java Bean Model
If your backend is non sap system then you can write the connection logic in a java class
and expose that function as webservice.In webdynpro you can import that webservice as adaptive webservice model.
If your backend logic is present in EJB then you can create EJB Model.
If your backend is r/3 system then you need to create Adaptive RFC Model.
Regards,
Sudhir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thomas,
Welcome to SDN!
What is your backend? Is it R/3 or some other database?
If it is R/3, you need to have RFC. If it is any other database, you can use webservices. Check these links
https://www.sdn.sap.com/irj/sdn/nw-wdjava?rid=/webcontent/uuid/403e6bf5-426e-2910-b0a8-a95548724af9#... [original link is broken]
/docs/DOC-8661#section10 [original link is broken]
or you can directly connect to database check this link
Regards,
Siva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.