Skip to Content
author's profile photo
Former Member

Insert in Multiple Tables ReceiverJDBC in sequence

Hello Experts,

I have an interface in which i need to insert into 4 tables, i know that is possible using receiver JDBC with multiple statement but My requirement is that data should be inserted in sequence.

Table1 then table2 then tab3 and tab4 as they have constraints.

I know that it can be achieved by using Stored Procedure, or having a staging table and then some other SP inserting data in sequence after reading staging table.

Is there any other way to achieve it ? (NO BPM). Any new functionality to achieve that in PI 7.11 ?

Regards

Inder

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Posted on May 03, 2011 at 01:56 AM

    Since you are going to insert data into 4 tables in a sequence one after another , I see three options.

    You already mentioned 2 options 1) Stored procedure and 2) creating 4 statement data structure (one for each table)

    The third option is writing a SQL with join for the 4 tables and use action command = SQL_DML. Example as follows....

    Write SQL code and place it in access tag. Pass values for the columns using key tag...

    <stmt>
    
        <Customers action="SQL_DML">
    
          <access> UPDATE Customers SET CompanyName=u2019$NAME$u2019, Address=u2019$ADDRESS$' WHERE CustomerID='$KEYFIELD$u2019
    
          </access>
    
          <key>
    
            <NAME>name</NAME>
    
            <ADDRESS>address </ADDRESS>
    
            <KEYFIELD>100</KEYFIELD>
    
          </key>
    
        </Customers>
    
      </stmt>

    Refer this [link|http://help.sap.com/saphelp_nwpi71/helpdata/en/44/7b7855fde93673e10000000a114a6b/content.htm]...

    Hope this helps ....

    Add comment
    10|10000 characters needed characters exceeded