Skip to Content

JCo - Single Search JOIN tables

Hi MDM gurus,

I'm quite new to the MDM JCo API, and I'm trying to do do a search based on two tables.

E.g. I have two tables

Table A has fields F1(key), F2 (foreign key)

Table B has fields F2(key), F3

Is it possible to do 'One single search' on these tables where F1 = F1value

but getting results: AF1, AF2, B~F3 in a ResultSet?

Currently the only way I know to do this is first Search Table A where F1 = F1value.

Loop through the results and Search Table B.

This is very inefficient coding where in SQL or in ABAP you can do this with one line of code.

Any help would be appreciated! Code would be a bonus!

Cheers,

Michael.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Feb 27, 2007 at 02:16 PM

    Hi Michael,

    You can use Free Form Search for doing the same. Thishttp://jakarta.apache.org/poi/hwpf/index.html">This> weblog would be the best available guide for the same.

    For quering multiple tables, you can add one more table parameter by this line,

    FreeFormTableParameter table_products=

    search.GetParameters().NewFreeFormTableParameter("Products");

    FreeFormTableParameter table_accounts=

    search.GetParameters().NewFreeFormTableParameter("Accounts");

    and then specify the parameter for each Table instance according to your requirement.

    Hope this helps.

    Thanks and Regards,

    Mausam

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 27, 2007 at 02:28 PM

    Hi Mausam,

    I looked at the blog, and looked at the Free Form searches.

    It appears I can search for a fields value where field EQUALS value.

    However I can't do a JOIN.

    Select * from A, B

    where AF2 = BF1.

    Hope this clarifies my question.

    Cheers,

    Michael.

    Message was edited by:

    Michael Pang

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Michael,

      Sorry for mistunderstanding the question.

      I dont see any APIs as of now to do that as all the search function finally takes one Search object or one ResultSetDefinition object.

      Regards,

      Mausam

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.