cancel
Showing results for 
Search instead for 
Did you mean: 

MS SQL Server Stored Procedure - JDBC Receiver Adapter

Former Member
0 Kudos

Hi,

I am calling a stored procedure in MS SQL Server using the JDBC Receiver Adapter. The stored procedure takes 1 input parameter which is a VARCHAR field. The stored procedure's input parameter and the input parameter are identical. My target structure looks like:-

<STATEMENT>

<storedProcedureName action="EXECUTE">

<TABLE>SP_REPROCESS</TABLE>

<input1 isInput="true" type="VARCHAR">1</input1>

</storedProcedureName>

</STATEMENT>

I am getting the following error:-

Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'SP_REPROCESS' (structure 'STATEMENT'): com.microsoft.sqlserver.jdbc.SQLServerException: String or binary data would be truncated.

Any suggestions.

Thanks.

Krishnan

Edited by: Krishnan on Jul 17, 2008 7:07 AM

Edited by: Krishnan on Jul 17, 2008 7:07 AM

Edited by: Krishnan on Jul 17, 2008 7:48 AM

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

I have recieved the following error in the receiver channel.Could some one please advice how to solve this?

I am unable to find which filed is getting truncated.

Unable to execute statement for table or stored procedure. 'sap_xi_of' (Structure 'Statement') due to java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]String or binary data would be truncated.

"Delivery of the message to the application using connection JDBC_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'sap_xi_of' (structure 'Statement'): java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]String or binary data would be truncated.."

Regards,

Prem

Former Member
0 Kudos

I have recieved the following error in the receiver channel.Could some one please advice how to solve this?

I am unable to find which filed is getting truncated.

Unable to execute statement for table or stored procedure. 'sap_xi_of' (Structure 'Statement') due to java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]String or binary data would be truncated.

"Delivery of the message to the application using connection JDBC_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'sap_xi_of' (structure 'Statement'): java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]String or binary data would be truncated.."

Regards,

Prem

Former Member
0 Kudos

hi,

can anyone help me to fix this issue.

In MONI, i am able to see the output xml as :-

<?xml version="1.0" encoding="UTF-8"?>

<ns0:REPROCESS_DATA_MT xmlns:ns0="http://abc.com/db/integration">

<STATEMENT>

<storedProcedureName action="EXECUTE">

<TABLE>SP_REPROCESS</TABLE>

<input1 isInput="true" type="VARCHAR">1</input1>

</storedProcedureName>

</STATEMENT>

</ns0:REPROCESS_DATA_MT>

in the communication channel monitoring --> in the JDBC receiver channel, I am getting the following error:-

Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'SP_REPROCESS' (structure 'STATEMENT'): com.microsoft.sqlserver.jdbc.SQLServerException: String or binary data would be truncated.

thanks.

krishnan

Former Member
0 Kudos

Use <table> instead of <TABLE>

Thanks

Farooq

Former Member
0 Kudos

Also check the length of the variable (both side) : as per the Error "String or binary data would be truncated"

Thanks

farooq

Former Member
0 Kudos

hi farooq,

i tried to chang it to <table> but no luck. Same error.

any other idea.

thanks.

Krishnan

Former Member
0 Kudos

hi farooq,

i am passing just '1'.

thanks.

krishnan

Former Member
0 Kudos

Did you tested the stored procedure in the target database? is it working fine for this test value?

Thanks

Farooq.

Former Member
0 Kudos

hi farooq,

yes, we tested the stored procedure in the database and it works fine.

thanks.

krishnan