Smart Sync - Overview  |   Defining SyncBO  |   Testing SyncBO

 

What is a SyncBO?

This section describes the SyncBO, the data structures of a SyncBO and the SyncBO Builder.

Conceptually, a SyncBO can be considered as a business object that has some public and private attributes as well as some private methods. The public attributes correspond to the fields visible to client devices, and they are used for synchronization. The private attributes are not visible to client devices but the SyncBO uses the default values assigned to the attributes to call the private methods internally. The private methods correspond to the BAPI wrappers that typically call publicly available BAPIs. The parameter values for BAPI wrapper call are decided based on both public and private attribute values.

From the client perspective, a SyncBO is an object where the attributes are mapped to certain table structures for data persistence.

A SyncBO is meta-data ...
A SyncBO is data ...

To distuingish the two use cases of a SyncBO we refer to

SyncBO types for SyncBO is meta-data

and

SyncBO instances for SyncBO is data.

SyncBO Type

A SyncBO type consists of one header row and several item row. A SyncBO type is a generic structure of business object and describes the structure of a SyncBO instance.

Example: Customer master data

Header row type holds fields for:

customer ID
address
...

Several item row types for:

Banking information
Customer orders
...

SyncBO Instances

A SyncBO instance is a specific instance of a given SyncBO type with actual data. The actual data consists of one header row and n x m item rows. Every item row type can be instantiated several times.

Example: Customer ABC

Header row type has fields for:

ID = 123
Address = “Street and City”
...

n x m item rows:

Bank1: “Bank of Scotland”
Bank2: “Bank of England”
Order1: “123” (+ order positions)
Order2: “345” (+ order positions)

BAPI Wrappers

The SAP WebAS Java has to provide BAPI wrappers (Synchronizers) to convert the SAP R/3 data structure into SyncBO data structure. Following BAPI wrappers have to be defined for a SyncBO:

GetList Returns a list of business object header data based on the selection criteria specified in the Import parameters.
GetDetail Returns one header data as Export parameter out of the header data list based on the object key(s) specified in the Import parameters. It also returns one or more list of item entries associated with the header data.
Create Creates a single business object, and returns object key(s).
Change Modifies the header and/or items of the specified business object. The function needs to replace the entire item data with the entries of Tables parameters.
Delete Deletes the specified business object (including the items).


A SyncBO has a unique version id. The version id is necessary for the client application to access the SyncBO.

Data Structure of SyncBO

The data structure of a SyncBO has to obey the following rules:

Rules for the data structure of a SyncBO

  1. Number of levels in one SyncBO is less than 3
    1. Only one level (HEADER structure only)
    2. One HEADER and ITEM structures directly attached to the HEADER (2 levels)
    3. 3-level structure or more is not allowed
  2. Only one HEADER structure can be defined per SyncBO
  3. Multiple 2nd level ITEM structures can be defined for the HEADER structure.
  4. HEADER data of a SyncBO is communicated through either the Import or Export parameter of the BAPI Wrapper. (GetDetail/Create/Change), and the items through the Tables parameter (GetDetail/Create/Change). As an exception, the HEADER data in the GetList is communicated through the Tables parameter.
  5. A SyncBO can have a relationship to another SyncBO. (e.g. Sales Order SyncBO can use Customer SyncBO)
  6. A SyncBO has a single key field for each HEADER and ITEM structures, which is called SYNC_K

 

Additional recommendations:

Typically, a relationship between SyncBOs is defined when the following is required:

The following diagram illustrates the relationship between SyncBOs:

See also: What is a BAPI Wrapper?

SyncBO Builder

The SyncBO Builder is the tool for defining SyncBOs in the design-time. An application developer, therefore, uses the SyncBO Builder to define SyncBOs. The core functionality of the SyncBO Builder is to generate the synchronizer for the SyncBO based on the parameters set. In the runtime, the synchronizer for each SyncBO performs delta download data management, data upload, data filtering, conflict resolution, replica DB management and error handling.

The following is a list of some main screens in the SyncBO Builder and relevant transactions:

Screen / transaction

How to launch it
Initial Screen (Home) Transaction code: merep_sbuilder. Further info...
Mapping Screen Accessible from the Initial Screen
Mapping Setting Screen Accessible from the Mapping Screen
Profile Dialog Transaction code: merep_pd. Further info...
Mobile Group Profile Transaction code: merep_group. Further info...
Replicator starter Transaction code: merep_ex_replic
Worklist Monitor

Transaction code: merep_mon. Further info...

Migration Tool Transaction code: merep_mig. Further info...