cancel
Showing results for 
Search instead for 
Did you mean: 

Cancellation of the TOP structure in the syncbo on client

former_member207329
Participant
0 Kudos

Hello all,

we are working with MiClient 2.5 SP18 & WAS 640 using Smart Sync.

I have a Syncbo (es: z0001) of S01 tyepe with only TOP without items.

This is my scenario:

- users creates some records (es:record1,record2,record3) with Z0001 syncbo Z0001

- users wants to cancel some records (es:record2) before the synchronization.

Problem: is impossible to cancel TOP of the syncbo on the client with API standard.

As I can perform a cancellation of the TOP structure in the syncbo on client?

Thanks all.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI Rocco,

try out SyncBoDataFacade.deleteSyncBo(SyncBo syncBo).

Docu:

http://media.sdn.sap.com/public/html/submitted_docs/MI/MDK_2.5/content/javadoc/com/sap/ip/me/api/sma...

Rgds Thomas

former_member207329
Participant
0 Kudos

Hi Thomas,

thanks for your help.

Wiht SyncBoDataFacade is possible to cancel the syncbo only present on the client (create on device and without having performed a synchronization)?

Former Member
0 Kudos

Hi,

I guess this depends on your syncbodefinition. Do you allow deletion (by having a delete bapi in the merep_sbuilder)?

Rgds THomas

former_member207329
Participant
0 Kudos

Hi Thomas,

in my syncbo definition there is "allowDelete=true", but I have not developed the DELETE bapiwrapper. For delete TOP in the syncbo, is it necessary?

Former Member
0 Kudos

Hi Rocco,

if you have no delete bapi you cannot delete a SyncBo which already resides in the Backend.

Rgds THomas

former_member207329
Participant
0 Kudos

If the SyncBo not already resides in the Backend is possible delete only Syncbo that resides in the Client?

Former Member
0 Kudos

hello rocco,

if the syncbo was created and NEVER have been sent to the

middleware, it is a LOCAL syncbo. if it is being deleted

from an application, no delta upload will be sent to the

middleware.

if your requirement is only to suppress the delta data

upload and hold your syncbo data LOCALLY in your client,

your can do this 2 ways.

1) if you want your syncbo to be a local syncbo for the

whole period in time, you can define it thru your metadata.

the SyncBo element attributes <b>suppressUpload="true"</b> and

<b>suppressDownload="true"</b> will make your SyncBo local.

2) if you want to suppress delta upload for a syncbo on

descriptor level you may use the API:

SyncBoOutDeltaFacade.setSendType(SyncBoDescriptor, SyncBoOutDeltaSendType) 

your SyncBoOutDeltaSendType parameters should be set to

SyncBoOutDeltaSendType.NO_SEND.

now if you want to suppress on syncbo instance level, i.e.

suppress the delta upload for a specific syncbo instance

you can use

SyncBoOutDelta.setSendType(SyncBoOutDeltaSendType)

the latter however is deprecated and is not recommended

anymore due to performance reason. you can get your SyncBoOutDelta

instance of a specific SyncBo by using the SyncBoOutDeltaFacade.getAllDelta():MeIterator

which will give you all the SyncBoDeltas. Or you can register

an observer implementing the SyncBoOutDeltaObserver and this

observer will be notified with the SyncBoOutDelta instance

for certain SyncBoDescriptors which it observes for.

For details on the APIs, please refer to

https://media.sdn.sap.com/javadocs/NW04/SPS15/me/index.html

regards

jo

Answers (0)