cancel
Showing results for 
Search instead for 
Did you mean: 

UPDATE_INSERT only updates, does not inserts

Former Member
0 Kudos

Hi !

I have a jdbc receiver scenario. Testing it via client http adapter in BE QoS, when trying to send an UPDATE_INSERT action type message, with only 1 record data, using a new primary key value that works correctly from the SQL console (I use a new PK data each test), the record does not get inserted. I'm using 1 access node and 1 key node. (If I try to update a previously existent record, it gets updated correctly)

I receive:

<update_count>-1</update_count>

<insert_count>0</insert_count>

with the update count as negative !!!!

If I use the same target XML message, with @action=UPDATE, it returns:

<update_count>-1</update_count>

If I use the same target XML message, with @action=INSERT, it returns:

<insert_count>1</insert_count>

and it works !!!! , but I need an update_insert action to avoid a previous lookup to determine if I have to update or insert.

What am I doing wrong?

Regards,

Matias.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Did you checked the DB logs for errors?

Answers (1)

Answers (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Matias,

Can you share the XML strucutre being used for Update_Insert that returns a negative value for Update?

Am not sure if I would have a solution, but would just like to have a look to see if something strikes.

Regards

Bhavesh

Former Member
0 Kudos

Hi Bhavesh !

Thanks !


<?xml version="1.0" encoding="UTF-8"?>
<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
   <ns0:Message1>
      <ns1:mt_xxxxxx xmlns:ns1="urn:xxx">
         <families>
            <family action="UPDATE_INSERT">
               <table>family</table>
               <access>
                  <cdg>FF3</cdg>
                  <descripcion>nuevo</descripcion>
                  <tipo>M</tipo>
               </access>
               <key1>
                  <cdg>FF3</cdg>
               </key1>
            </family>
         </families>
      </ns1:mt_xxxxx>
   </ns0:Message1>
</ns0:Messages>

Any ideas?

I guess that if the update_count would be "0", instead of "-1" then the jdbc adapter would try to make the insert...I don't know what -1 means !!!

Thanks.

Regards,

Matias.

bhavesh_kantilal
Active Contributor
0 Kudos

Everything looks good to me. I have no clue on what this -1 means as well.

The only doubt ~ Is multi mapping the culprit? From your message it looks like you are using multi mapping and is this by any chance causing this issue?

Alternately, can you also check j2ee logs to see if you get something more on this and if no, OSS maybe the the answer.

Do keep us updated if you figure out what -1 means~

Thanks

Bhavesh

Former Member
0 Kudos

Hi Bhavesh !

Thanks.

I need multimapping because my input is an IDOC and I need to create multiple xml sql output message. I will try if not using multimapping it works.

Thanks for your suggestion. If any solution arrives,I will post it.

Regards,

Matias.