Skip to Content
avatar image
Former Member

How to post data multiple tables with JDBC adapter

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.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Best Answer
    Jun 29, 2007 at 03:24 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 29, 2007 at 03:18 AM

    Rajesh,

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

    Regards

    Bhavesh

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 29, 2007 at 03:20 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 29, 2007 at 03:34 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • 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