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

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

$
0
0

Define a sorted or hashed itab with a three part primary key and a unique secondary key (hashed or sorted) consisting of just the third component of the primary key.

 

Insert a duplicate on the primary key - you'll see that SAP gives you a sy-subrc of 4 - it doesn't short dump

 

But now insert a duplicate on the secondary key, but NOT the primary key - you'll see that you short dump !!!! LOL !!!!!!!

 

Apparently, SAP only checks primary keys for uniqueness when determining the initial return code.  So, since this code will be 0 when the primary key doesn't duplicate, SAP lets the record through and then short dumps on the duplicate for the secondary key.

 

Of course, it would be nicer if SAP checked ALL unique keys (secondary as well as primary) up front ....

 

... but we all know SAP has bigger fish to fry  like making sure the latest gizmo can talk to SAP, etc.


Viewing all articles
Browse latest Browse all 3273

Trending Articles



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