cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC Receiver Communication Channel error: Cannot insert the value NULL into column

Former Member
0 Kudos

Hi,



I am getting the following error in receiver jdbc communication channel:-



Unable to execute statement for table or stored procedure. 'SCMSalesGRFromSAP' (Structure 'Details') due to com.microsoft.sqlserver.jdbc.SQLServerException: Cannot insert the value NULL into column 'ZEILE', table 'SAPMASTERDB.dbo.SCMSalesGRFromSAP'; column does not allow nulls. INSERT fails.



JDBC message processing failed; reason Error processing request in sax parser: Error when executing statement for table/stored proc. 'SCMSalesGRFromSAP' (structure 'Details'): com.microsoft.sqlserver.jdbc.SQLServerException: Cannot insert the value NULL into column 'ZEILE', table 'SAPMASTERDB.dbo.SCMSalesGRFromSAP'; column does not allow nulls. INSERT fails.


MP: exception caught with cause com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'SCMSalesGRFromSAP' (structure 'Details'): com.microsoft.sqlserver.jdbc.SQLServerException: Cannot insert the value NULL into column 'ZEILE', table 'SAPMASTERDB.dbo.SCMSalesGRFromSAP'; column does not allow nulls. INSERT fails

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

As ZEILE is a primary key value in db. We need to add this field in access and map. Once, done check whether any restriction are there or not for the particular field in Database Table.

access

...........ZEILE

   Key

............ZEILE

Finally, resolved. Thanks for supporting

Answers (2)

Answers (2)

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Ram,

In you receiver channel configuration, please  maintain the Interpretation of Empty string as EMPTY instead of NULL.

Please try this and let me know the outcome.

Regards

Vishnu

Former Member
0 Kudos

Actually, ZEILE is a primary key field in SQL.. While generating idoc from ecc, we are passing "2232" value.


I have mapped like this:


ZEILE--> mapwithdefault--> ZEILE



pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Ram,

Can you check what is the value that is getting populated in target field ZEILE for the failed message instance.

Since this field is a primary key, the database server might not allow empty or null values.

Please check with the database team whether is it fine with them if ZEILE field contains Empty value or not.

Regards

Vishnu.

Former Member
0 Kudos

Actually, this is in development stage..ZEILE is a mandatory field and its a primary key.

I have discussed with the DB team that this ZEILE filed cannot be empty..But, if it require that for the testing purpose,,suggest me for any other alternative.

azharshaikh
Active Contributor
0 Kudos

Hi Ram,

Seems you are trying to insert Null value in the DB. Please check your output XML Payload & confirm if the values are correct in the structure.

Regards,

Azhar

Former Member
0 Kudos

how to view the output xml payload information in pi 7.4 single stack..?

Former Member
0 Kudos

There is no Null values passed from the ecc to pi..

PriyankaAnagani
Active Contributor
0 Kudos

Hi,

iaki_vila
Active Contributor
0 Kudos

Hi Ram,


how to view the output xml payload information in pi 7.4 single stack..?

You must enable the monitoring as ICO object level as Vladim explains in his blog

Regards.

Former Member
0 Kudos

Hi Priyanka,

Ya help me out to resolve this issue..it would be greatful

PriyankaAnagani
Active Contributor
0 Kudos

Though there are no NULL values sent from ECC to PI, after mapping you might be sending NULL values  from PI to Database for any NOT NULL field. Please re-verify.

Regards,

Priyanka

Former Member
0 Kudos

I have maintained the interpretation of empty string values: empty string.

Then also, I am facing the same problem..

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Ram,

I assume you did like this and activated the channel. Also, please check the cache status to avoid any cache issues.

In you receiver channel configuration, please  maintain the Interpretation of Empty string as EMPTY instead of NULL.

Can you please let us know what is the actual value present in the target field ZEILE?

Regards

Vishnu