cancel
Showing results for 
Search instead for 
Did you mean: 

Inserting entire document to CLOB column

Former Member
0 Kudos

Hi All,

I am currently trying to develop a scenario where I get an entire IDoc from our R/3 system, and I just need to insert it into a CLOB column in a database. So far, I have been able to put it into the proper insert format used for JDBC inserts (using java):

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

<ns:MT_Insert_Data xmlns:ns='http:///XI'>

<INSERT_DATA>

<dbTableName action="INSERT">

<table>TableName</table>

<access>

<ID hasQuot="No">SEQ_I129_SHIPPING_NOTIFICATION.NEXTVAL</ID>

<DATA>IDoc Message Here</DATA>

</access>

</dbTableName>

</INSERT_DATA>

</ns:MT_Insert_Data>

My problem now is I'm getting an error at the adapter level when the JDBC receiver tries to insert to the table - ORA-01704: string literal too long. I did find another forum post () but it talks about using stored procedures or PreparedStatements - neither of which I'm really sure how to handle.

Could someone either spell out one of these methods more concisely, or maybe recommend a simple method to resolve this issue?

Thanks,

Mike

Edited by: Mike Morrison on Feb 19, 2010 9:46 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member187339
Active Contributor
0 Kudos

Hi Mike,

Quick check did you checked the last reply of Mario Slopar, have you tried that?

Regards

Suraj

Former Member
0 Kudos

Yes, I tried setting the sqlBindMode to true but it didn't seem to have any effect. Any other ideas?

Former Member
0 Kudos

I guess u r talking abt BLOB type of filed in the database...

have u had a chance to look at this wonderfule wiki by shabarish...

I went thry it step by step and solved a similar requirement I had

http://wiki.sdn.sap.com/wiki/display/XI/WholePayloadtoaXML+field

hope this is of help to u

Former Member
0 Kudos

No, that's not it either. I've already handled putting the payload into the <DATA></DATA> node of my payload. My problem is when the JDBC receiver tries to insert the data to the DB it fails.