Skip to Content
author's profile photo Former Member
Former Member

MDM 7.1 Java API Question - How to search a Lookup [Main] field

Hi

Scenario:

We have two main tables. The second one is linked to the first using the Lookup [Main] field. The relation between these tables is 1:N. Now if some search criteria for the first main table and some for the Lookup [Main] table is provided is there a way that we can do an AND search on both the tables at the same time so that we pull all the related matching records at one shot. Let me know if this is possible and if yes please provide some sample code sets as to how to create the search parameter.

Thanks,

KN.

Add a comment
10|10000 characters needed characters exceeded

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Apr 30, 2010 at 10:14 AM

    Hi,

    This requirement is achievable but not as you want. As per my understanding, there is an alternative to achieve this requirement that is explained below. Using MDM Java API You can achieve your requirement using some custom work.

    As per your scenario, you are maintaining two main tables (e.g. Main_Table_A and Main_Table_B) and you want to fetch the data from both the table using some common search conditaions. As per the provided MDM Java functionalities, you cannot perform search on Lookup [Main Field].

    To achieve it, you will have to maintain a common field in both the main tables e.g. Main_Table_A has fields a, b, c, d and Main_Table_B has a, e, f, g fields, where a is a common field in both the tables. As per my understanding your requirement is like this, you want to fetch the data of a, c, d, f, & g fields from Main_Table_A and Main_Table_B.

    Steps:

    1. Search the data from first main table on the basis of common fields and your desired search criteria and store it into a result-set object.

    2. Search the data from second main table on the basis of common fields and your desired search criteria and store it into another result-set object.

    3. Now, you can retrieve your selected fieldsu2019 data from these searched result-sets and display it on the portal. This is how you can achieve your requirement.

    I know, this is little bit lengthy and tricky way but this is how you can achieve your requirement using MDM Java API.

    Thanks/ -Tarun

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Apr 27, 2010 at 12:34 PM

    Hi,

    I was going through MDM 7.1 Java API guide. On page no 77, I found statement that "Searching on Lookup Main fields is not supported." in the limitations section of Lookup Main Field. Based on this, I doubt if your requirement can be acheived.

    Please check MDM 7.1 java API guide using [this link.|http://help.sap.com/saphelp_nwmdm71/helpdata/en/72/d36e1ed3ce43028adc851b8fed5668/MDM_Java_Net_API_Guide.pdf]

    Also wait for some comments from experts.

    Regards,

    Shiv

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 27, 2010 at 02:52 PM

    Hi KN,

    MDM does not support this functionality of searching MDM LookUp Main fields.

    Regards,

    Mandeep Saini

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 03, 2010 at 07:03 AM

    Hi KN,

    Did you get success in dig up any other alternative for your scenario or let me know if you tried the suggested solution?

    Thanks/ -Tarun

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 20, 2011 at 02:36 PM

    Searched common fields in both tables to link the related records and show on UI.

    Add a comment
    10|10000 characters needed characters exceeded

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.