Can't get the tables normally using RFC call to BC

SAP Business Connector Developer.
->IDataUtil.getIDataArray function (can't work properly using RFC CALL)( I think it's the source of problem)
I use the SAP Business Connector Developer(4.7) to get data from db2.
and I create a JAVA service in th BC named writeData,
the most important snippet shown below.
  // Get IDataCursor to manipulate pipeline
  IDataCursor idcPipeline = pipeline.getCursor();       
  // If the value is not an IData[], returns null.
  IData[] recordListIn = IDataUtil.getIDataArray( idcPipeline, "ORICONTENT" );
  idcPipeline.first( "CHECKEDDATE" );
  String checkedDate  = (String) idcPipeline.getValue();
  idcPipeline.first( "CPYCOD" );
  String cpycod= (String) idcPipeline.getValue();
   /* if ( recordListIn == null )
          errMsg += "No Input Data";
          recLen=0;
  }else{
        recLen= recordListIn.length;
  try{
     recLen= recordListIn.length;
  catch(Exception ed){
     errMsg += "\r\nExceptionIn: " + ed.getMessage();
     recLen=0;
  In BC, the variable recLen can get the record list length normally, but if i call the function in the SAP,
the system throw an exception, the ed.getMessage() return value NULL.
  I think the problem which the rfc can't work properly is that the method IDataUtil.getIDataArray execute unnormal.
  I have set value to ORICONTENT(record list) in SAP, and it can return the record that i have set to the SAP System,
and in the java service,  I have return another record list creating using the following spippet, It can work normally.
com.wm.app.b2b.server.DBConnection db
        =new com.wm.app.b2b.server.JDBCConnection(driverString,userName,
                userPwd);
          com.wm.util.Values ida= db.execSQL(selectSql);
          idcPipeline.insertAfter("OUTDATAREC", ida );
          db.close();
I have tried some adjustments, but nothing can work.
The reason That I use one jave service instead of standard flow services is I have to transfer data to more than two db2 servers, and I have to keep the consistency.
Attached please find the SAP test page (using se37) and the java service code.
May you kindly help me to solve this problem, I don't know the real reason, and which is very emergent, but i can't changed Priority(If I changed it ,the page is unuseful).
Additional,I have added some code shown below,
idcPipeline.first( "ORICONTENT" );
java.lang.Object curObj = idcPipeline.getValue();
if (curObj == null)
errMsg +=" object is null ";
else{
errMsg +=" object isnt null ";
try{
recordListIn=(IData[])curObj;
} catch(Exception ed){
errMsg += " ExceptionOBj: " + ed.getMessage();
recLen=0;
In BC, everything is ok. but call the function in the sap, Show the following informatin:
Object isnt null
ExceptionOBj: com.wm.util.Table

Hi, Mei Xie
you mentioned 'In BC, everything is ok. but call the function in the sap, Show the following informatin: ....', I think the return value of RFC is null.
have you tried to add a try catch around the RFC call, like following:
try {
  IDataCursor idcPipeline = pipeline.getCursor();
} catch (Exception ...)
I'm not familiar with jave, only worked on C#, but I think try to catch the exception on RFC call is worth doing. Maybe it will descript some information around the problem.
By the way, can you tell me which RFC/BAPI you are calling?
I don't know what 'In BC, everything is ok.' mean. I have no experience on BC, only used dotnet connector. So can you explain how you use BC for me?
thanks

Similar Messages

  • We are upgrading from 8.3 to 9.2. How can i get the table(record) structure changes between these 2 version

    We are upgrading from 8.3 to 9.2. How can i get the table(record) structure changes between these 2 versions. I am not able to find it in Oracle support.

    My guess is you want to upgrade HR8.3 to 9.2 - and that is not one jump upgrade. You will need to go HRMS 83 to 90
    (PeopleSoft Enterprise HRMS 8.3x to 9.0 Upgrade (Doc ID 747333.1) and then 90 to 92 (PeopleSoft Human Capital Management 9.0 to 9.2 Upgrade Home Page (Doc ID 1536087.1)
    Each these MOS pages contains the Demo to Demo Compare Reports that show the data structures changes between the releases.
    Hope it helps.

  • I lost my phone 2 days ago, can I get the phoneNumber which use my phone by IMEI or Serifal NO  .  I am in China.

    I lost my phone 2 days ago, can I get the phoneNumber which use my phone now by IMEI or Serifal NO  .  I am in China.

    nothing unless you had "find my iPhone" installed before it was lost.

  • How can we get the table name...

    Hi All,
    How can we get the actual table name for an argument if its datatype is %ROWTYPE.
    For Ex :
    function ACCOUNT_UPDATE (account_no number,
    person person%rowtype,
    amounts dbms_describe.number_table,
    trans_date date)
    return accounts.balance%type;
    In the above function 'ACCOUNT_UPDATE', for argument person the datatype is 'person%rowtype'.
    Is there any way to get the name from Data Dictionary tables.
    I tried using All_Arguments and DBMS_DESCRIBE, I can able to get all the individual fields of %ROWTYPE by I could not able to know the exact table name thru the DD.
    my requirement is dynamically I need to declare a variable for the argument datatype.
    Your help is highly appreciated.
    Thanks

    hi vinay,
    this is the easiest way to find the tablename of a particular field.
    t.code:XD01.
    enter.
    select the kunnr field.
    press F1.
    the top of the screen u will get 'Technical setting icon.
    select that one.then u will get tablename,fieldname,parameter id also.
    if helps give the rewards.
    regards,
    akash.k

  • How can I get the table control up arrow or down arrow SCROLL OK_CODE?

    Dear All,
    I want get the table control up or down Scroll OK_CODE (not button, is arrow click), But I debugged have not found when I click the up or down scroll.
    Please give me some help.
    Thanks

    Hi Sun,
    PBO..
                               Loop with control T1.
                       module get_Looplines.
                    Endloop.
                        Module get_looplines.
                          Looplines = sy-loopc.      "<< by using this you can get the scroll bar...
                        Endmodule.
    if you wan the ok_code for scroll bar in table control...
    the ok_code is not generated for scroll bar..
    but if you do not clear the ok_code in PBO it will carries the ok_code when ever you press scroll bar up and down...same ok_code is repeated..
    Regards,
    Prabhudas

  • Can I get the version info using the SDK?

    Can I get the verion info from the SDK (Web Services SDK or Enterprise SDK)? For instance, for BOE XI R2, I can get some info like this "boexir2", so that I know jar files are for BOE XI R2. If this info can be retrieved, could you please tell me how I should do? Thanks.

    Sure, but the odds are that you'll find the regular non-upgrade boxed version for less than the upgrade price, especially as we get nearer the holidays.

  • How can I get the table name of my column?

    I'm using the JDK 1.3 trying to get a table name of a column from a result set. Regardless of what driver I'm using (ODBC Bridge/Oracle) I always get a null returned. Does this method work?
    If not, if I'm doing an SQL query that uses more than 1 table and each table has a return of the same column name, how do I distinguish which table the column is from. Thanks

    You can use ResultSetMetaData interface and method
    String getTableName(int column)
    This should return you the table name.
    To get ResultSetMetaData object, you can use
    ResultSetMetaData getMetaData()
    method of ResultSet interface.
    HTH

  • How can I get the Tables in my report to update their field lists?

    I am working with Crystal Reports 2008, and I have a ReportDocument loaded in a .NET project.
    I want to update the field lists of the tables (stored procedures) used in the report.  I am calling "VerifyDatabase()", but this does not update the field lists.  Through the designer, I accomplish this by going to the Database -> Set Datasource Location..., then clicking on the stored procedure (i.e. table) in the report, clicking on the stored procedure under the database in the bottom pane, and then clicking "Update".
    How can I accomplish this in code?
    Thanks for any help.

    Hello,
    You have to use RAS and the replace connection method. The Report Engine does not have the ability.
    Search forums for "ReplaceConnection_Click" and you'll find sample code that should work for you.
    Thank you
    Don

  • How can I get the table name of a field..

    Hi,
    If we know the table name we can find all the fileds from it
    using desc <tablename>.
    But, I would like to find table name of a known field's name.
    Where all these fields are storing in the database.
    THanks in Advance,
    Srinivasulu.

    ALL_TAB_COLUMNS
    rgds, APC

  • Can't get the "Complete action using" choice back

    When using Firefox mobile it used to ask "Complete action using" and then give a choice of Firefox or Google Play when I tried to open certain files. When one made the choice it would also give the choice of "just once" or "always". I accidentally opted for "always" the last time now it does it automatically whether I want to or not. I have tried to reset by clearing the apps defaults, by resetting all apps preferences from within android apps settings and by clearing Firefox's privacy settings. Still no joy, I have even reinstalled the Firefox app but even though I uninstalled first these settings seem to have been retained in android somewhere. Does anyone know how I can delete the file type associations so that I get the original choice again?

    Hi,
    Unfortunately at the moment, there is not an option to reset Firefox for Android, however to reset the dialogue, if there not alot of bookmarks, phillip has a nice answer to this from a previous question: [[https://support.mozilla.org/en-US/questions/975510 questions/975510]]
    First! Back up the user profile date by creating a Sync account, then adding the sync account once more it has been reinstalled. Another user suggested in the past this add-on to manually copy the profile. It is available for the Android and it is called [[https://addons.mozilla.org/en-US/android/addon/copy-profile/ Copy Profile]]
    Hope this helps

  • Getting the tables actively used in the schema

    Hello,
    We are in need of releasing space from the schema we use.
    Can anyone please suggest how to find the tables that has not been used for a given amount of time. So that we can drop the tables which are not effectively used by the application..
    Thanks and Regards.
    Sathiya

    user13299583 wrote:
    Thanks for the replies ..
    Actually the application was designed/created long back .. Lots of changes has been incorporated and lots of features has been removed from the application..
    But in the backend the associated tables were not removed and we feel that it occupies huge space in the server ..
    I am afraid i can enable auditing as it is a production instance and lots of formalities are involved if we have restart the server ..
    Is there any other way to find out the tables which has not been touched, for a period of time ..
    The project has been switched over to many people so there are no proper documentation available .. So we are forced to find some alternatives to identify the unused tables ..
    Thanks,
    Sathiya.What about using triggers and logging?

  • How can I get the same result using single query?

    There are 3 tables
    1) tool_desc -
    a master table for storing tool records,
    columns tool_no, tool_chg,
    # of records = 1.5 Millon
    2) step_desc -
    a master table for storing plan wise step records,
    columns plan_id, step_key,
    # of records = 3700 Million
    3) step_tool - a transaction table storing tools to the steps,
    columns plan_id, step_key, tool_no, tool_chg
    For each step in the step_desc table, I need to randomly fetch 1 to 50 tools from tool_desc and insert them into step_tool table.
    Using PL/SQL block, it is like the following -
    begin
    for x in (select plan_id, step_key from step_desc) loop
    insert into step_tool(
    plan_id,
    step_key,
    tool_no,
    tool_chg)
    select
    plan_id,
    x.step_key,
    tool_no,
    tool_chg
    from
    tool sample(0.1)
    where
    rownum <= trunc(dbms_random.value(1,51))
    commit;
    end loop;
    end;
    I need to do the same using a single query so that I can use the CTAS (create table as select) statement and load the data as a bulk.
    Can I do that?

    If they have parent child releation, you can use connect by prior clause,

  • Can't get the VM to use virutal memory

    Hi all,
    Here the configuration I'm running :
    - Debian 3.1
    - java 1.5.0_09
    - 1 Go of physical memory
    - 2,6 Go of virtual memory
    - ulimit : no limit
    I have a webapp deployed on Tomcat 5.5 wich I have to deploy several times on the same server. Guess what happens : I'm running short on memory. The physical memory usage climbs to 99% and then application doesn't want to do anything new ...
    I thought it was because of the default values for Xms and Xmx, so I changed them to this : -Xms256m -Xmx512m (keep in mind that this amount of memory is not available at the time I start the server, i only have 400Mo free). Unfortunatly, I get the same error (some sort of out of memory one) and same behaviour.
    My problem is : the JVM does NOT use the virtual memory at all !
    What have done wrong ? Any guess ?
    Thanks for your time,
    Jerome

    Real programs need real memory. You can run Java applicatons out of swap space, but since the heap isn't organized to be accessed from the swap space, the performance will be dreadful. Particularly the performance of the garbage collector, the first phase of which walks the object graph: essentially random accessing into the heap, probably causing a page fault for each reference in the heap. Not pleasant.
    When your server starts up with -Xmx512m we will reserve 512MB of swap space for the heap, plus a bunch of other space for thread stacks, libraries, and random other data structures the JVM needs. If you have 2,6GB of virtual memory, I would expect you to be able to start 4 instances of your server, but not 5. With only 1GB of physical memory, I wouldn't expect the performance to be acceptable once the second instance has started, if you are really using the 512MB in each heap. If you are using closer to the 256MB of initial heap, then the second instance should be fine, and maybe even the third instance. Reserving swap space is cheap. Actually using it for running applications is a performance disaster. You should be able to use something like vmstat(8) to monitor your physical memory usage and paging activity.
    P.S. -Xmx512m and -Xmx512M are the same. See http://12.101.252.19/hotspot/xref/src/share/vm/runtime/arguments.cpp#461 for the code that does this.
    P.P.S. You should continue to use -Xms if you know that your application will need at least 256MB of heap space. Otherwise we will slowly grow the heap as your application needs that memory, after full collections to try to keep the heap from growing.

  • I want to use the ethernet connection from my new iMac to my Time Capsule.  It seems only the Wifi is seen by either device.  Ive connected the Time Capsule to the iMac.  How can I get the iMac to use the wired connection

    I want to connect my iMac to my Time Capsule using Ethernet.  I have them connected via an Ethernet cable, but only WiFi seems to be working.  How can I specify the Ethernet connection instead of WiFi?  Thanks
    Welked

    Go to preferences, network and see if ethernet is indicated. Be sure it shows a green dot.  Also be sure it is at the top of the list (above WiFi).  If not click on the the wheel at the bottom and set service order.

  • Can't get the table display my results

    OK After some good hours of debugging i am able to display my results on JTable for my queries. But i got another problem now. When i select Query2 from my JComboBox and click on execute button nothing happens, same thing for query3 and 4. The only thing which works is QUERY1 why? what am i doing wrong?
    import java.awt.FlowLayout;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JComboBox;
    import javax.swing.JFrame;
    import javax.swing.JOptionPane;
    import javax.swing.JTable;
    import javax.swing.table.DefaultTableModel;
    import javax.swing.table.TableModel;
    import java.awt.event.ActionEvent;
    import java.sql.Connection;
    import java.sql.Statement;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.ResultSetMetaData;
    import java.sql.SQLException;
    import java.util.Vector;
    public class DatabaseProgramming extends JFrame implements ActionListener{
         static final String JDBC_DRIVER = "com.mysql.jdbc.Driver";
         static final String DATABASE_URL = "jdbc:mysql://localhost/employees";
         static final String USERNAME = "jhtp6";
         static final String PASSWORD = "jhtp6";
         private static final String QUERY1 = "SELECT * FROM employees WHERE DEPARTMENTNAME = 'SALES'";
         private static final String QUERY2 = "SELECT * FROM hourlyEmployees WHERE hours >= '30'";
         private static final String QUERY3 = "SELECT * FROM commissionEmployees ORDER BY commissionRate DESC";
         private String names[] = {"QUERY1", "QUERY2", "QUERY3", "QUERY4"};
         private Connection connection;
         private ResultSet resultSet;
         private Statement statement;
         private ResultSetMetaData metaData;
         private JTable resultTable;
         private JComboBox queryBox;
         private JButton button;
         private int number;
         private boolean connectedDatabase = false;
         private DefaultTableModel dtm;
         public static void main(String[] args) {
              DatabaseProgramming frame = new DatabaseProgramming();
              frame.setVisible(true);
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         public DatabaseProgramming() {
              super("Testing Database");
              setLayout(new FlowLayout());
              //dtm = new DefaultTableModel(getColumnName(number),0);
              //     statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
                   //         ResultSet.CONCUR_READ_ONLY);
              queryBox = new JComboBox(names);
              queryBox.setEditable(false);
                   //queryBox.addActionListener(this);
                   button = new JButton("EXECUTE");
                   resultTable = new JTable();
                   button.addActionListener(this);
                   add(queryBox);
                   add(button);
                   add(resultTable);
                   //add(result);
                   setSize(400,400);
          public void actionPerformed(ActionEvent e)  {
              String selection = (String)queryBox.getSelectedItem();
                        if(selection.equals(names[0]))
                        validateQuery(QUERY1);
                        if(selection.equals(QUERY2))
                             validateQuery(QUERY2);
                        if(selection.equals(QUERY3))
                             validateQuery(QUERY3);
          public void validateQuery(String query) {
                   try {
                        Class.forName(JDBC_DRIVER);
                        connection = DriverManager.getConnection(DATABASE_URL, USERNAME, PASSWORD);
                        System.out.println("Yay Database Connected");
                    Vector col = new Vector();
                    Vector data = new Vector();
               statement = connection.createStatement();
                  resultSet = statement.executeQuery(query);
                  metaData = resultSet.getMetaData();
                  number = metaData.getColumnCount();
                  for(int i=1; i<=number; i++)
                       col.addElement(metaData.getColumnName(i));
                  while(resultSet.next()) {
                       Vector row = new Vector();
                       for(int i=1; i<=number; i++)
                            row.addElement(resultSet.getObject(i));
                       data.addElement(row);
                 resultTable.setModel(new DefaultTableModel(data,col));
                 resultTable.revalidate();
               catch ( SQLException sqlException )
                  sqlException.printStackTrace();
                  System.exit( 1 );
               catch(ClassNotFoundException e) {
                    e.printStackTrace();
               finally
                  try                                                       
                     statement.close();                                     
                     connection.close();                                    
                  catch ( SQLException sqlException )
                     JOptionPane.showMessageDialog( null,
                        sqlException.getMessage(), "Database error",
                        JOptionPane.ERROR_MESSAGE );
                     System.exit( 1 );
    }

    One last question how can i display the columnName on my JTable? Add the table to a scroll pane and the scroll pane to the frame.

Maybe you are looking for

  • Sorting not working in a report with hyperlinks

    I have a report with hyperlinks for one column and I noticed that sorting is no longer working on that report. If I use another version of the same report witout hyperlinks; sorting does work fine. I was wondering if anyone has encountered this issue

  • PDF portfolio similar to cs5_evalautionkit

    Hi, I am trying to create a pdf portfolio similar to cs5_evalautionkit. All the documents in the portfolio are pdf documents. I want the users to navigate pages through a button on the cover page (enter the document ) and then from a side menu to oth

  • Random number prob

    i am trying to create an array tht outputs random numbers...i keep getting one error which is in the for statement...can anyone help me weed this problem out? import java.util.* ; public class Arrays2{           // main(): application entry point    

  • Need Help!!! Oracle8i Lite

    Hi there, I defined a connection against an oracle8i lite (4.0.1.x). This connection works fine - I can see the tables within the table-browser. Try to create a new bc4j-package against this oracle8i lite with just 1 very small entity (table test wit

  • Converting a long to a byte

    Hi, Is there any way to convert a long to a byte. will byteValue() help?i have tried with it, but i get an error saying "long cannot be dereferenced. long tag = 1231200; byte[] newtag = tag.byteValue();Please tell me why i get this error and help me