cancel
Showing results for 
Search instead for 
Did you mean: 

IDOC to JDBC error

Former Member
0 Kudos

Dear All,

I am getting error while doing an interface of IDOC to JDBC scenario.

Please find below the structure and correct if I am doing anything wrong,

I have two PK defined in the table, am i wrong in defning the structure.

Thanks,

--Sai

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Plz chk the blow links.>>>>>>>>>

Document Formats for the Receiver JDBC Adapter  :

Document Formats for the Receiver JDBC Adapter (SAP Library - SAP NetWeaver Exchange Infrastructure)

Configuring the Sender JDBC Adapter  :

https://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm

..............

Mutti

Former Member
0 Kudos

Hi Sai,

I see in the database you defined keys. Please add those key fields to your structure. Please see my attached screenshot.

Regards,

Jannus Botha

Former Member
0 Kudos

Dear Jannus,

Do I need to define this key fields in both access and key structure?

or

field declaration under Key is enough?

Thanks,

--Sai

Former Member
0 Kudos

Hi Sai,

Under both.

Regards,

Jannus Botha

Former Member
0 Kudos

Dear Jannus,

I am facing issues while seeing the message in SXMB_MONI

I couldn't see payload under the Response, and throwing error at the receiver adapter as below:

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. 'EMP_EXPERIENCE' (structure 'Statement'): com.microsoft.sqlserver.jdbc.SQLServerException: Cannot insert the value NULL into column 'STEXT_S', table 'db_hrm.dbo.EMP_EXPERIENCE'; column does not allow nulls. INSERT fails.


Here my table name is EMP_EXPERIENCE, and in my data structure do i need to define any where

I am new to JDBC scenario -- May be this is basic question 4 you


Thanks,

--Sai

Former Member
0 Kudos

Hi

The error is occurred because you sending null value for the field 'STEXT_S'.

Please correct the data and then resent. The problem will be solved.

If the data is correct, then you have to change the table definition in database to include NULL values.

Former Member
0 Kudos

Hi Sai,

You are sending a null(blank value) to the mandatory field.

Please give that field a value and try again.

Regards,

Jannus Botha

Former Member
0 Kudos

You are absolutely right, I am sending wrong date format, now

I corrected the data, but getting an another 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. 'EMP_EXPERIENCE' (structure 'Statement'): com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near 'HR'.


When i check the data base I see the table present with EMP_Experience , could you please let meknow how to drill down further..


Do we need to map anything for Statement & dbTablename?


Thanks,

--Sai

Former Member
0 Kudos

Hi Sai,

dbTableName does not need to be mapped.

You need to mapping your source node to Statement? So it will be the node that appears multiple times on the source?

If you test the mapping what is the output?

Regards,

Jannus Botha

Former Member
0 Kudos

Dear Jannus,

please find the below snap shots of how i mapped

and for the access i did mappping as below:

Am I doing anything wrong in Mapping? dont know i am no where using HR term but throwing error as :

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. 'EMP_EXPERIENCE' (structure 'Statement'): com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near 'HR'.

Thanks,

--Sai

ambrish_mishra
Active Contributor
0 Kudos

Hi,

Take help from database team and try to update the data through the SP directly in the database. It seems like a data issue.

Alternatively, use the SQL trace parameter to check the SQL being triggered in PI to database.

Hope it helps!

Ambrish

Former Member
0 Kudos

Hi Ambrish,

I tried to insert the data directly in the database, it's allowing but when I try to post the data from the PI server I am unable to post it.

Am I doing anything wrong in mapping or defining structure. Still when I connect the db-team they have given admin access to the user which I am using, but I am facing the same issue as


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. 'EMP_EXPERIENCE' (structure 'Statement'): com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near 'HR'.

So, where should i see to fix such parser errors & let me know where to check logs to see this issue.

Thanks,

--Kishore