Skip to Content
avatar image
Former Member

Fire Joint Query using JCO

Hi All,

I am using JCO Connection from a Webdypro Java Application to access the ERP backend, and fetch all the vendors for a particular Purchasing Organization.

I am using the FM RFC_READ_TABLE. But I have to pick data from 2 tables here LFA1 and LFM1, as one contains vendor details and one contains Vendor - Purchasing Organization Mapping. Can I use RFC_READ_TABLE to fetch data from both these table using a single Joint query. Tried but getting exceptions while executing the functions.

First fetching all the related vendors from LFM1, and adding these vendor IDs to the query on LFA1 worked. But it seems I cant add more than 900 vendor ids to the query. And customer is targetting more than 1000.

When I added more than 900 vendor ids to the query, I get the following exception

com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR_SYSTEM_FAILURE: Error in module RSQL of the database interface.#

So can you help me here with any kind of solution,

1) Is it possible to fire a joint query with both these tables involved, through JCO.

or 2) is there anyway to avoid the exception mentioned above and add more than 900 vendor ids to the query.

Regards,

Prakash

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    May 20, 2010 at 11:47 AM

    Hi

    The JCO has no correspondence with the Join in the RFC. Let Abaper to create a BAPI joining the two mention tables. And then integrate in your Project and check it.

    - Saravanan K

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 21, 2010 at 04:48 AM

    Hi Prakash,

    Due to connection timeout the JCo connection is getting failed and displaying failure error.

    Try setting the below paramets to meet your requirement.

    Connection Timeout (msec.): (Ex:10000 and above)

    Maximum Waiting Time (msec.): (EX:30000 and above)

    And recreate the JCO once again.

    Pls. reply me incase of any other inouts you require.

    Regards,

    Lavanya.G

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      HI Lavanya,

      Do you think this is due to time out issues.

      Because so far, in my system and as well as customer's system we havent faced any timeout issues.

      When I didnt pass any search parameters to the query I was still able to retreieve all the records in the table, without any timeout exceptions (though there were performance issues).

      When I went through other forums, they said this particular exception occurs when they had used more than 900(approx) parameters in the query (IN Parameters).

      My query goes like this.

      Select Field1, Field2 from LFA1 where Field0 = '1' or field0 ='2' or field0='3'.... or field0 = '900' .

      Saravanan had suggested to create a BAPI which does this Joint query stuff in the backend itself. But since customer is going live in a week approving any development in the backend is not possible now.

      So is there any work around to get through this exception, or is there any other RFC already available that can take in joint queries.

      Regards,

      Prakash