cancel
Showing results for 
Search instead for 
Did you mean: 

to insert mutiple records using SQL_DML

Former Member
0 Kudos

Hi Experts,

I am using SQL_DML statement while inserting the data into table it is taking only one row of data

there are mutilple records but only one record is inserted

what could be the reason

pls do provide inputs

Thanx&Regards

Sampath

Accepted Solutions (1)

Accepted Solutions (1)

dharamveer_gaur2
Active Contributor
0 Kudos

Check in Message Mapping your Target Message Type is 0...unbounded.

and Map source

Row Node (Element that repeating in every row) to Target Message Type Node (0.....unbound).

Now test your Mapping using duplicate Row Node

Answers (3)

Answers (3)

former_member194786
Active Contributor
0 Kudos

Hi Venkata,

Use the structure below to create ur target.

<StatementName>

<dbTableName action=u201DINSERTu201D>

<table>realDbTableName</table>

<access>

<col1>val1</col1>

<col2>val2</col2>

</access>

<access>

<col1>val11</col1>

</access>

</dbTableName>

</StatementName2>

Also make sure that you have mapped ur row field from source to the Statement field of the target. Thus a new statement will be created for each row field of ur input. And thus multiple insertion.

Regards,

Sanjeev.

Former Member
0 Kudos

Hi Sampath,

You need to map the Source node which generates the Record to Target Message Type.

Test the Mapping in the Message Mapping.

At runtime you can find the genereated sql statements by doing configuraitons in Receiver JDBC adapter.

In the JDBC Receiver adapter you have the Advanced Properties .

Over there enter the following

left column logSQLStatement

right column true

To see the query created ..

Login to adapter monitoring ..select the relevant jdbc adapter.

Now when any message is processed by the jdbc adapter in adapter monitoring at that time you will see a message link. When you click on that link a new window will open. In that window if you click on page down you will get to see the sql statement generated by the jdbc adapter.

Regards

Goli Sridhar

Former Member
0 Kudos

Hi Venkata,

Check the structure from here:

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

If your stmnt node is unbounded that will do...

Also check into message mapping if the target structure is having multiple queries or not.

Regards