Smart Sync - Overview | Defining SyncBO | Testing 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.
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.
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
...
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)
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.
The data structure of a SyncBO has to obey the following rules:
Rules for the data structure of a SyncBO |
|
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?
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... |