Implementation Considerations
In the mapping between a data source and an
entity set, Service Builder automatically performs certain checks to verify that the
mapping you create is logical and acceptable. Familiarize yourself with the following
mapping rules to minimize errors when creating a mapping. In addition, you can
automatically obtain a proposal for the available mapping relations between the properties
of the entity set and the parameters of the data source, using the
Propose
Mapping button.
When you create a mapping in the Mapping screen,
Service Builder checks that:
- the specified data source parameter (in the Data Source Parameter path) is a
parameter or a range table of the data source. If the value is not a parameter, or
a range table of the data source, you get an error.
- if a constant value is provided, it checks if the specified data source parameter
to be mapped to the constant value is of type, import or changing Once a data
source parameter is assigned to a constant value, the mapping direction is set to
an input type.
- the specified property is a property of the Entity Type
- if the specified constant value starts and end with an apostrophe
- if the specified constant value is for a data source attribute of type output, or
export
Generated Mapping Proposal Available in the
mapping table, is the
Propose Mapping button, which provides
automatic mapping proposal between the properties of the entity set and the
parameters of the data source. If there is no information about the mapping, no
mapping is proposed. The mapping proposal is based on heuristics that consider the
following:
- The origin of the properties (in case they are imported from a BOR or an RFC
interface). If the property of an entity set is derived from an imported data
source, that property is proposed to be mapped to a data source attribute with
the same path as the original data source attribute.
- Mapping of other operations of the same entity set
The proposed mapping information is derived as follows:
- Query operation: When attempting to map the Query operation, the proposed
mapping for the Query operation is taken from the mapping information of the
mapped Read operation.
- Read operation: When attempting to map the Read operation, the proposed
mapping for the Read operation is taken from the mapping information of the
mapped Update, Create, or Query operations.
- Update operation: When attempting to map the Update operation, the proposed
mapping for the Update operation is taken from the mapping information of the
mapped Create, and Read operations.
- Create operation: When attempting to map the Create operation, the proposed
mapping for the Create operation is taken from the mapping information of the
mapped Update, and Read operations.
- Delete operation: When attempting to map the Delete operation, the proposed
mapping for the Delete operation is taken from the mapping information of the
mapped Update, and Read operations.
The mapping mechanism attempts to generate a proposal by searching for
corresponding mapping in the following sequence:
- Based on the exact name of the path for the data model property.
- Based on the exact path, and data type for the data model property.
- Based on the mapping information from existing mapped operations.
Recommendation As the mapping proposal is based on heuristics, we recommend
that you verify the proposal to make sure it is correct and suits your needs. End
of the recommendation.
Generated Mapping Rules The following are some of the general
mapping rules:
- When mapping in the Mapping screen, Service Builder enables you to edit the
direction of the specified data source parameter only if it is of type,
changing.
- When mapping a data source attribute of type, import, the mapping direction
icon indicates the attribute to be of type, input.
- When mapping a data source attribute of type export, the mapping direction
icon indicates the attribute to be of type, output.
- When mapping the Update or the Delete operations, only data source parameters
of type, input can be mapped.
- When mapping the Query operation, the mapping direction icon indicates the
attribute to be of type, input.
- If the data source parameter is a range table, or structure, it displays with
a green icon.
- A constant value can only be mapped to a parameter of type input or changing.
- Many to one mapping is not allowed in all methods and all directions, except
for range tables.
- A data source attribute that is not a range table cannot appear in more
than one mapping with an input mapping direction. For example, you are
not allowed to map two properties to one data source parameter; or map
two data source parameters to the same property. End of the example.
- Mapping of properties in the mapping table is mandatory, unless you use
constants.
- You get an error if the mapping entry contains a constant value and an entity
set property at the same time.
- If the data source parameter is of type, changing, you can choose the mapping
direction.
In all other cases, it is automatically set according to the input or output
characteristics of the parameter.