cancel
Showing results for 
Search instead for 
Did you mean: 

SOAP to JDBC Sync

Former Member
0 Kudos

Hi,

My scenario is SOAP to JDBC sync.

we need to sending employe ID as a request from the web service, based on the employe id we need to populate(with Select statement) the data from two different tables one is header and another one is item table. How can i achieve this requirement? I have seen couple of blogs which is discussing about JDBC receiver as a sync with one table with select statement. But my requirement is need to get the response from more than one table with select command.

Thanks,

Sateesh

Accepted Solutions (0)

Answers (4)

Answers (4)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

if you dont want to do stored procedure then another possible way is using below structure

<StatementName>

<anyName action=u201D SQL_QUERYu201Du201D>

<access>SQL-String with optional placeholder(s)</access>

<key>

  <placeholder1>value1</placeholder1>

  <placeholder2>value2<placeholder2>     

</key>

 </anyName >  

  </StatementName>

This is easier too. Just place your code that join two tables as query here. Use placeholders for passing values.

refer this sap help link:

http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm

former_member181985
Active Contributor
0 Kudos

I hope this should be possible without a stored procedure. please check the link for JDBC receiver formats for more details

http://help.sap.com/saphelp_nw2004s/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm

Try with below sample structure for JDBC receiver.

<MT>
	<StatementNameHEADER>
		<dbTableName action="SELECT">
			<table>HeaderTableName</table>
			<access>
			...
			</access>
			<key1>
			....
			</key1>
		</dbTableName> 
	</StatementNameHEADER>
	<StatementNameITEM>
		<dbTableName action="SELECT">
			<table>ItemTableName</table>
			<access>
			...
			</access>
			<key1>
			....
			</key1>
		</dbTableName> 
	</StatementNameITEM>
</MT>

Also check my blog for easy testing of such scenarios without design part.

- Praveen Gujjeti

Edited by: Praveen Gujjeti on Oct 27, 2011 11:51 PM

Former Member
0 Kudos

Hi Satish,

When you get involved in more than 1 table for any JDBC scenario,stored procedure is the best way to achieve it.

Regards

Krish

Shabarish_Nair
Active Contributor
0 Kudos

one of the easiest ways is to write a stored procedure and call the same in your JDBC receiver

Former Member
0 Kudos

I agree with Shabarish,

The esiest & best performance way is probably StoredProcedure called from receiver channel.

Another way is a JDBC Lookup, or something similar, but my suggestion is to use the StoredProcedure approach.