Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3354

Re: Another piece of core ABAP left undone by SAP ... LOL

$
0
0

This behavior is documented in the SAP documentation INSERT itab - ABAP Keyword Documentation.

 

When the row is in inserted, all existing unique table keys are checked. These can be a primary table key and multiple unique secondary table keys. The system handles any duplicates of the various key according to the following hierarchy:

  1. If attempting to insert a single row using a primary key would produce duplicates with respect to the unique primary key, no row is inserted and sy-subrc is set to 4.

  2. If attempting to insert a single row using the key or the index would produce duplicates with respect to a unique secondary key, a handleable exception of the class CX_SY_ITAB_DUPLICATE_KEY is raised.

  3. If the attempt to insert a single row (using an index) or multiple rows (as a block) would produce duplicates (in terms of a unique primary or secondary key), a runtime error occurs.

 

I don't know the reason behind this decision (backward compatibility, maybe), but as long as the behavior is documented i won't complain!


Viewing all articles
Browse latest Browse all 3354

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>