cancel
Showing results for 
Search instead for 
Did you mean: 

MI7.1 Delete the inserted data before sync for the upload only data object

former_member568822
Active Participant
0 Kudos

Hi,

I have a upload only data which have insert bapi wrapper only. I am able to save the data and insert data but my problem is how to delete the data before it syncr. Is this possible?? Or must i create a delete bapi wrapper??

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

if you create data on the client, you can do anything with it you like. Delete or modify is allowed. But in the moment you sync the data, it is not longer possible to do anything like that without having a delete or modify handler in place. So in your case you should be able to delete it prior to sync - but be aware: this data will not show up in the backend if it was deleted before sync.

Hope this helps!

Regards,

Oliver

former_member568822
Active Participant
0 Kudos

Hi,

Thanks for you reply. I manage to delete the inserted data refer to the employee_ui sample application but the data still appear at the backend after sync. Any idea why this happen??

Using the following code i am able to delete the record at the devices. But when it sync the data still get insert to database table.

ZmovementZmovementheader header = (ZmovementZmovementheader) wdContext.nodeasset_services().nodegetZmovementHeaders().nodegetZmovementHeadersOutput().getCurrentElement().model();

ZmovementZmovementdetail detail = (ZmovementZmovementdetail) wdContext.nodeasset_services().nodegetZmovementDetail().nodegetZmovementDetailOutput().getCurrentElement().model();

header.removeFromZmovementdetails(detail);

root.commit();

thanks

Edited by: fcgan on Aug 28, 2008 10:17 AM

Former Member
0 Kudos

Hi,

well, I have not really checked it, but from the lines you gave me it seems you only deleted the detail, but the header is still there. Please delete the header as well, this should make it better.

Regards,

Oliver

former_member568822
Active Participant
0 Kudos

Hi,

Thanks for reply. I just want to remove some of the detail item from header without delete the header. Is this possible ? Anyway i try to remove the header before sync but the data still insert at the backend even it get deleted from devices. Any idea how it happen??

thanks.

Former Member
0 Kudos

Hi,

no this sounds extremely strange. I will check on my environment how this could happen and what could cause this behaviour.

But it can take a few days. How do you check if the data was really deleted? In the SQL-Monitor of the DB or directly inside MI?

Regards,

Oliver

former_member568822
Active Participant
0 Kudos

Hi,

I check the data using MI7.1 query. Anyway i find out that this problem cause by the OcaRoot commit. After i take out the commit at the save button, im able to remove the data and the data also not inserted to backend.

Thanks for you help.

Answers (1)

Answers (1)

former_member568822
Active Participant
0 Kudos

I have a problem for the commit. Can i remove the data after the ocaroot commit but the data still no sync? I have try it but the removed data will insert to backend if i perform delete after ocaroot commit but if i delete the data before save with ocaroot commit it work.

Anyone have others solutions??

Hope for help.

Edited by: fcgan on Sep 11, 2008 4:18 AM

0 Kudos

Hi

if the sequence is :

insert

commit

delete

commit

two messaged are sent to the DOE one for insert and one for

delete.The commit prepares the extract and pushes the data to the client outbound.

Regards,

Shobhit

former_member568822
Active Participant
0 Kudos

Hi,

Thanks for reply. My problem is i have a data object with header and detail. I have no problem in inserting the data but after insert commit some time user may need to remove the detail or add the detail that may have several row. After insert commit then i add 1 more detail record then commit and sync. After sync only 1 detail is added and the detail added after commit is missing.

thanks.

Edited by: fcgan on Sep 16, 2008 6:03 AM

former_member599943
Participant
0 Kudos

I have a similar problem..

My problem is like that,

1. Insert - Commit

2. Delete - Commit

3. Add - Commit

...

...

The data on local table is correct.

Once I sync, only the (1) is correctly uploaded, no matter what stuffs I did after first commit, the following commits (2), (3), ... data are not affected and not uploaded to server.

any solution?

thanks.

Former Member
0 Kudos

Hello,

NW 7.1 uses a synchronisation mechanism that makes sure that what you do on the client is done in the same order on the backend. So when you do a commit, messages will be created and queued for the next sync. There is no way to go around that other than creating dummy delete BAPI Wrappers in the backend (which is a bad solution anyway).

Old MI applications works with another principle, which was explained in this thread. You can set a DOE SWCV to behave like a MI 7.0 application, but there are many drawbacks.

So you have to keep up with this somewhat "weird" design choice.

Thank you,

Julien.

msc mobile Canada inc.

http://www.msc-mobile.com