cancel
Showing results for 
Search instead for 
Did you mean: 

What i advice me? (Dependency syncbo)

Former Member
0 Kudos

Hi experts, i have an application in MI 7.0 with various syncbo...

I have syncbo ZSBOE001 and syncbo ZSBOE002.

I write 'hi' from device in syncbo ZSBOE001, i sync, write in the table 'hi' and write in the table of syncbo ZSBOE002...

When return in the device, the new data that should be in ZSBOE002 not appear... I need do two sync... I understand why, but, how can avoid it? If i do two sync, it take long time.

Thanks,

PD: i intent:


Vector s = new Vector();
s.addElement("ZSBOE001");				
sincronizar(s, SyncBoDeltaRequestType.DIRECT_REQUEST);
s = new Vector();
s.addElement("ZSBOE002");
sincronizar(s, SyncBoDeltaRequestType.REQUEST);


	private void sincronizar (Vector syncbos, SyncBoDeltaRequestType tipo) {				
		SyncBoDescriptorFacade descriptorFacade = SmartSyncRuntime.getInstance().getSyncBoDescriptorFacade();
		
		if (syncbos.contains("ZSBOE001")) {	
			SyncBoDescriptor syncBoDescriptorE1 = descriptorFacade.getSyncBoDescriptor("ZSBOE001");
			SmartSyncRuntime rE1 = SmartSyncRuntime.getInstance();
			rE1.getSyncBoDeltaRequestFacade(VisibilityType.USER_SHARED).getSyncBoDeltaRequest(syncBoDescriptorE1).setProcessing(tipo);
		}
		else {
			SyncBoDescriptor syncBoDescriptorE1 = descriptorFacade.getSyncBoDescriptor("ZSBOE001");
			SmartSyncRuntime rE1 = SmartSyncRuntime.getInstance();
			rE1.getSyncBoDeltaRequestFacade(VisibilityType.USER_SHARED).getSyncBoDeltaRequest(syncBoDescriptorE1).setProcessing(SyncBoDeltaRequestType.NO_REQUEST);	
		}
		
		if (syncbos.contains("ZSBOE002")) {		
			SyncBoDescriptor syncBoDescriptorE2 = descriptorFacade.getSyncBoDescriptor("ZSBOE002");
			SmartSyncRuntime rE2 = SmartSyncRuntime.getInstance();
			rE2.getSyncBoDeltaRequestFacade(VisibilityType.USER_SHARED).getSyncBoDeltaRequest(syncBoDescriptorE2).setProcessing(tipo);
		}
		else {
			SyncBoDescriptor syncBoDescriptorE2 = descriptorFacade.getSyncBoDescriptor("ZSBOE002");
			SmartSyncRuntime rE2 = SmartSyncRuntime.getInstance();
			rE2.getSyncBoDeltaRequestFacade(VisibilityType.USER_SHARED).getSyncBoDeltaRequest(syncBoDescriptorE2).setProcessing(SyncBoDeltaRequestType.NO_REQUEST);		
		}			
			
		SyncManager syncManager = SyncManager.getInstance();

			syncManager = SyncManager.getInstance();

		syncManager.synchronizeWithBackend();
	}

But the sync continue in synchronous mode... and i can´t do nothing with the device.

Edited by: Victor Capi on Apr 21, 2008 5:34 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Victor,

the solution in your case is easily to use a syncBO with a header and child structure - then the info is in one BO - and so it will come down in one sync usually. The only solution to avoid that while using two BOs:

Write your own sync

and sync two times sutomatically if Item A changes.....

Regards,

Oliver

Former Member
0 Kudos

Are you refering to use GETDETAIL?

Thanks,

Former Member
0 Kudos

Have you ever used a SyncBO with a TOP -> CLIENT10 structure?

If not, read the MDK about it - then think if that could be a solution. But be aware, you need to change your DataSet - or better, the structure of your data.

Regards,

Oliver

Former Member
0 Kudos

Hi Oliver, if i use a GETDETAIL... i only return the GETDETAIL from a one header... Can i do the same, but, with various headers of GETLIST?

Thanks,

Former Member
0 Kudos

NOP!

Well, it is the GETDETAIL return that can deliver structures - go to your ABAP guy and talk to him about this structure.

If the two items are linked anyway, you can have a header and then the related entries from the second table as items. But he should know how to do that in ABAP.

But as far as I am aware off : you can not trigger the download of a second BO from the first one ...

Regards,

Oli

Edited by: Oliver Kaluscha on Apr 22, 2008 2:41 PM

Former Member
0 Kudos

In other way... if i want modify an item from GETDETAIL, it is the same as if i modify an item from GETLIST... I select the synckey, the position, and modify it no?

How can the abaper know if i modify a Header or a Child?

Thanks,

Former Member
0 Kudos

Hi,

well, the abaper does not know what you change - but he does not need to know..... And if he wants he knows it.... he has a MODIFY handler. You can not change the KEY, so this stays the same. So he selects the item for update based on the key - and then he takes your values and updates the item he selected with your entries - and persists it. Where is the issue?

Regards,

Oliver

Former Member
0 Kudos

Ok, i intent it.

Thanks,

Answers (0)