Show TOC Start of Content Area

Procedure documentation Mapping Data  Locate the document in its SAP Library structure

Use

When you connect an element to an input port of a data service, you need to map the data fields from the input element to the fields of the data service. You map data fields to define which fields of the input data are the correct sources of data for the fields of the data service.

When you drag out from the input port of a data service to create an input element, or if you use the Compose task panel to add a view element to the Design board and manually connect it to the input port of a data service, the fields are mapped automatically.

For example, you may have a data service that expects to receive data for the Bank Country and Max Rows fields. If you create a form view by dragging out from the data service input port, these two data fields and their associated controls are added automatically to the form view and mapped to the corresponding data service fields.

However, if the input element’s dataset does not match that of the data service, if you want to change the automatic field mapping, or if the dataset is clustered, you need to manually map the data fields of the input element to the fields of the data service. For a clustered dataset, you also need to map any child nodes of the dataset as required (the root node is mapped automatically). You do this using the Map Data dialog box, as described in the following procedure.

Prerequisites

On the Design board, you have connected an element to an input port of a data service.

Procedure

...

       1.      Right-click the connecting line between the element and the input port of the data service, and from the context menu choose Map Data.

       2.      Map the fields in one of the following ways:

                            a.      If you are mapping fields in a flat dataset, in the Assigned Value column, specify each field that you want to map to each Target Field of the other element.

                            b.      If you are mapping fields in a clustered dataset:

                                                  i.       In the top part of the dialog box, drag from the Source node (the node containing the data for output) to the Target node (the node that receives the data). A mapping line is created between the two nodes, and any fields of the same name are automatically mapped to each other. If you are mapping a child node, the parent nodes are mapped automatically as well.

The appearance of the mapping line changes according to whether the fields are mapped automatically or manually (a manual mapping has a diamond shape at the center of the line).

Note

You can select an already mapped node, and click the Map All button in the toolbar to automatically map all child nodes of the selected mapped node.

                                                ii.       In the tree, select the node whose fields you want to map.

                                               iii.       In the table at the bottom of the dialog box, in the Assigned Value column, specify each field that you want to map to each Target Input Field of the other element.

Note

To remove a mapping, select the mapping line and click the Unmap button in the toolbar. If you delete a parent node mapping, any relevant child node mappings are also deleted. If you delete a child node mapping, the parent node mappings are not deleted.

       3.      Click Close.

For more information about the options in the Map Data dialog box, see Map Data Dialog Box in the Visual Composer Reference Guide.

Result

The fields are mapped, and at runtime the field data is transferred to the data service according to the mappings you defined.

End of Content Area