Join query not getting data from tables
I have total 4 tables, zemployee, zemp_comm,zemp_adress, zemp_edu1 all of this tables are connected through emp_id , but when I write left outer join it returns all rows but emp_id is retrunign null , when I insert all of the entries in respective table it show the respective emp_id, when i left some of the entries in table it will not show emp_id in records,
I am using this select statment........
Select * from zemployee as a left outer join zemp_comm as b on b~emp_id = a~emp_id left outer join zemp_adress
as c on c~emp_id = a~emp_id left outer join zemp_education1 as d on d~emp_id = a~emp_id into corresponding fields of table
emp_itb
where a~emp_name = zemployee-emp_name.
I want to show show records with emp_id whether i put entry in all tables or missed some of the entries.
please help me in this regard.
Hi Amir,
You can use Inner join . please refer below code.
Select * from zemployee as a inner join zemp_comm as b on b~emp_id = a~emp_id inner join zemp_adress
as c on c~emp_id = a~emp_id inner join zemp_education1 as d on d~emp_id = a~emp_id into corresponding fields of table
emp_itb
where a~emp_name = zemployee-emp_name.
Regards,
Thangam.P
Similar Messages
-
Getting data from table BSEG taking too long ... any solutions.
Hello people I am currently trying to get data from table BSEG for one particular G/L Account Number With restrictions using For All Entries.
The problem is that even with such tight restrictions its causing my report program to run way too slow. I put an option where you dont have to access table bseg. And it runs just fine. (all of this is done during PRD Server).
My question is
1.) How come BSEG seems to make the report slow, even though I put some tight restrictions. <b>Im using For All Entries where Zuonr eq i_tab-zuonr</b>it seems to work fine in DEV and <b>hkont EQ '0020103101'</b>(Customer Deposits).
2.) Is there a way for me to do the same thing as what I mentioned in #1 but only much faster.
Thanks guys and take careHi
It should be better you don't read BSEG table if you haven't the keys BUKRS and BELNR, because the reading could take many times if there are many hits.
If you want to find out the records of G/L Account it's better read the index table BSIS (for open items) and BSAS (for cleared items), here the field HKONT is a key (and ZUONR too). So you can improve the performance:
DATA: T_ITEMS LIKE STANDARD TABLE OF BSIS.
SELECT * FROM BSAS INTO TABLE T_ITEMS
FOR ALL ENTRIES I_ITAB WHERE BUKRS = <BUKRS>
AND HKONT = '0020103101'
AND ZUONR = I_ITAB-ZUONR.
SELECT * FROM BSIS APPENDING TABLE T_ITEMS
FOR ALL ENTRIES I_ITAB WHERE BUKRS = <BUKRS>
AND HKONT = '0020103101'
AND ZUONR = I_ITAB-ZUONR.
Remember every kind of item has an own index tables:
- BSIS/BSAS for G/L Account
- BSIK/BSAK for Vendor
- BSID/BSAD for Customer
These table have the same informations you can find out from BSEG and BKPF.
Max -
Can not get data from database
hi all,
there is a problem , when i write like below :
SELECT * FROM bsis INTO CORRESPONDING FIELDS OF TABLE it_temp
WHERE bukrs = p_bukrs
AND hkont = p_hkont.
p_bukrs , p_hkont are all on the selection screen , and p_bukrs = 1200 another is eq blank. i can not find any data , but with the same condition i can find some data in database , when i debeg i found that p_hkont is initial.
when i write like this :
SELECT * FROM bsis INTO CORRESPONDING FIELDS OF TABLE it_temp
WHERE bukrs = p_bukrs .
this time i can find the data like the database.
so , does someone know where the problem is , why i can not get data ?
kind regards
kevinhi,
if u r using bukrs and hkont as parameters in selection screen then
SELECT * FROM bsis INTO CORRESPONDING FIELDS OF TABLE it_temp
WHERE bukrs = p_bukrs
AND hkont = p_hkont.
this will work.
if u r using then as select-option then the above does n't work.
bcoz select-options work as internal table bcoz of that u have use the query like this
SELECT * FROM bsis INTO CORRESPONDING FIELDS OF TABLE it_temp
WHERE bukrs IN p_bukrs
AND hkont IN p_hkont.
<REMOVED BY MODERATOR - REQUEST OR OFFER POINTS ARE FORBIDDEN>
Edited by: Alvaro Tejada Galindo on Aug 15, 2008 5:25 PM -
Single query to get data from different databases
i need to capture certain fields from certain tables in database 1 and certain fields from certain tables in database 2 into one file using a single SQL statement.
i tried searching on the net
i found that dblinks can help
but iam not sure if ill be able to create dblinks in my situation which is:
i need to get data from oracle to be copied to mysql
this is not a replication acitivity, but i need certain fields from one database and certain from the other
so what iwas thinking is, if i use an sql query to get all the fields (i need around 40) from the different oracle databases and create a singlefile with one insert per select, i can then read that file into mysql
instead of creating multiple sql queries for each table and creating separate files and eventually separate tables in mysql.
can anyone help me here?
or maybe suggest another approach.
thanksHi,
I think dblink is the only option available to get data from different databases. It will work for your case too.
CREATE DATABASE LINK db_link CONNECT TO user_name IDENTIFIED BY password USING 'instance_name'you must have the system privilege 'create database link' to create db links. This way you can get the required data and put it in a table in oracle. But i dont know how to put this data from oracle table to Mysql.
HTH
Muneer -
hi,
in my scenario, XI is passing the data back to RFC, but in my program where i call the RFC, the data is not received. what could be the issue.
CALL FUNCTION 'ZFFF' DESTINATION 'XI'
TABLES
INP = aaa
OUT1 = bbb
OUT2 = ccc.
COMMIT WORK.
it was working fine before when i had only OUT1. Later I added OUT2 and then onwards I am not getting data for any of the tables. I have checked in XI, data is being passed out of XI to RFC. No issues in that.
something seems to have gone wrong in the RFC modfication or the RFC call. can anyone please help.
thksHi,
Check the export import parameter declarations & data types in both RFC & XI.
Put a break point in RFC & check whether it is getting triggered.
Best regards,
Prashant -
Query OR Stored Proc to get data from Tables from All Schemas in the d/base
Hello Experts, (I appologize if i am not using the right way to ask questions)
I have a database, and it has around 400 schemas in it. I have designed a query which will fetch the data from three different table's from Schema1.
But it will be a tedious process of entering the 400 schemas names and pulling the information.
I would like to know as to what would be the best possible way to;
1) Look for all the schemas in the database
2) Look for those specific tables in the schema, which has the data in the tables.
3) If the tables are not present, than Ignore that schema and proceed further.
4) Load the data into a table
Any help, would appreciate it.
Thanks!
The query that i am using is as follows;
-- Query to select all the Schemas from the database
select username from all_users
order by username;
-- Sample Query to see if Tables exsist in the schema
SELECT DISTINCT OWNER, OBJECT_NAME
FROM ALL_OBJECTS
WHERE OBJECT_TYPE = 'TABLE'
AND OBJECT_NAME IN ('ENROLLMENT', 'PRDCT', 'L_P_L')
AND OWNER in ('Schema_1', 'Schema_2', Schema_3', Schema_4',Schema_5', Schema_6')
ORDER BY OWNER;
--Query to get the data from the tables in a Schema
select 'Schema_1@DATABASE_NAME' AS SCHEMA,
(SELECT MAX(LOAD_DT) FROM Schema_1.LOAD_STATUS) AS MAX_LOAD,
L_PROD_LINE.PROD_LINE,
COUNT(DISTINCT ENROLLMENT.MEM_NBR) AS MEMBERSHIP
FROM
Schema_1.ENROLLMENT,
Schema_1.PRDCT,
Schema_1.L_P_L
WHERE
ENROLLMENT.PRODUCT_ID = PRDCT.PRODUCT_ID AND
PRODUCT.PROD_LINE_ID = L_P_L.ID
GROUP BY
L_P_L.PROD_LINE;Hi,
999355 wrote:
Hello Experts, (I appologize if i am not using the right way to ask questions)See the froum FAQ {message:id=9360002}
I have a database, and it has around 400 schemas in it. I have designed a query which will fetch the data from three different table's from Schema1.
But it will be a tedious process of entering the 400 schemas names and pulling the information.
I would like to know as to what would be the best possible way to;
1) Look for all the schemas in the database
2) Look for those specific tables in the schema, which has the data in the tables.
3) If the tables are not present, than Ignore that schema and proceed further.
4) Load the data into a table
Any help, would appreciate it.
Thanks!
The query that i am using is as follows;
-- Query to select all the Schemas from the database
select username from all_users
order by username;
-- Sample Query to see if Tables exsist in the schema
SELECT DISTINCT OWNER, OBJECT_NAME
FROM ALL_OBJECTS
WHERE OBJECT_TYPE = 'TABLE'
AND OBJECT_NAME IN ('ENROLLMENT', 'PRDCT', 'L_P_L')
AND OWNER in ('Schema_1', 'Schema_2', Schema_3', Schema_4',Schema_5', Schema_6')
ORDER BY OWNER; Do you want to give a list of possible schemas (like the 6 above), or do you want to consider all schemas, however many and whatever they are called?
You can get the right information for ALL_OBJECTS, but, since you known all the objects of interest are tables, ALL_TABLES will be faster and simpler.
--Query to get the data from the tables in a Schema
select 'Schema_1@DATABASE_NAME' AS SCHEMA,
(SELECT MAX(LOAD_DT) FROM Schema_1.LOAD_STATUS) AS MAX_LOAD,
L_PROD_LINE.PROD_LINE,
COUNT(DISTINCT ENROLLMENT.MEM_NBR) AS MEMBERSHIP
FROM
Schema_1.ENROLLMENT,
Schema_1.PRDCT,
Schema_1.L_P_L
WHERE
ENROLLMENT.PRODUCT_ID = PRDCT.PRODUCT_ID AND
PRODUCT.PROD_LINE_ID = L_P_L.ID
GROUP BY
L_P_L.PROD_LINE;I take it that the tables in question are ENROLLMENT, PRDCT and L_P_L; they won't have different names in different schemas.
You can start this way:
BEGIN
FOR c IN (
SELECT owner
FROM all_tables
WHERE table_name IN ( 'ENROLLMENT'
, 'PRDCT'
, 'L_P_L'
GROUP BY owner
HAVING COUNT (*) = 3
LOOP
... -- Now get the results for tables in the c.owner schema
END LOOP;
END;
/This will find the schemas that have all 3 of those tables.
Inside the loop, write another dynamic query. All that will change is the value of c.owner
Sorry, I'm running out of time now. I hope this helps. -
Can not delete data from table which is queried in my stored procedure
Hi,
Anyone knows how to fix it:
I have a table. In a stored procedure, I have a simple query running on this table.
When I want to delete one record from that table, I got error message:
ORA-04091: table *** is mutating, trigger/function may not see it.
Thanks first.Rick, the only time you should get a mutating table error is when a trigger is involved. FK problems have separate error codes (and would be a different problem than the one that started this thread). Using a DBA id check all the tables subject to DML by your function and by whatever calls your function for triggers. Only the owner or a DBA can see the existence of triggers on a non-owned table. This has caused some of the developers I work with to think tables that had triggers do not have them since they do not work under the owning or a DBA ID.
By your description of what you are trying to do in the function we do that all the time without problem.
How large is the function? How/When is it called?
Mark D Powell -
Can not get data from actionscript db operation class?
DBOperation.as:
import flash.events.*;
import flash.net.NetConnection;
import flash.net.ObjectEncoding;
import flash.net.Responder;
import mx.collections.ArrayCollection;
import mx.controls.List;
import mx.rpc.events.ResultEvent;
import mx.collections.ArrayCollection;
public class DBOperation
private var nc:NetConnection;
private var responder:Responder;
public var list:ArrayCollection;
public function DBOperation():void{
nc = new NetConnection();
nc.objectEncoding = ObjectEncoding.AMF0;
nc.connect("rtmp://localhost/ins");
public function getSolutionData(sql:String):Boolean
responder=new Responder(getSolutionList,null);
nc.call
("dbo.getSolutionData",responder,sql);
return true;
public function getSolutionList
(solution:Object):void{
var solutionList:Array = new Array();
for(var items:String in solution)
solutionList.push
({label:items,title:solution[items].title,owner:solution
[items].owner,submitTime:solution[items].submitTime,image:solution
[items].image,imgInstruction:solution[items].imgInstruction});
list = new ArrayCollection(solutionList);
datagrid.mxml:
<mx:Script>
<![CDATA[
import DBOperation;
import mx.collections.ArrayCollection;
[Bindable]
private var solutionList:ArrayCollection;
private function initDG():void{
var dbo:DBOperation=new
DBOperation();
dbo.getSolutionData("some sql
strings");
solutionList=dbo.list;
]]>
</mx:Script>
my problem is I can get the data using DBOperation class,but
I can not
assign it to solutionList by "solutionList=dbo.list;"
The debug information says dbo.list=null, however inside
DBOperation
the "list" is full of data.
What's wrong with it??
Thanks!hi,
if u r using bukrs and hkont as parameters in selection screen then
SELECT * FROM bsis INTO CORRESPONDING FIELDS OF TABLE it_temp
WHERE bukrs = p_bukrs
AND hkont = p_hkont.
this will work.
if u r using then as select-option then the above does n't work.
bcoz select-options work as internal table bcoz of that u have use the query like this
SELECT * FROM bsis INTO CORRESPONDING FIELDS OF TABLE it_temp
WHERE bukrs IN p_bukrs
AND hkont IN p_hkont.
<REMOVED BY MODERATOR - REQUEST OR OFFER POINTS ARE FORBIDDEN>
Edited by: Alvaro Tejada Galindo on Aug 15, 2008 5:25 PM -
I prepared a GUI user connection application in NebBeans 5.5 accessing mySql database in the company server. The application run very well in desktop.
However, when I post it to the company server web, it gets nothing from the database.
Can any one give advice???
Thank you in advance.
The following is my application
import java.util.Vector;
import java.awt.event.*;
import java.awt.*;
import java.awt.event.*;
public class UserConnection extends javax.swing.JFrame {
//constants for database
private final String userName = "labmanage";
private final String password = "labmanage";
private final String server = "jdbc:mysql://svr.corp.com/labmanage";
private final String driver = "com.mysql.jdbc.Driver";
private JDBCAdapter data = new JDBCAdapter(server, driver, userName, password);
//variables
private String user, pwd;
private Vector<Vector<String>> userTable = new Vector<Vector<String>>();
private Vector<String>colUserNames = new Vector<String>();
* Creates new form UserConnection
public UserConnection() {
initComponents();
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
// <editor-fold defaultstate="collapsed" desc=" Generated Code ">
private void initComponents() {
userLabel = new javax.swing.JLabel();
pwdLabel = new javax.swing.JLabel();
userTextField = new javax.swing.JTextField();
passwordField = new javax.swing.JPasswordField();
submitButton = new javax.swing.JButton();
statusLabel = new javax.swing.JLabel();
jScrollPane1 = new javax.swing.JScrollPane();
statusTextArea = new javax.swing.JTextArea();
changePwdButton = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("User's Connection");
setBackground(new java.awt.Color(153, 204, 255));
setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
setFont(new java.awt.Font("aakar", 1, 12));
userLabel.setText("User Name:");
pwdLabel.setText("Password:");
submitButton.setText("Submit");
submitButton.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
submitButtonMouseClicked(evt);
submitButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
submitButtonActionPerformed(evt);
submitButton.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyTyped(java.awt.event.KeyEvent evt) {
submitButtonKeyTyped(evt);
statusLabel.setText("Status:");
statusTextArea.setColumns(20);
statusTextArea.setEditable(false);
statusTextArea.setLineWrap(true);
statusTextArea.setRows(3);
statusTextArea.setText("Initial assigned password is \"dime\".");
statusTextArea.setWrapStyleWord(true);
jScrollPane1.setViewportView(statusTextArea);
changePwdButton.setText("Change password");
changePwdButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
changePwdButtonActionPerformed(evt);
org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.addContainerGap()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(userLabel)
.add(pwdLabel)
.add(statusLabel))
.add(35, 35, 35)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(submitButton)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(changePwdButton))
.add(passwordField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 230, Short.MAX_VALUE)
.add(userTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 230, Short.MAX_VALUE)
.add(org.jdesktop.layout.GroupLayout.TRAILING, jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 230, Short.MAX_VALUE))
.addContainerGap())
layout.setVerticalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.addContainerGap()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(userLabel)
.add(userTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(pwdLabel)
.add(passwordField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(statusLabel)
.add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(15, 15, 15)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(submitButton)
.add(changePwdButton))
.addContainerGap(27, Short.MAX_VALUE))
pack();
}// </editor-fold>
private void submitButtonKeyTyped(java.awt.event.KeyEvent evt) {
if(evt.getKeyCode() == KeyEvent.VK_ENTER) {
submitButton.doClick();
submitButton.requestFocus();
changePwdButton.requestFocus();
private void changePwdButtonActionPerformed(java.awt.event.ActionEvent evt) {
String command = evt.getActionCommand();
if(command.equals("Change password")) {
passwordField.setText("");
//Get connection to the changing password panel
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new ChangePassword().setVisible(true);
private void submitButtonActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
String command = evt.getActionCommand();
if(command.equals("Submit")) {
user = getUser();
pwd = getPwd();
data = new JDBCAdapter(server, driver, userName, password);
data.executeQuery("SELECT * FROM USERTABLE");
colUserNames = data.getColumnNames();
userTable = data.getDataTable();
if(colUserNames.elementAt(0).equals("")) {
statusTextArea.setText("Can not connect to database");
boolean checkUser = false;
int i = 0;
while(!checkUser && i<userTable.size()) {
if(user.equalsIgnoreCase((String) userTable.elementAt(i).elementAt(0))) {
//Find the user in database
checkUser = true;
//Check user's password
if(pwd.equals((String)userTable.elementAt(i).elementAt(1))) {
//Check for initial default password. The user is requested
//to change his password
if(pwd.equals((String) "dime")) {
statusTextArea.setText("You are requested to change your " +
"initial assigned password. Click 'Change password' please.");
else {
//Set UserConnection Panel to invisible
setVisible(false);
dispose();
//Get connection to the table
if(userTable.elementAt(i).elementAt(2).equals("0")) {
//Get connection to non-editable table
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
PVRackReportNonEdit rackReport = new PVRackReportNonEdit();
rackReport.createAndShowDialog();
else {
if(userTable.elementAt(i).elementAt(2).equals("1")) {
//Get connection to editable table
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
PVRackReport rackReport = new PVRackReport(user);
rackReport.createAndShowDialog();
//PVRackReport rackReport = new PVRackReport();
else statusTextArea.setText("You do not get approval for viewing data. " +
"Please contact the administrator for details.");
else {
passwordField.setText("");
statusTextArea.setText("Please enter corrected password or" +
"the administrator for details.");
i++;
if(!checkUser) {
passwordField.setText("");
statusTextArea.setText("Not find such user's name." +
"contact the admistrator for details.");
private void submitButtonMouseClicked(java.awt.event.MouseEvent evt) {
// TODO add your handling code here:
* @param args the command line arguments
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new UserConnection().setVisible(true);
public String getUser() {
return userTextField.getText();
public String getPwd() {
return passwordField.getText();
// Variables declaration - do not modify
private javax.swing.JButton changePwdButton;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JPasswordField passwordField;
private javax.swing.JLabel pwdLabel;
private javax.swing.JLabel statusLabel;
private javax.swing.JTextArea statusTextArea;
private javax.swing.JButton submitButton;
private javax.swing.JLabel userLabel;
private javax.swing.JTextField userTextField;
// End of variables declaration
Here is my JDBCAdapter
package rackdemo2;
* This is an adaptor which transforms the JDBC interface
* to the PVRackTableDialogue
import java.util.Vector;
import java.sql.*;
import javax.swing.table.AbstractTableModel;
import javax.swing.event.TableModelEvent;
public class JDBCAdapter {
Connection connection;
Statement statement;
ResultSet resultSet;
Vector<String> columnNames = new Vector<String>();
Vector<Vector<String>> rows = new Vector<Vector<String>>();
ResultSetMetaData metaData;
public JDBCAdapter(String url, String driverName,
String user, String passwd) {
try {
Class.forName(driverName);
connection = DriverManager.getConnection(url, user, passwd);
statement = connection.createStatement();
catch (ClassNotFoundException ex) {
System.err.println("Cannot find the database driver classes.");
System.err.println(ex);
catch (SQLException ex) {
System.err.println("Cannot connect to this database.");
System.err.println(ex);
public void executeQuery(String query) {
if (connection == null || statement == null) {
System.err.println("There is no database to execute the query.");
return;
try {
resultSet = statement.executeQuery(query);
metaData = resultSet.getMetaData();
int numberOfColumns = metaData.getColumnCount();
// Get the column names and cache them.
// Then we can close the connection.
for(int column = 0; column < numberOfColumns; column++) {
columnNames.addElement(metaData.getColumnLabel(column+1));
// Get all rows.
while (resultSet.next()) {
Vector<String> newRow = new Vector<String>();
for (int i = 1; i <= columnNames.size(); i++) {
String tempString = resultSet.getString(i);
if(!tempString.equals("null")) {
newRow.addElement(tempString);
else {
newRow.addElement("");
rows.addElement(newRow);
//Modify dataTable to add empty row to separate chassis
if(numberOfColumns>1) {
int nRow = rows.size();
Vector<String> row = new Vector<String>();
for(int i=0; i<numberOfColumns; i++){
row.add("");
if(nRow>0 || numberOfColumns>0) {
//Adding blank row to separate chassis
int i = 0;
while(i<nRow) {
if(!rows.elementAt(i).elementAt(0).equals("")) {
if(i>0) {
rows.add(i, row);
i++;
nRow = rows.size();
i++;
close();
catch (SQLException ex) {
System.err.println(ex);
public void close() throws SQLException {
resultSet.close();
statement.close();
connection.close();
// MetaData
public Vector<String> getColumnNames() {
return columnNames;
public Vector<Vector<String>> getDataTable() {
return rows;
public int getColumnCount() {
return columnNames.size();
// Data methods
public int getRowCount() {
return rows.size();
}Thank you for your answer.
I'm very new to mySql as server. When I was assigned
to write the application, the administrator has set
up mySql database in the company web server for my
application. My program runs very when using my
workplace desktop with java web start or with java
web start in netbeans (all paths should be link to my
desktop hard disk, i.e. users/application/). I can
not run the application at home because I can not
access to the company intranet server (for security
purpose). The problem happens when I post the
application in the company web page (I have to modify
all paths in jnlp file to the company web address).
The program then runs without exception except it
seems that it gets no data from the database (for
example, when I type my username, it returns that
"There is no such user name. contact.." as what I
code in the application for not correcting user name)
It happens for not only using my company desktop but
also for others.
Please help me.
Thank you in advance.And all this could have been answered yesterday, in your other thread, when I asked you "Is the DB configured to allow that user to connect to the DB from where that user is attempting to connect from?"
Seeing as how you get that error, the obvious answer was, "No." At which point we could have continued.
Configure the needed users into the DB, without forgetting to allow them access from the machines from which they are going to access from.
Although, I agree with Rene, that you should set up a server of some sort, located on the same machine as the DB, for communicating with the DB. -
How to get data from table to pass into alvgrid function module
i want to get some data from below table to pass into function module of alvgrid
how can i get data please help.
thanks in advanced.
form get_data.
select * into corresponding fields of table itab
from J_1IEXCHDR
inner join J_1IEXCDTL
on J_1IEXCDTLlifnr = J_1IEXCHDRlifnr
where J_1IEXCHDr~status = 'P'.
append itab.
endform.Pass your final table(internal table which you want to display) along with fieldcatalog to FM reuse_alv_grid_display.:\
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = i_repid
IT_SORT = gt_sort
it_fieldcat = lt_fieldcat[]
TABLES
t_outtab = lt_final
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF. -
Please let me know how to write the Query to fetch data from tables
Hi Folks,
Please let me know how to get the data from different tables using the functionality SQ03,SQ02 and SQ01 .
Helpful answers will points awarded.
Regards,
Ram.Dear Ram,
Please find the below link which gives in detail with screen shots.
[SAP Query|http://media.techtarget.com/searchSAP/downloads/Teach_yourself_SAP_C20.pdf#search=%22CREATE%20REPORT%20USING%20SQVI%20%2C%20SAP%22]
Thanks
Murtuza -
Not getting data from newly created dashboards
Hi,
I have created new Dashboard like "Server Health Status" not getting any data, whatever i have created earlier dashboards all getting data without any issue but if i create the same new dashboard im getting any data, please find the below error,
Can you please help me n this issue anyone. I'm Using SCOM 2012 SP1 with SQL Server 2008 R2.
Microsoft.EnterpriseManagement.Presentation.DataAccess.DataAccessDataNotFoundException: Exception reading objects ---> Microsoft.EnterpriseManagement.Common.UnknownDatabaseException: The query processor ran out of internal resources and could not produce
a query plan. This is a rare event and only expected for extremely complex queries or queries that reference a very large number of tables or partitions. Please simplify the query. If you believe you have received this message in error, contact Customer Support
Services for more information.
at Microsoft.EnterpriseManagement.Common.Internal.ServiceProxy.HandleFault(String methodName, Message message)
at Microsoft.EnterpriseManagement.Common.Internal.EntityObjectsServiceProxy.GetRelatedManagedEntitiesByManagedEntityTypesAndCriteriaWithInstanceQueryOptions(IList`1 parentManagedEntityIds, Boolean recurse, IList`1 managedEntityTypeIds, IList`1
managedEntityBaseTypeIds, IList`1 criterias, String languageCode, InstanceQueryOptions instanceQueryOptions)
at Microsoft.EnterpriseManagement.InstancesManagement.GetRelatedObjectsInternal[T](ICollection`1 instanceIds, ICollection`1 criteriaCollection, TraversalDepth traversalDepth, ObjectQueryOptions queryOptions)
at Microsoft.EnterpriseManagement.Management.DataProviders.ManagedEntityProvider.GetContainedManagedEntities(IDataObjectCollection targetEntities, ICollection`1 recursionTypeNames, ICollection`1 baseTypeNames, String criteriaString, List`1 valueDefinitions,
List`1 sortValueDefinitions, String typePropertyName, String typeWithIconPropertyName, Boolean propertyCollectionRequested)
--- End of inner exception stack trace ---
at Microsoft.EnterpriseManagement.Presentation.DataAccess.DataProviderCommandMethodInvoker.Invoke()
at Microsoft.EnterpriseManagement.Monitoring.DataProviders.RetryCommandExecutionStrategy.Invoke(IDataProviderCommandMethodInvoker invoker)
at Microsoft.EnterpriseManagement.Presentation.DataAccess.DataProviderCommandMethod.Invoke(CoreDataGateway gateWay, DataCommand command)
at Microsoft.EnterpriseManagement.Presentation.DataAccess.CoreDataGateway.ExecuteInternal[TResult](DataCommand command)
at Microsoft.EnterpriseManagement.Presentation.DataAccess.CoreDataGateway.<ExecuteAsync>b__0[TResult](<>f__AnonymousType0`1 data)
Thanks
Raja R
Raja RHi,
Please try the Update Rollup 2 for System Center 2012 Service Pack 1
http://support.microsoft.com/kb/2802159
It fixes the issue “Query processor runs out of internal resources and cannot produce a query plan when you open Dashboard views”.
We
are trying to better understand customer views on social support experience, so your participation in this
interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place. -
Report is not getting data from Remote cube thru Multi Provider
Hi SAPians
I ve strucked up with a Problem in The Reconciliation Report in BW3.5
The Report was built on a Multi Provider, which was created on Basic and Remote Cubes .
Both cubes have same Data Source and all the Objects were in Active version and found good.
When I m executing the Report ,I m only getting the data from the Basic cube and no data is coming from Remote Cube.
I ve checked the char " 0Infoprov " in Multi Provider and It was assigned with the both the cubes.
What might be the problem
Please help me in this regard
Thanks in advance
Regards
ArjunHi
In the Reconciliation multiprovider, include 0INFOPROVIDER = Remote cube.
If data still not coming, you can be sure connectivity with Source system of the Remote cube is the issue
Check with basis to solve the connectivity issue.
Ensure Remote cube is consistent
Bye -
SRM - How to get data from tables???
Hi experts -
I am new to SRM and I have a requirement to code a program that will retrieve purchase orders based on selection criteria, write an ALV report and all the user to select particular lines to close the p.o.
My question is that with the following selection criteria, I see that there are tables such as CRMD_ORDERADM_H and CRMD_ORDERADM_I as well as BBP_PDBEH and BBP_PDBEI, but not exactly sure if I should do selects on them individually or can you collect the records from a function module or BAPI?
Selection criteria:
PO Number - range
Purchasing group - range
Vendor number - range
Buyer ID - range
Cost Center - range
GL Account - range
WBS - range
Asset - range
Plant - range
Company code - range
Delivery Date - range
PO Create Date - range
How can I pull the qualifying records in the easiest manner?
Thanks in advance!
MarkI'm not certain about this, but I don't think the information you need is in the SRM frontend. I think you'll have to use an RFC enabled FM to retrieve the data from the R/3 backend to the SRM system. Or maybe there is a BAPI that does this for you.
Rob -
Hello All,
I have a scenario where I have two different software systems (SAP and xyz systems), where a intermediate table will be created between the two systems that is shared. Data will be updated by the xyz systems into this shared table. Now, my questions regarding this shared table.
1) Can we write some program or something to get the data from shared table to update the SAP?
2) If possible send me the suggestions
3) Please also send me the sample code to get the data from the shared table
Thanks in advance,
SDN poweredIsn't this something for XI?
You can create RFC's which can connect to other systems.
or you just place the data on the application server and schedule a daily job to retrieve data from that to fill an SAP table.
Maybe you are looking for
-
I often download alot of docs that I end up using the OpenWith box. I see there are old versions of apps in this list is there a way that I can remove the older app versions from here so I have one version (the latest) to choose from? rd
-
Unable to create an universe on a query based on a real time cube
Hello, I'm trying to create a universe on a BEx query. This query is based on a multiprovider which consists of one standard cube and one real time cube. I'm unable to see this query in the designer. I do see an empty folder with the name of the mult
-
Tiger, iPhoto 5.02, and B&W Photo Problem!
Yikes! After installing Tiger (10.4) with iPhoto 5.02, my black and white photos appear with a very high contrast when viewed in iPhoto. The thumbnails look fine, but the full size image quality is extremely poor! They were OK before the tiger upgrad
-
My email has been down over 30 hours
We need compensation for this long email outage.
-
I need help with my adobe flash
I recently upgraded my adobe flash player and now my youtube is acting up. All of the videos are shaking..I don't know how to fix it.