cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC Sender Multiple Selects

former_member187533
Participant
0 Kudos

Good day.

I need the following, I need a jdbc interface, which run more than oneselect in the same data type in different tables, and I return to bank information for an abap proxy.

I am in doubt, I use a cc jdbc receiver correct? Anyone have any examples of this solution?

Thank you.

Accepted Solutions (1)

Accepted Solutions (1)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

If you have few selects from different tables but of same database, you might also want to think about select joins and use the query in the channel itself.  This way you can avoid using Stored procedure. But if you query is complex then the better approach is using SP.

Refer this link

http://www.w3schools.com/sql/sql_join_full.asp

SELECT column_name(s)

FROM table_name1

FULL JOIN table_name2

ON table_name1.column_name=table_name2.column_name

Hope that helps

former_member187533
Participant
0 Kudos

Hi!

The problem with using join, is that the tables are the header and items, so we have a very large duplication of records ... Do you thinka procedure, I can pass a parameter and return all information in a single structure?


Former Member
0 Kudos

Hi, Lucas

I have solved the same problem (several tables, high volume, duplication of fields) using an stored procedure returning a result in  XML format  (in my case, sqlserver, with XML PATH clause) .

Regards,

Carme.

baskar_gopalakrishnan2
Active Contributor
0 Kudos

> Do you think a procedure, I can pass a parameter and return all information in a single structure?

Yes, go with JDBC Receiver and use stored procedure. Refer SAP Help Document for creating target structure.

Former Member
0 Kudos

Hi,

Yes, sure, you can pass parameters.

Here you are an example :

http://scn.sap.com/people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures

Your target message must have the format:

<StatementName>  

    <storedProcedureName action=” EXECUTE”>

       <table>realStoredProcedureeName</table>

        <param1 [isInput=”true”] [isOutput=true] type=SQLDatatype>val1</param1>

    </storedProcedureName > 

  </StatementName>

See this:

http://help.sap.com/saphelp_nwpi711/helpdata/en/43/9519abb1146353e10000000a11466f/frameset.htm

REgards,

Carme

Answers (2)

Answers (2)

Former Member
0 Kudos

pls refer below threads might be it's helpful for ur prob:

http://scn.sap.com/thread/1679808

http://scn.sap.com/thread/1925827

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

you know that you can run stored procedures right ? (on sender and receiver JDBC adapter)

so you can have as many select statements as you need

Would that work for you ?

Regards,

Michal Krawczyk

former_member187533
Participant
0 Kudos

Hi,

I know of a functioning procedures, but I have a question about it.
Must be a JDBC Receiver as it will not run for polling, but by theactivation ecc.
Another important thing I need to pass as parameterto the procedure, a field.
How would the data structure in this situation? How would this parameter?