cancel
Showing results for 
Search instead for 
Did you mean: 

How to post data multiple tables with JDBC adapter

Former Member
0 Kudos

Hi,

Working on a scenario with IDOC -> XI -> JDBC. Have to post idocs in multiple tables simultaneously. Should it be done through a stored procedure and what will be the structure of DT for (XML SQL FORMAT) Can any one guide to any blog or solution how to go about this.

thanks in advance.

Cheers,

Raj.

Accepted Solutions (1)

Accepted Solutions (1)

justin_santhanam
Active Contributor
0 Kudos

Rajesh,

The best solution is as Bhavesh suggested duplicate the STATEMENT tag in the target. Hence now each Segment corresponds to one of the table in target DB.

Please refer the target structure in the below url,

http://www.flickr.com/photo_zoom.gne?id=549186611&size=o

There I've given statement only once. In your case if you want to update 5 tables then right click on the statement node and click duplicate subtree for 5 times.

Please consider the above URL only if you are going to create SQL Query string using UDF. So please ignore if you don't want to do like that. Instead create the below structure

<StatementName2>

<dbTableName action=”INSERT”>

<table>realDbTableName</table>

<access>

<col1>val1</col1>

<col2>val2</col2>

</access>

</dbTableName>

</StatementName2>

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

Best regards,

raj.

Former Member
0 Kudos

<b>Thanks</b> for the answ guys. If there is any other way to do it keep posting.

cheers,

*Raj*

Answers (3)

Answers (3)

Former Member
0 Kudos

Is there any blog where it is shown how to duplicate it or the steps to follow. It would also be helpful and appreciated if someone posts entire scenario for multiple tables as it is real time scenario in most of the cases.

bhavesh_kantilal
Active Contributor
0 Kudos

Why do you need a blog for this?

Read our answers and give things a shot. They are simple as they sound. Just as you create a STATEMENT tag for a single table for the JDBC , here you will create multiple STATEMENT level tags.

Regards

Bhavesh

justin_santhanam
Active Contributor
0 Kudos

Ok,

Refer the blog :/people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30

Right click on the statement node and click duplicate as many times u want, thats it.

Best regards,

raj.

Former Member
0 Kudos

Yeap Bhavesh i got the sol n even posted it successfully.Itz only for reference for others.

bhavesh_kantilal
Active Contributor
0 Kudos

Rajesh,

Post a wiki for it if you are intested.

The point is, if you start posting blogs for such simple topics, then you wil have millions of blogs in XI. The whole ppint of Blogs on SDN is to publish something new.

Regards

Bhavesh

Former Member
0 Kudos

Hi Rajesh,

Create multiple JDBC adapter receivers.

If you have a stored procedure in DB you can use it.

/people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30

Regards

harsha

bhavesh_kantilal
Active Contributor
0 Kudos

Rajesh,

In the output XML, create multiple STATEMENT Level tags, one for each table and the appropriate access level tags

Regards

Bhavesh