Skip to Content
0

Delete local record from device in Kapsel offline SAP UI5 app with SMP 3

Jun 19, 2017 at 10:24 AM

101

avatar image
Former Member

Hi All,

we have created one SAP UI5 based offline app for create Physical inventory using kapsel in SMP 3 . we are able to successfully create record in back-end.

But we are facing issue , when user is in offline mode and he has created one record in offline and then without coming online ,user want to discard/delete record from local device.

As we know ,if we call delete operation it will call delete operation in back-end. which is not useful.

Kindly advice...

Regards

Vivek

10 |10000 characters needed characters left characters exceeded
Former Member

HI SAP expert...

Kindly suggest any solution..

we are facing issue for deleting local record from device in offline kapsel based app integrated with SMP 3.0

Kindly advice.

Thanks

Vivek

0
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Kevin Bates
Jul 06, 2017 at 11:00 AM
1

You should do the delete as normal and it would have backend interaction. Both the create and the delete is kept in the outbound request queue in the offline database and sent to HCPms/SMP and backend OData service. HCPms / SMP keeps track of converting the temporary ID of the delete action to the ID returned from the backend from the create and then do the delete operation on the correct backend ID. If this is left out, then the OData service will not be able to return the ID in the response of the create to HCPms/SMP. Therefore, HCPms/SMP will not able to map the backend created ID to the temp ID on the Delete request before sending the Delete request to the OData service. If you are looking for another solution, you should open an incident with SAP Support. Additional note, a moderator is not necessarily a technical expert in the area. Alerting a moderator on your question to get an answer is not proper.

Show 3 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thanks Kevin for response..

I guess ,you are talking about POST call and after record created automatically updating the key field from backend.

This scenario working absolutely fine.

I am explaining our issue step by step below :

Step 1 : User is in offline and he has added one record using POST service call.

Step 2: User is in offline and he want to delete the record created in device. This record is still not synced.

Step 3 : User is in offline and he will delete the record using DELETE service call.

Step 4 : Now , User came online and sync started by user.

Step 5 : Now since user has deleted the record ,it should not go to backend. But in our case POST service is getting called first, which create record in backend then delete service is getting called. But since record deleted by user, it should not create any record.

In simple term , Discard record functionality in offline device store.

How, we can approach this functionality, kindly guide.

Regards

Vivek

0

Hi Vivek,

I have your Support ticket. Please follow the communication there. Once we have the solution I'm going to write it here.

Best regards,

Ákos

0

Thanks Akos, I was sidetracked and couldn't get back to this question.

0
avatar image
Former Member Jan 05 at 10:08 AM
0

Hey Guys did you find a solution to this problem.

We are faced with a similar issue. The problem is with Measuring Documents in the backend. Let's say we create a new Measuring doc in the front end. We then delete/edit the recorded document. This will give somthing like this in the outbound request queue:

Create Measuredoc
Delete/Edit Measuredoc

The problem is that the backend can't delete the measurement document once created and the requests are processed individually.

Hope you can help me out.

Share
10 |10000 characters needed characters left characters exceeded