JDBC and SAPDB
Hi,
I have the Mini WAS 6.20 with the "Flight Booking" example installed.
My aim is to connect to the sapdb via jdbc. But I have problems finding the tables of this example. For example there is a table called SFLIGHT. But I always get errors that this table is unknown.
String url = "jdbc:sapdb://localhost/BSP;
Class.forName("com.sap.dbtech.jdbc.DriverSapDB");
Connection connection = DriverManager
.getConnection(url, user, password);
ResultSet resultSet = stmt.executeQuery("SELECT * FROM SFLIGHT");
The SAP-Gui tells me its a transparent table.
Now I wonder what I am doing wrong?
SQL-Studio also doesn't show me SFLIGHT (and the other tables of this example).
What possibilities have I got to "look" for the tables? Are they maybe on a other schema?
Thanks
Jonny
Hi Johannes,
I'm affraid you're on the wrong track. And that's because you cannot access the DB schema of the ABAP stack of the WAS directly from the Java side. ABAP and Java stacks of Web AS have their own, separate DB schemas.
Usually, access from a Java application to data on the ABAP side is realized indirectly by accessing a remote function using JCo or the SAP Java Resource Adapter (SAP JRA). There is a simple tutorial for using the Flight Booking example from a Web Dynpro application on <a href="http://help.sap.com/saphelp_nw04/helpdata/en/c3/76b45d9688e04abe1a1070410ddc1e/frameset.htm">this</a> link.
Hope that I've got your question right and my reply answers it to some extent.
Similar Messages
-
Help on RFC to JDBC and JDBC to RFC
Help on RFC to JDBC and JDBC to RFC
Hi Gurus
I have the scenario where an RFC will be triggered in SAP , to write to a DB2 database and insert new records in a table
and vice versa the JDBC has to read som data from a table based on a primary key, mark them as read for not be read next time and send the data to an RFC where a table in SAP will be updated.
I have never worked with JDBC before , pls advice.
is there any new issue to consider in PI 7.0 regarding JDBC
Thanks.The requirement looks standard,
SEARCH IN SDN FOR JDBC scenarios,you will find many docs for sender as well as Receiver.
>
> is there any new issue to consider in PI 7.0 regarding JDBC
>
no issue with PI7.0.
Regards,
Raj -
IDoc to JDBC and JDBC to IDoc Scenario
Dear All,
I am working on IDoc to JDBC and JDBC to IDoc Scenario.
I have to send Idoc from SAP to Non SAP system(.NET application) i almost configured in XI but still i don't know when my INTEGRATION will INVOKE how my data will proceed from IDOC to Oracle database(Through JDBC) and in case of revese how and when Data flow will start.
Does anyone have completed STEP by STEP scenario document for this?
How my Idoc will sent to XI?
How XI will pick up data from IDoc?
How XI will Convert data to JDBC and UPDATE in Oracle Database?
And i reverse case(JDBC to IDoc) when my INTEGRATION will INVOKE?
Where and When i can watch my process and data?
How can i test the whole integration?
I AM GETTING ERROR WHILE TESTING CONFIGURATION IN Integration Directory "Error while refreshing the XI runtime cache" and when i check this in SXI_CACHE it gives me error
"Unable to refresh cache "NO_BUSINESS_SYSTEM"
"Error during last refresh to cache"LCR_GET_OWN_BUSINESS_SYSTEM - NO_BUSINESS_SYSTEM"
Please solve all the above problems i will reward u points
thanks,
RPHi,
While we working on IDOC to JDBC interface..
We have to deploy JDBC Drivers?
Go through this links,
/people/varadharajan.krishnasamy/blog/2007/02/27/configuring-jdbc-connector-service-to-perform-database-lookups
http://searchsap.techtarget.com/tip/0,289483,sid21_gci1246926,00.html
To install JDBC driver follow the how to guide.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-how-to-guides/how%20to%20install%20and%20configure%20external%20drivers%20for%20jdbc%20and%20jms%20adapters.pdf
Configuration of JDBC Adapter for SQL Server
JDBC Driver = com.microsoft.jdbc.sqlserver.SQLServerDriver
Connection = jdbc:microsoft:sqlserver://hostname:<port>;DatabaseName=<DBName>
UserID and Password.
If the connection is not working find the correct port number.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40b92770-db81-2a10-8e91-f747188d8033
JDBC- X I - R/3 Scenario
/people/bhavesh.kantilal/blog/2006/07/03/jdbc-receiver-adapter--synchronous-select-150-step-by-step
/people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30
Please check the driver path as mentioned below.
JDBC Driver : sun.jdbc.odbc.JdbcOdbcDriver
Connection:jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=//location of DB table.mdb;
No JDBC driver required.
Receiver JDBC scenario MS access - /people/sameer.shadab/blog/2005/10/24/connecting-to-ms-access-using-receiver-jdbc-adapter-without-dsn
follow this thread
Re: Problem when connecting to MS Access through JDBC Adapter.
SAP Note 850116 has details
/people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change
Configuring the Sender JDBC Adapter
http://help.sap.com/saphelp_nw04/helpdata/en/1d/756b3c0d592c7fe10000000a11405a/content.htm
Configuring the Receiver JDBC Adapter
http://help.sap.com/saphelp_nw2004s/helpdata/en/b0/676b3c255b1475e10000000a114084/content.htm
Idoc Reveiver adapter..
http://help.sap.com/saphelp_erp2004/helpdata/en/b9/c5b13bbeb0cb37e10000000a11402f/content.htm
Thanks,
Satya Kumar
/people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change
Edited by: SATYA KUMAR AKKARABOYANA on May 8, 2008 5:51 PM -
Content Conversion - JDBC and JMS
Can we use File Content Conversion with JDBC and JMS ?
Hi,
How To Use the Content Conversion Module in JMS Adapter - https://websmp106.sap-ag.de/~form/sapnet?_SHORTKEY=01100035870000582377&
check this for JMS content conversion:
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f02d12a7-0201-0010-5780-8bfc7d12f891
Check the how to guide provided by prabhu and also this link on the XMl To TeXtCoversion Module,
http://help.sap.com/saphelp_nw04/helpdata/en/44/748d595dab6fb5e10000000a155369/content.htm
Ref How To Use the Content Conversion Module in JMS Adapter -
https://websmp106.sap-ag.de/~form/sapnet?_SHORTKEY=01100035870000582377&
See this weblogs which was shown with examples:
How to use SAP's WebAS J2EE's JMS Queue in Exchange Infrastructure
Sync/Async communication in JMS adapter without BPM (SP19)
Async/Sync Communication using JMS adapter without BPM (SP 19)
Exploring JMS and SAP-XI JMS Adaper
Configuring the sender JMS adapter
http://help.sap.com/saphelp_nw2004s/helpdata/en/f4/2d6189f0e27a4894ad517961762db7/content.htm
Configuring the receiver JMS adapter
http://help.sap.com/saphelp_nw2004s/helpdata/en/10/b1b4c8575a6e47954ad63438d303e4/content.htm
Check JMS Adapter section of this blog by Sravya:
Aspirant to learn SAP XI...You won the Jackpot if you read this!-Part III
Also information related to Provider-specific settings are available
http://help.sap.com/saphelp_nw2004s/helpdata/en/cd/d85a9d6fab7d4dbb7ae421f710626c/frameset.htm
Plz do refer the following threads:
JMS Content Conversion - no CR/LF
Message (Data) getting lost after JMS Content Conversion(Sender)
Message (Data) getting lost after JMS Content Conversion(Sender)
Message (Data) getting lost after JMS Content Conversion(Sender)
Regards,
Vinod. -
JDBC and FTP sender channels stop polling
Hi,
We have a great volume of sender JDBC and FTP sender channels.
For this reason there is nothing unusual to have temporary error connections.
Several months ago, with an XI 3.0 system, sender channels recover its functionality automatically when temporary error connection is solved.
But now, he have migrate to a PI 7.1 sytem, and in the same scenario and configuration, sender channel stop polling after a temporary error . In cc monitor this channels remains in green status and there were no signs of stopped interfaces.
Timeouts are correctly defined and there is no difference between channel configuration in our Xi and PI system.
How to solve this problem?
Thanks, in advance.
Carme.Thanks for your fast response, Stefan.
After writing this post, i ask the same question to our basis team and we are in the latest sp.
¿do you know if there is any note or can you provide me some additional information?
I'm not able to find any note about this issue...
Regards,
Carme. -
Adapter Limitations Of Sender JDBC and Mail Adapter
hi All,
could you tell me the limitations of JDBC and Mail Adapter .i need to document these details .
Regards
Vidya SagarHI Vidya,
If i was you, i would do a list of things that i would need about these adapters, o i would search the SAP.help documentation for a first view and later ask about this possibility. Another way is to read the SCN doubts about these adapters and you can find some problems. You should think about the PI version as well.
Regards. -
The problem: oracle jdbc thin driver doesn't see environment variable NLS_SORT
Description:
We have a lot of code written in coldfusion and now we would like to switch form CF5 to CFMX. We use oracle thin driver to connect CFMX to oracle DB.
The problem is that "order by" doesn't work as earlier. It seems that it jdbc driver couldn't make linguistic sorting, only binary. I tried with different versions, classes12.jar and ojdbc14.jar (the newest from otn).
I know that i could solve problem if use sql function nlssort but it is not acceptable for us. We couldn't change all our source code. We would like to use env variable NLS_SORT to control this behaviour.
I also wrote small standalone java program to test this directly but it doesn't see NLS_SORT. sqlplus from same shell works well.
Is it possible to set oracle jdbc thin driver to use NLS env settings (NLS_SORT)?
If yes, how? If not, what is the way to do linguistic sorting using jdbc?
Thank you,
ZeljkoZeljko,
I don't have an answer for you (sorry), but I can suggest some resources where you may find the answer (hopefully -- assuming you haven't already tried them).
The section entitled JDBC and Globalization Support in chapter 18 ("Advanced Topics") of the "Oracle9i JDBC Developer's Guide and Reference, Release 2 (9.2)".
[Note: Since I couldn't see any details in your post about which Oracle version you are using, I assumed it was 9.2. However, you can access Oracle documentation for all the latest versions from the [url=http://tahiti.oracle.com]Tahiti Web site.]
The Globalization Development Kit may be helpful.
The Java Developer Center
The Oracle JDBC FAQ
Good Luck,
Avi. -
How to make JDBC and SAP connectivity with VC 6.0
can anyone help me.....how to make JDBC system and SAP system visible in the System drop-down list in Data Task Panel of Visual Composer 6......i mean how to make connectivity with JDBC and SAP system......so that i can use any table in the back-end database as well as any BAPI in the R/3 system.........
Thank you very much.....Hi Deep,
There is a how-to posted on SDN regarding how to connect and configure the BI JDBC Connector.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/6209b52e-0401-0010-6a9f-d40ec3a09424
This document describes the jdbc driver to use etc.
Hope this helps,
Cheers,
Scott -
Which tutorials may you suggest for JDBC and servlets?
Hello, i would to learn about JDBC and servlets.
May you please suggest me a good tutorial(e.g.post me a link) in order to study for JDBC and servlets?
e.g. How to make a servlet etc.
Thanks, in advance!I agree with PhHein, it's best to learn one technology and then the other. (Just my two cents, but start with JDBC from a simple standalone application, then when that is working, try to tackle Servlets, since you will need to also learn how to get them working in a container like Tomcat).
Here is a tutorial that has both concepts in it at the same time. Site is down now, but is usually up. http://www.roseindia.net/jdbc/jdbcconnectivity.shtml
Also, you will eventually want to download a J2EE container such as Tomcat or Jboss.
- Saish -
___Secure JDBC and Servlets___
Hey all! I have an applet that uses jdbc calls to an oracle database, and servlets calls to oracle's jserv servlet container. It has been requested to make these connections secure.
Can someone please point me into the right direction on information/documentation on performing secure jdbc and servlet calls.
Thanks! -
Graphical message mapping examples for JDBC and RFC lookup
hi, can any body provide me graphical message mapping examples for the "JDBC Lookup" function and "RFC Lookup" function?
I'm now studying the graphical message mapping and want to try those 2 functions. thank you.
I expect the examples to be simple enoung, not need to set up much.>
Madhu_1980 wrote:
> can u check this link:
>
> PI 7.0 & 7.1 Mapping - Blogs,Articles,Wiki,Code Samples and Videos Collections https://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=79955426
>
> it contains a link : SAP PI 7.1 Mapping Enhancements Series: Graphical Support for JDBC and RFC Lookups /people/jin.shin/blog/2008/02/15/sap-pi-71-mapping-enhancements-series-graphical-support-for-jdbc-and-rfc-lookups
May be I'm too foolish to follow those links, I got issues of each links.
What I really want is an example from step0
Swarup:
Refer the Lookup document - Easy Lookup in Process Integration 7.1
https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/20befc9a-aa72-2b10-ae9b-b0988791d457
The first step is "Create an RFC Enabled Function Module for look up", but where can I create the function module? Should I use ESB, IB? or use transaction 'SE11' ?
Kulkarni:
Very good links for RFC lookup with 7.0/3.0
https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/70d90a91-3cf4-2a10-d189-bfd37d9c3231&overridelayout=true
At page6 "PI Development/Configuration", it saies "You are on the design maintenance screen in the Integration Builder.Expand the subnodes for the software component version for which you want to import interfaces".
What is "design maintenance screen" ? My IB version is: Service Pack:08 Release:NW07_08_REL.
When I open IB, it display a screen titled with "Configuration: Intergation Builder", I did not find "software component version" node on the left tree.
Madhu_1980 :
it contains a link : SAP PI 7.1 Mapping Enhancements Series: Graphical Support for JDBC and RFC Lookups /people/jin.shin/blog/2008/02/15/sap-pi-71-mapping-enhancements-series-graphical-support-for-jdbc-and-rfc-lookups
The Prerequisites state:
The JDBC channel to be used for the lookup must be configured and activated in the Integration Directory.
The definition of the table used for the lookup must already be imported into the ES Repository as an external definition
But I don't know how to create a JDBC channel and define the table. -
Performanceproblem with WL6.1 JDBC and Oracle
Hi!
I have a big performance-problem using wl6.1, jdbc and oracle.
My Server is sending a Vector with NodeBeans via JDBC to a OracleDB. The answer
comes immediately with the timeout.
Why is the EJB waiting for the timeout?
Is it a problem of configuration?
Thanks
ThomasHi Sree,
here I send You the class with the main problem. The call queryDataSet.refresh();
is the timeconsuming part.
We are using WL6.1sp2, Oracle 8.1.7 with classes12. In our environment we can
not use connectionpools.
It comes back with a timeout AND the data. Calling it again immediately it takes
2/3 of the time the timeout is set.
Do You have a fine solution?
Thanks
Thomas
package ppif.db;
import java.rmi.*;
import ppif.bo.*;
import java.util.*;
import com.borland.dx.dataset.*;
import com.borland.dx.sql.dataset.*;
import java.math.*;
public class connector {
private ppif.mapping.NodeDescriptions nodeDescriptions;
public connector(ppif.mapping.NodeDescriptions nodeDescriptions) {
this.nodeDescriptions = nodeDescriptions;
public connector() {
this.nodeDescriptions = nodeDescriptions;
public Vector fetchNodes(ppif.bo.Node filterNode) throws RemoteException {
String childClassName = null;
Vector nodeVector = new Vector();
Node node = null;
if (nodeDescriptions == null) throw new RemoteException("nodeDescriptions ==
null");
// childClassName zu gegebenen filterNode ermitteln
if (filterNode.getClassName().equals("DefaultRoot")) childClassName = "ST";
if (filterNode.getClassName().equals("PrismaProjectsRoot")) childClassName =
"PrismaProjects";
if (childClassName == null) throw new RemoteException("Zum übergebenen filterNode
wurde kein chlidClassName gefunden.");
if (nodeDescriptions.getNodeDescription(childClassName) == null) throw new RemoteException("Für
die ChildClass "+childClassName+" ist kein Mapping definiert.");
// Vector mit Child-Knoten erzeugen durch DB-Zugriff
ppif.mapping.NodeDescription nodeDescription = nodeDescriptions.getNodeDescription(childClassName);
Database database = new Database();
ParameterRow parameterRow = null;
Column column = null;
QueryDataSet queryDataSet = new QueryDataSet();
// DB-Connect generieren
database.setConnection(new com.borland.dx.sql.dataset.ConnectionDescriptor(nodeDescription.dbUrl,
nodeDescription.dbUser, nodeDescription.dbPassword, false, "oracle.jdbc.driver.OracleDriver"));
int queryCount = 0;
// Schleife über alle queries der childKlasse, gemäss Mapping
for (Iterator it = nodeDescription.mappingQueries.iterator(); it.hasNext();
ppif.mapping.MappingQuery mappingQuery = (ppif.mapping.MappingQuery)it.next();
String queryString = mappingQuery.getQueryString();
parameterRow = mappingQuery.getParameterRow();
// ParameterRow mit Input-Werten füllen
for (int i=0; i<parameterRow.getColumnCount(); i++) {
String columnName = parameterRow.getColumn(i).getColumnName();
String filterAttributeName = columnName;
Object filterAttributeValue = filterNode.getAttribute(filterAttributeName).getVal1();
switch (parameterRow.getColumn(i).getDataType()) {
case com.borland.dx.dataset.Variant.BIGDECIMAL:
BigDecimal val = (BigDecimal)filterAttributeValue;
parameterRow.setBigDecimal(i, val);
break;
case com.borland.dx.dataset.Variant.STRING:
parameterRow.setString(i, (String)filterAttributeValue);
break;
default:
throw new RemoteException("Unbekannter Datentyp");
// Query generieren
queryDataSet.setQuery(new com.borland.dx.sql.dataset.QueryDescriptor(database,
queryString, parameterRow, false, Load.ALL));
// DB-Verbindung öffnen
queryDataSet.open();
// Rolle setzen
if (nodeDescription.dbRole != null) {
java.sql.Statement setRole;
String roleName = nodeDescription.dbRole;
String rolePwd = nodeDescription.dbRolePassword;
try {
java.sql.Connection jdbcConnection = database.getJdbcConnection();
setRole = jdbcConnection.createStatement();
setRole.execute("SET ROLE " + roleName + " IDENTIFIED BY " + rolePwd);
} catch (java.sql.SQLException exception) {
throw new RemoteException(exception.getMessage());
} catch (Exception exception) {
throw new RemoteException(exception.getMessage());
// Query ausführen
queryDataSet.refresh();
// Datensätze in Node-Objekte umwandeln
int columnCount = queryDataSet.getColumnCount();
String columnArray[];
columnArray = queryDataSet.getColumnNames(columnCount);
for(queryDataSet.first(); queryDataSet.inBounds(); queryDataSet.next()) {
Node rNode = nodeDescriptions.createNodeInstance(childClassName);
// Abfrageergebnissen in eine Attributliste übertragen
for (int i=0; i<columnCount; i++) {
nodeVector.add(rNode);
queryCount++;
return nodeVector;
public ppif.mapping.NodeDescriptions getNodeDescriptions() {
return nodeDescriptions;
public void setNodeDescriptions(ppif.mapping.NodeDescriptions nodeDescriptions)
this.nodeDescriptions = nodeDescriptions;
"Sree Bodapati" <[email protected]> wrote:
hi Thomas,
please post more detail on what your code is doing. if possible a code
snippet/error messages/thread dump
sree
"Thomas Eberhard" <[email protected]> wrote in message
news:[email protected]...
Hi!
I have a big performance-problem using wl6.1, jdbc and oracle.
My Server is sending a Vector with NodeBeans via JDBC to a OracleDB.
The
answer
comes immediately with the timeout.
Why is the EJB waiting for the timeout?
Is it a problem of configuration?
Thanks
Thomas -
Recently we have set up a JDBC connection to a SQL Server 2000 DB. Using java at the command line I can pull out information from our database but if you use OracleXMLSave and try to push to the databse it gives an OracleXMLSQLException. Any ideas of why you can pull info out but not push info in from the XSU API. Thanks,
MatthewI think you've specified a JDBC-ODBC-Bridge as Database-URL. You
should use the following information to establish a connection
with JDBC and Oracles ;thin driver+ :
driver = "oracle.jdbc.driver.OracleDriver"
dburl = "jdbc:oracle:thin:@yourhost:1521:yourSID"
(change the according parts)
You can take the authentication information user/pass also
inside the dburl:
dburl = "jdbc:oracle:thin:user/pass@yourhost:1521:yourSID"
Alex -
System copy for 4.6c on sunsolaris and sapdba database
Hi All,
Kindly provide me the steps (documents) for system copy 4.6c on sunsolaries and sapdba database.
Thanks in advance.
Regards,
Lokeshwar.Hi,
there is a guide available in the service market place.
-> [http://service.sap.com/erp-inst/]
-> SAP R/3
-> Release 4.6C <X>
-> SAP R/3 Heterogeneous System Copy / SAP R/3 Homogeneous System Copy
Regards,
Muralidhar -
Hi,
i have the following doubts regarding the jdbc and paging please clarify me...
1)Is it advisable to use stored procedure to implement paging is records
are more in database
2)If the records are more in the database and we execute
select * from table where id >10 and id<15 then will
the query execution will be slow because the database is large(and so stored procedure will be faster)
or as we are selecting only records between 10 and 15 so the
query execution is not slow
3)will the recordset help in solving the probem
4)is there a way to select the count of the records along with the records for display in the page
the count of the records is required to display the next button
if two queries are to be written one to display the next button and second to get the records to
display on the page then the system may be slow when many users are accessing and using stored
procedures may be better
5)when we write the select query with 'for update' clause then the row will be locked
or the table is locked .
6)when we write the select query with 'for update' clause then until we execute the update
query the lock will be there and the lock will be released on executing the update query
is that right then what about the case if after the select query we get some exception
and code does not reach the update query then what about the lock will be lock remain
and give problem
regards
Javid1) that would really depend on you goals. for performance only, stored procedures are precompiled so should be faster.
2) definitely you should only select what you want and limiting the number of rows you return will speed up your query.
3) what do you mean by that? a recordset represents the collection of rows returned from the query so should help you.
4) it depends on your database. for instance, MySQL has a function to return the number of rows returned. however, some database has an unbuffered mode so that the first few rows will be returned very quickly without knowing how many rows are there, in which case, you won't know the number of rows until all the rows have been retrieved.
5 and 6 are database-dependent, while most rdbms only lock the selected rows by default, some lock the entire table.
Java 2 MVP
http://www.brainbench.com
Maybe you are looking for
-
Install Oracle DB 32-bit on Windows 2003 Server EM64T
I need to know if i can install Oracle 10.1.0.3 32 bit or 10gR2 32 bit on Windows Standard Edition 2003 64 with Intel Xeon -64 bit? Tks, Elber
-
How can i print out old text messages?
how can i print out old text messages?
-
Problem create DataGrid on the new browser tab with
Hello.I work Flex 3 Web application .I have a problem with about create new browser tab.So that I want to create DataGrid(with data) on the new browser tab.
-
Installing Adobe Flash Player Update 10.3
This is my fist time here. I have a HP Pavilion Windows XP computer. My access to the Internet is only through the latest version of Mozilla Firefox. When I try to play a video connected to a news story, etc, I get this small box asking if I want t
-
How to add some field in an table result layout
Hai All, I have an reporting issue in CRM ( without SAP BW), for example i would like to show a field which not found in column set layout ( SAP standard default). I already use change layout from SAP standart, but the field which i need is not there