Question

Is there any chance to execute an inner join select over RFC on some(in this case 2) database tables?

Basically, I wanna translate this command into something that works with RFC.

SELECT DISTINCT t2~field
    FROM table1 AS t1
    INNER JOIN table2 AS t2
    ON t1~id = t2~id
    INTO TABLE lt
    WHERE (lv_where).

I am aware of RFC_READ_TABLE. The only problem is that it can only read from one table. I could also read from both tables and merge them together and check my stuff, but I wanna prevent that.

Was it helpful?

Solution

It's a good idea not to perform the join operation manually. The easiest way to do this would be to create your own function module that performs exactly the selection you need. It's not hard, just give it a try. If this is not an option, you could try to get someone assemble a database view and use that in your call to RFC_READ_TABLE. There might be other module-specific querying options that I'm not aware of.

OTHER TIPS

We've developed a function module which can do the joins. Its a custom FM where you can pass the fields, join conditions and it will create the join and store the results in file which can be used for later processing.

If you're interested check: www.plsapconnector.com

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top