cancel
Showing results for 
Search instead for 
Did you mean: 

Error IN JDBC Receiver Adapter

Former Member
0 Kudos

Dear All,

I am working on JDBC Receiver adapter Scenario.

I am getting the error in RWB

Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. '' (structure 'Statement'): com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near the keyword 'WHERE'.

Please suggest

Best Regards

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Manish,

The problem is your query/stored procedure.

If you are working in Stored procedure, try to execute in Database itself.

If you are using query

Send your query what you wrote.

Thank you so much.

Former Member
0 Kudos

Hi Satish,

I got the where statement problem solved but still I am getting the error

Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'Z_SAP_ProjectBW_Temp' (structure 'Statement'): com.microsoft.sqlserver.jdbc.SQLServerException: Cannot insert the value NULL into column 'SAP_ProjectID', table 'BPV.dbo.Z_SAP_ProjectBW_Temp'; column does not allow nulls. INSERT fails.

In my table SAP_ProjectID is the primary key.

Best Regards

former_member200962
Active Contributor
0 Kudos
Cannot insert the value NULL into column 'SAP_ProjectID'

SAP_ProjectID deos not seem to have a vlaue in the payload that you are sending.

How did you resolve the earlier error?

Former Member
0 Kudos

Hi Abishek,

I solved the error by refershing the cache the changes ,which I did for mapping was not getting the reflected.

I have checked the payload already the values are there in payload in CCMonitoring payload.

Do I need to check anywhere else?

Best Regards

Former Member
0 Kudos

Hi Manish,

the another error comes from field called "'SAP_ProjectID' this filed it doesn't allows the null values.

Because Database side this field have set it for "not null". So we can't able to send the null value to this filed.

Either you change the database side or you can send the value to field allways.

Thank you very much.

Sateeesh

Former Member
0 Kudos

Hi Saatesh,

I have created the one table with allowing null then I am able insert the data into the table.

But In my case I have primary key in table where we cannot allow null there.

Can you please suggets me how to use INSERT statement in mapping so that I can insert data with primary key.

I took the ref from help

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

which says we can not use key element with INSERT Statement

Best Regards

Edited by: Manish22 on Jul 7, 2010 11:25 AM

former_member200962
Active Contributor
0 Kudos
which says we can not use key element with INSERT Statement 😞

Why would an INSERT statement need a key? key is used when you want to have condition (like for UPDATE/ DELETE).....howevere for INSERT we dont create a statement with condition for INSERT....just understand what is the need of key and what does an INSERT do.....that will answer your question on how to use a key in INSERT

Regards,

Abhishek.

Former Member
0 Kudos

Please make sure that your target structure should be in the format given below in the weblink.

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

I hope this helps you to fix...

former_member200962
Active Contributor
0 Kudos
Incorrect syntax near the keyword 'WHERE'.

Check how you have written the statement for where....check if you have included any unwanted syntax/ symbol/ character.

Former Member
0 Kudos

Hi Abhishek Hi Raj,

I am not using jdbc adapter at sender side so do I need the where statement?

I am using jdbc at receiver side only.

Best Regards

rajasekhar_reddy14
Active Contributor
0 Kudos

do you formed query /statement properly in Message Mapping,check what you have mapped in Action.

former_member200962
Active Contributor
0 Kudos
I am not using jdbc adapter at sender side so do I need the where statement?

WHERE is used for receiver also.....SELECT, UPDATE, DELETE ..... is possible check the SQL statement that is being generated in the JDBC channel.....logSQLstatement = true.

Former Member
0 Kudos

Hi Raj,

I have mapped Constant (with INSERT) to action in my mapping.

Best Regards

Former Member
0 Kudos

Check your Target structure... your structure should be as mentioned in the below link..

http://help.sap.com/saphelp_srm40/helpdata/ru/2e/96fd3f2d14e869e10000000a155106/content.htm

Regards

Ramg

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi,

The statement or Procedure what you have written is not valid , check your statement once,this is the issue.

Regards,

Raj