cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC (from 2 tables) to RFC

former_member373665
Participant
0 Kudos

hi,

i need help please!,

i'm trying to do a asyncronoUs scenary with two adpater: JDBC to RFC. I have to get data from two tables in SQL (jdbc) and later, call a RFC witht two structures  like parameters.

but i have a problem. When the communication channel is sender, y can add only one statement sql AND I NEED TO ADD ONE STATEMENT FOR EACH TABLE

Do you konw how can i do it?

attached picture sender

thanks.

Accepted Solutions (0)

Answers (2)

Answers (2)

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi Marino,

the best way to handle this requirement is ask DB team to create one more table and it should hold two table values, they can very easily do it .

Use sender channel to poll new table, this give more stability .

other wise use Joins.

Regards,

Raj

former_member373665
Participant
0 Kudos

HI,

when you have said this:

..the best way to handle this requirement is ask DB team to create one more table and it should hold two table values, they can very easily do it ...

i have done this stored procedure in SQL where it returns two tables:

--------------------------stored procedure--------------------------------------

USE [DDBB]

GO

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

ALTER PROCEDURE [dbo].[test]

   

AS

BEGIN

    SELECT * from dbo.TEST_PI1

    SELECT * from dbo.TEST_PI2

END

-----------------------------stored procedure-----------------------------------

then, in comunications channel, in the field "Query SQL Statement",  i add this code:

-----------------------------call stored procedure-----------------------------------

EXECUTE dbo.test

-----------------------------call stored procedure-----------------------------------

but returns a single table, which belongs to the sql "SELECT * from dbo.TEST_PI1". The other SQL returns nothing.


(certainly, i see the content in the payload)


Former Member
0 Kudos

as per my knowledge, you have to create 2 communication channels for 2 tables because read data from 2 diff tables.

former_member373665
Participant
0 Kudos

ok, I will try to explain better my example:

Adpater Sender JDBC. I have to read from these tables:

     - Table1

     - Table2

Adpater Receiver RFC. I have to make a call to the function ONLY ONCE  filled with the two structures

     - RFC

               Parametre1: Table1

               Parametre2: Table2

thanks.

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>but i have a problem. When the communication channel is sender, y can add only one statement sql AND I NEED TO ADD ONE STATEMENT FOR EACH TABLE

If you are using jdbc sender then why don't you create join statement to retrieve data from two tables and place the query in the select statement of the channel itself?