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

Comparing data from 2 tables

Hi All,

This is a JDBC-Prooxy scenario. I used a JDBC sender adapter to pick records from the table and used a proxy to to pass the data to R/3 and called a fuction module in R/3. The scenario worked fine as expected.

Now the problem is there is another table in the database which contains the history. Now I need to compare the records in 2 tables and pass the data to R/3 if a record does not exist in second table(This can be done by a select querry), but if a record exists I need to check for "amount" field again. If the amount in history file is lesser, the record has to be passed with the amount(difference between the first table and history table). If the amount is also same, I should not send the record to R/3.

How can I achieve this? Where can I do these comparisons and pass the data to R/3?

Thanks in Advance.

Regards,

Jai Shankar.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Sep 07, 2006 at 06:06 AM

    Jai,

    The solution would like this,

    1. Receive -- To select data from Table 1

    2. Send Synch -- To select data from table 2 ( refer my blog )

    3. Transforamtion ( n:1 ) -- combine the data from step 1 and step 2 and do the mappinng . Set some field to determine if the IDOC should be sent or not.

    4. Switch -- Check for the data and then send the IDOC if needed else terminate the BPM anbd process flow.

    Regards,

    Bhavesh

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 07, 2006 at 06:01 AM

    Jai,

    You need a BPM and you need to select the data from the DB for the history table and then do a mapping and determine whether IDOC is to be sent out or not.

    /people/bhavesh.kantilal/blog/2006/07/03/jdbc-receiver-adapter--synchronous-select-150-step-by-step

    Regards,

    Bhavesh

    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.