Skip to Content
author's profile photo Former Member
Former Member

Method to delete a sync row?

Hi, i´m doing a smart project, i havethis method:

- modifyRowInDB

- addRowInDB

How can i do deleteRowInDB?

Lot of thanks,

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2007 at 10:22 AM

    Hi Victor,

    to delete a row, there are two things possible -like in the modify.

    First if the row is on the local machine and in state L because you just created it - then you can delete is simply by selecting it with its guid and delete it with the API. This is the same as modify - just delete at the end.

    If it is already in G state, so it was synced with the backend. In that case you need a delete bapi wrapper, that does the delete in the backend as well. The rest is straight forward again. Can be the same coding pretty much as your MODIFY handler - on both sides, the abap and the java - but instead of modify, you call delete.

    By the way, to have a look for all possible methods: while you develop a java app, you usually get help from eclipse. In the moment you enter code, Eclipse shows you what instructions are possible. If you write

    String s = new String();

    s.comp

    then the baloonhelp shows you that there are several different instructions that start with comp for the String. The same happens when you write the SmartSync code. The line where you setup the modify..... In there just delete evrything from the dot in front of the modify to the end of the line. If you now enter the dort again, then it shows you all possible instructions for that code structure. So instead of selecting the modify from there, you just select the delete.... It is a ssimple as that. And the bestthing: it shows you the necessary variables then as well... Great stuff 😉

    ope this helps,

    Regards,

    Oliver

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.