Entering content frame

Procedure documentation Defining a Segment-to-Table Mapping Locate the document in its SAP Library structure

Use

A segment of a sBDoc type is mapped to tables to retrieve data from the database. If a segment is mapped to multiple tables, it is recommended that these tables be joined with each other. For more information, see Joining Segment Tables.

The fields of a segment are mapped to table fields to perform read and write operations on the database.

You can:

·        Define a mapping of a segment to a physical table.

·        Define a mapping of segment fields to physical table fields.

·        Define relations (hierarchies and dependencies) between segments.

However, the mapping of segments to physical tables is restricted to the following cases:

...

       1.      1:1 mapping of segment field to table field:

¡        The length of a physical table field can be greater than or equal to the length of the segment field.

¡        The data type of a physical table field can be different from the data type of the segment field. However, the data type must be compatible.

       2.      Segment field not mapped directly to the table field:

¡        1:N mapping between the segment and tables for Mobile Application read only BDoc types.

¡        1:N mapping between the segment and tables for sBDoc types is possible only if 1:1 relation exists between the physical tables.

Procedure

Mapping Segments by Using Direct Map

...

       1.      Log on to the CRM server and choose Architecture and Technology ® Middleware ® Development ® Meta Object Modeling ® BDoc Modeler.

The CRM BDoc Modeler screen appears.

       2.      Expand the synchronization or mobile application BDoc type in the tree.

       3.      Right-click the segment you want to map.

A context menu appears.

       4.      Choose Direct Map.

The Direct Mapping screen appears.

       5.      In the Table Mapping pane, enter the name and alias name of the mapped table in the Mapped table and Table alias fields.

This graphic is explained in the accompanying text

In addition, you can choose F4 to select the mapped table from the list.

       6.      Select the mapped table and choose Get Fields to display the table fields in the Segment Fields pane.

       7.      To add one table field, select the table field and choose This graphic is explained in the accompanying text. To add more than one table field, select the required table fields and choose This graphic is explained in the accompanying text.

This graphic is explained in the accompanying text

If you do not select any table field and choose This graphic is explained in the accompanying text, all the table fields are added.

       8.      To remove one segment field, select the segment field and choose This graphic is explained in the accompanying text. To remove more than one segment field, select the required segment fields and choose This graphic is explained in the accompanying text.

This graphic is explained in the accompanying text

If you do not select any segment field and choose This graphic is explained in the accompanying text, all the segment fields are removed.

       9.      Choose This graphic is explained in the accompanying text.

Note

The Direct Map is an automated process. You can also perform the mapping manually.

Mapping Segments Manually

...

       1.      Log on to the CRM server and choose Architecture and Technology ® Middleware ® Development ® Meta Object Modeling ® BDoc Modeler.

The CRM BDoc Modeler screen appears.

       2.      Expand the synchronization or mobile application BDoc type in the tree.

       3.      Double-click the segment you want to map.

The Segment Overview, Mappings, Joins, and Segment Fields tabs appear.

       4.      Choose This graphic is explained in the accompanying text.

This graphic is explained in the accompanying text

If the BDoc type is already in change mode, you do not need to perform the above step.

       5.      Choose the Mappings tab.

       6.      Enter the following details:

Field name

Description

Req./Opt./Dep.

User action and values

Comment

Mapped table

Indicates the name of the mapped table

Req.

Enter the name of the mapped table.

This graphic is explained in the accompanying text

In addition, you can choose F4 to select the mapped table.

You can double-click a mapped table to view the table definition.

Table alias

Specifies the alias name of the mapped table

Req.

Enter an alias name for the mapped table.

 

Description

Indicates the short text specified in the table definition

Dep.

This field is read-only.

 

       7.      Choose the Segment Fields tab.

       8.      Enter the following details:

Field name

Description

Req./Opt./Dep.

User action and values

Comment

Table alias

Indicates the alias name of the mapped table

Req.

Enter the alias name of the mapped table.

This graphic is explained in the accompanying text

In addition, you can choose F4 to select the alias name from the list.

 

Table field

Specifies the table field of the mapped table

Req.

Choose F4 to select the table field from the list.

 

When you select the table field, the name of the table field is assigned to the segment field. However, you can change the name of the segment field. In addition, the data element associated with table field is automatically populated in the Data element field.

This graphic is explained in the accompanying text

You can double-click a table field or data element to view the table field or data element definition.

This graphic is explained in the accompanying text

You can use This graphic is explained in the accompanying text and This graphic is explained in the accompanying text to change the order of segment fields.

       9.      Save the BDoc type.

Note

One of the mapped tables must be set as an update table for the segment. The update map is a pre-requisite for sBDoc types. There must be only one update map for each segment of a sBDoc type. However, the update map is not required for Mobile Application BDoc types.

Leaving content frame