cancel
Showing results for 
Search instead for 
Did you mean: 

Insert Statement - JDBC Adapter

Former Member
0 Kudos

Is there any way we can know the actual INSERT statement that is sent to the external database when you are using JDBC Receiver Adapter?

Accepted Solutions (0)

Answers (3)

Answers (3)

moorthy
Active Contributor
0 Kudos

Hi Michael,

Just look into this blog also~.

/people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30

For more-

http://help.sap.com/saphelp_nw2004s/helpdata/en/22/b4d13b633f7748b4d34f3191529946/frameset.htm

Hope this helps,

Regards,

Moorthy

udo_martens
Active Contributor
0 Kudos

Hi Michael,

have a look to SAP Library: Document Formats for the Receiver JDBC Adapter .

In the middle there is an example:

 
  <StatementName2>

<dbTableName action=”INSERT”>

<table>realDbTableName</table>

<access>

<col1>val1</col1>

<col2>val2</col2>

</access>

<access>

<col1>val11</col1>

</access>

</dbTableName>  

  </StatementName2>

+

action=INSERT

Statements with this action cause table values to be inserted. Therefore, the statement corresponds to an SQL INSERT statement.

The element.

The corresponding SQL statement for StatementName2 in the example above is as follows:

INSERT INTO dbTableName (col1, col2) VALUES(‘val1’, ‘val2’)

INSERT INTO dbTableName (col1) VALUES(‘val11’)

+

So you have to look to your SXMB_MONI monitoring and to translate for yourself into SQL..

Regards,

Udo

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Michael,

The data filled up by your JDBC adapter is converted into the corresponding SQL statement by XI .

Eg:

<statement>

<table action= insert>

<tabelname> xyz </tablename>

<access>

<col1> abc</col1>

<col2>def </col2>

</access>

</table>

</statement>

This is converted internally into

insert into xyz(col1,col2) values('abc','def')

Regards,

Bhavesh

Regards,

Bhavesh

Former Member
0 Kudos

I could make it work. That is not the problem. To debug it would be helpful to see the actual insert statement. The only help you have now is to see the Adapter Monitor. You might get errors like inserted value too large for column and do not know which column.

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Michael,

As you told it yourself, the only help now, is to go to RWB and find the SQL exception raised and debug using it.

I am not aware of any other way. We will have to formulate the SQL query manually using the data being passed from the JDBC adapter.

Regards,

bhavesh