on 08-12-2008 1:11 PM
Hi friends,
I am doing an IDoc to JDBC scenario.can you please tell me how I can insert more than one record using a single connection.
regards
Debansu
Thanks to all,problem has been resolved.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is the Typ-Definition of InsertStmt for insert into tab1 (col1, col2)
InsertStmt comlex type
InsertStatment Element occurs 1
tab1 Element occurs 1
action Attribute occurs 1 default "INSERT"
table Element occurs 1
access Element occurs 1 .. unbound
col1 Element occurs 1
col2 Element occurs 1
InsertStatement_response Elemment occurs 0..1
insert_count Element occurs 1
the InsertStatement_response part will be filled when JDBC returns.
Edited by: Dieter Glauß on Aug 12, 2008 2:45 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dieter,
Thanks for the help.The problem has been solved.Just wanted to point out two things:
Action is an attribute which can take two values i.e optional or required
During mapping of Access with corresponding segment of IDoc,we have to do a remove context.
regards
Debansu
Edited by: Debansu Sarkar on Aug 12, 2008 8:19 PM
Hi,
Please tell me how to do the mapping.I have made the occurence of 'statementname' as 1..unbounded.Still it is not working.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
sarkar then use the following format :
<StatementName1>
<dbTableName action=u201DINSERTu201D>
<table>realDbTableName</table>
<access>
<col1>val1</col1>
<col2>val2</col2>
</access>
<access>
<col1>val11</col1>
</access>
</dbTableName>
</StatementName1>
<StatementName2>
<dbTableName action=u201DINSERTu201D>
<table>realDbTableName</table>
<access>
<col1>val1</col1>
<col2>val2</col2>
</access>
<access>
<col1>val11</col1>
</access>
</dbTableName>
</StatementName2>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
U can use multiple statement nodes as mentioned here
http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/frameset.htm
Regards,
Prateek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
sample
insert into tab1 (col1, col2) values ('val1-1','val1-2')
insert into tab1 (col1, col2) values ('val2-1','val2-2')
insert into tab1 (col1, col2) values ('val3-1','val3-2')
<ns0:InsertStmt xmlns:ns0="http://xyz.com/insert">
<InsertStatement>
<TAB1 action="INSERT">
<table>tab1</table>
<access>
<col1>val1-1</col1>
<col2>val1-2</col2>
</access>
<access>
<col1>val2-1</col1>
<col2>val2-2</col2>
</access>
<access>
<col1>val3-1</col1>
<col2>val3-2</col2>
</access>
</TAB1>
</InsertStatement>
</ns0:InsertStmt>
Regards Dieter
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.