SmartSync Error: Record not on device?
I'm developing a JSP MI Client SmartSync application. This application can add a record successfully. The source code is more or less following the <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/21eba3a7-0601-0010-b982-92f1fca3258a">SmartSync Inventory Example</a>. But when i tried to modify it, the record wasnt updated in the R3.
Below is the log in the merep_mon, there is an error in <b>I-Error</b>:
Cl. Run Number
Msg Cntr. RT Cntr. Msg Type Created on Time Message text
1 3 I 19.10.2007 11:36:03 MEREP_HANDLER has started for run number 0000055016 and runtime counter 3
2 3 D 19.10.2007 11:36:03 Return code 0 (HANDLER ENABLED)
3 5 E 19.10.2007 11:36:03 <b>Record not on device</b>
4 5 E 19.10.2007 11:36:03 Return code 1 (DOWNLOADER)
Any help would be highly appreciated . Thanks.
Oliver Kaluscha replied
this error can have multiple reasons, so lets start simple. As you type the message, it says the item is not in the device. So, could you show the code for modify?
I guess there you do not really access the item or in the code itself is something wrong. Normally, if you modify, you first read the item, have to key of the item, then you modify it and save this entry afterwards. This is the best idea to avoid this error.
Well, if you create an item, then it is pretty much lke that. You do not want to create a new item, if the same item is alresdy on the device. This could cause issues in backend otherwise. So you first read the persistence and check if this particular item is alredy there. If this is the case - well, you have the key then, so see above.
In all cases youshould have the key of the item. If then the key is not in Sync state - because then modify is not allowed - you can modofy it. So the question is: have you perhaps written a test code, that takes the item you have created previously in your test code and where you believe it is on the client and try to modify it - but you have not really checked if the item is really still on the device?
Please give a little more input.