Skip to Content
Sep 21, 2014 at 02:34 PM

SAP DI method GetByKey() crash my app if the key does not exist


Hi All,

I have an issue in recent our SAP upgrade from 882 to SAP 9, I noticed that my application will crash if GetByKey() method receive a none exist key value. For example, items.GetByKey(item_code) for ItemMaster, if the item_code doesn't exist in SAP OITM table, then my application crashes. The exception says "Attempted to read or write protected memory. This is often an indication that other memory is corrupted" But if I pass a exist ItemCode value then no exception. I am using 8.8 DI dll, but I tried DI 9.0, seems same result. I tried for BP object, similar issue. Seems my try/catch can't capture this exception. Any idea?

P.S. Everything is running well in my previous 882.




SAP9Test.jpg (246.0 kB)