Start of Content Area

Procedure documentation Defining SyncBO Relationships Locate the document in its SAP Library structure

Use

You can create foreign key relationships between the SyncBOs contained in a mobile application by defining the SyncBO relationships.

An example business scenario for such a relationship is a customer and a customer order. The customer order data includes a data field in which a number is assigned for the corresponding customer. If you define such a relationship for a customer order in a SyncBO, it is taken into consideration during synchronization.

For more information about synchronization behavior for relationships, see Structure linkConfiguring Synchronization Behavior.

Prerequisites

·        The target (reference) SyncBO has a primary key that is defined in the metadata and that consists of only one field.

·        The primary key field of the target (reference) SyncBO has the same parameter attributes as the data field of the referencing SyncBO.

·        The reference can only point to the primary key field of the header structure of the target (reference) SyncBO.

Procedure

...

       1.      Start transaction merep_sbuilder.

       2.      Enter the SyncBO ID.

       3.      Choose This graphic is explained in the accompanying text Edit.

       4.      On the Mapping screen, select the Related SyncBO column.

       5.      Choose input help (F4). The SyncBOs that can be referenced are displayed.

       6.      Select the required SyncBO and choose This graphic is explained in the accompanying text Continue.

Result

If synchronization is performed for a download, the data of the referencing SyncBO contains the synchronization key of the target SyncBO instance. If a referencing SyncBO instance is uploaded from the client device, the synchronization key with the foreign key mapping is converted to the R/3 key value by the synchronizer before the back-end BAPI wrapper is called.

 

End of Content Area