on 07-28-2008 4:10 PM
Hello,
I'm running a Netweaver 7.0 portal and have developed a custom Web Dynpro application. It works great. To support more features I added a custom table to the portal database schema (SAP<sid>DB). However, when I try to access the table from within code I get the following SQL message: table or view does not exist. I can access all the SAP portal tables just fine - just not the new one I created. I've asked DBAs to verify permissions; they've looked but can't figure out what the problem is.
Here's the code:
InitialContext dbInitContext = new InitialContext();
Properties sysProperties = System.getProperties();
String sysname = sysProperties.getProperty("SAPSYSTEMNAME");
String dbName = "jdbc/" + "SAP" + sysname + "DB";
DataSource dataSource = (DataSource) dbInitContext.lookup(dbName);
Connection conn = dataSource.getConnection();
String tableName = wdContext.currentContextElement().getTableName();
String SelectStmt = "Select * from" .concat(" " + tableName);
// Prepare the SQL statements
PreparedStatement stmt = conn.prepareStatement(SelectStmt);
// Execute the Query
ResultSet resultSet = stmt.executeQuery();
Any ideas where we've gone astray or what we might check? Any idea what permissions we need to set?
Thanks,
John
The solution to this problem was to create a Data Dictionary project with the table structure and deploy it to the portal.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
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.