cancel
Showing results for 
Search instead for 
Did you mean: 

Adding data to multiple tables in jdbc receiver adapter

Former Member
0 Kudos

Hi All,

Can anyone please help me with the way to add/ update data to multiple tables for jdbc receiver adapter in PI 7.11 ?

Will the sql query with joint will be fine or the stored procedure is required ?

Please provide some inputs. If there are existing examples for same, it would really be a great help.

Thanks,

Vineet

Accepted Solutions (1)

Accepted Solutions (1)

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi Vineet,

you dont required any Stored procedure/SQL Query in receiver JDBC adapter scenarios, you have to create structure (Search in sdn) you will find ton of documents.

you can insert/delet/update data in to multiple tables at a time.

i think you have not done any JDBC scenario...serch in sdn..

Regards,

Raj

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Guys,

Thanks for the replies and suggestions.

Regards,

Vineet

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Hi Vineet,

>>Will the sql query with joint will be fine or the stored procedure is required ?

If your requirement is to use many tables and need to pull many fields of those tables , then use SQL Query with Join. otherwise you can use simple insert, delete, update statements.

>>Please provide some inputs. If there are existing examples for same, it would really be a great help.

Please refert this link for using insert statement data types on the target side.

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

Sample data type

<StatementName1>

<dbTableName action=u201DINSERTu201D>

<table>tablename1</table>

<access>

<col1>val1</col1>

<col2>val2</col2>

</access>

<access>

<col1>val11</col1>

</access>

</StatementName1>

<StatementName2>

</dbTableName>

<dbTableName action=u201DINSERTu201D>

<table>tablename2</table>

<access>

<col1>val1</col1>

<col2>val2</col2>

</access>

<access>

<col1>val11</col1>

</access>

</dbTableName>

</StatementName2>

Former Member
0 Kudos

Hi Vineet,

There is no difference for Insert the data into mulitple tables in XI 3.0 ,PI 7.0 & 7.1.

You just take the in your target datatype add two statement Structures. Each statement Structure assign to each table

for ex:

in your target Database type:

<StatementName1>

--<dbTableName action=u201DINSERTu201D>

-<table>--


assingn to table1

---<access>

-


<col1>val1</col1>

-


<col2>val2</col2>

---</access>

</StatementName1>

<StatementName2>

--<dbTableName action=u201DINSERTu201D>

-<table>--


assign to table2

---<access>

-


<col1>val1</col1>

-


<col2>val2</col2>

---</access>

</StatementName1>

For your reference please follow the below link.

http://help.sap.com/saphelp_nw04/helpdata/en/4d/8c103e05df2e4b95cbcc68fed61705/frameset.htm

Best Regard's

Sateesh

Former Member
0 Kudos

Hi Vineet,

You can write multiple INSERT statements (one each for different table) and handle your scenario.

In case if the tables are dependent or you require a special handling, you can go for a stored procedure.

But for simple insert to different tables, i would suggest you to write multiple INSERT statements through your Data type.

Please take a look at the following link:

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

I hope this helps.

Regards, Gaurav.