Show TOC

Creating the MappingLocate this document in the navigation structure

Procedure

You must map the data source entities such as BAPIs, function modules in RFCs, transaction recordings to your Data Model. Field labels from the data source are also mapped and appear automatically in the PS (Public Solution) Data Model that is subsequently generated.

In this section, the data source used as an example, is BOR. The differences for Screen Scraping and RFC are highlighted.

Recommendation

Always familiarize yourself with the documentation for the specific SAP function, BAPI, or transaction you want in your Data Model, including the following:

  • Identify the parameter assigned as key. Later, you must map the key parameter to the Data Model.

  • Importing parameters of the function or BAPI can be marked as constant values in order to retrieve additional information.

In addition, we recommend that, first map the Query operation into your Data Model before mapping other operations, as the generator automatically detects and proposes the Property to set as key in the Query operation.

Later, the generator automatically proposes the same Property as key for any other operations that you try to map.

To map into the Data Model, proceed as follows:

  1. Find the BAPI or module in the object list of the data source screen.

    If Screen Scraping is your data source, select and expand the recording group that contains the recordings you want to make available in your Data Model.

    Screen Scraping does not allow you to map the recording group to your Data Model, as this can contain more than one recording.

  2. Expand the BAPI or module (for example, in case of BOR, choose User) to display its signature: key parameters (for example, UserName), operations as BAPIs (for example, GetList), and parameters of these operations.

  3. Select the data source attribute you wish to map and choose Create Mapping to map it to the Data Model. The Map Operation screen displays.

    For example, to map the Read operation, select GetDetail from the data source and choose Create Mapping.

    If Screen Scraping is your data source, select the recording or search help data you want to map to your Data Model and proceed as described above.

    Note

    Some recorded screens display more fields than the number of fields presented to you during the recording, as the screen presented during recording has been customized to hide some of its fields.

    Map to your model, only the fields that were visible during the recording of the screen.

    At design time, if you map fields that were not visible during the recording, but are available in the recorded screen, consider that, at runtime, the process will work dynamically and will not work in some cases.

    For that reason, we do not recommend that you map such fields.

    If you select Query (GetList), all the exporting, changing, or table parameters are mapped to the root Data Object of the Data Model.

    The importing parameters get the constant value, Initial. You can only select one export table parameter per Data Model with the Query operation.

    Any other import fields or range tables can be mapped to filter Properties in the Data Model. Range tables can be mapped to range Properties.

  4. Select only the fields you wish to use in the Data Model (that is, the fields that will be exposed by the generated service) by selecting the checkboxes next to them.

  5. Optionally, select Change Mapping Route to change the proposed mapping route or assign a constant value to a data source field.

    When creating a new mapping, the mapping route column contains a mapping proposal to the Data Model. This proposal is provided according to internal heuristics that consider the operation type and the data source type.

    Verify the proposed mapping and make your changes accordingly. The constant value, Initial, is used when the generator tool cannot propose a mapping for a specific field.

  6. Select the green check mark at the bottom to save it, when you have finished the mapping. The Map Operation screen closes.

The Structure tab displays the mapped operation in the Data_model – Operations section, with its mapped Data Objects and Properties appearing in the Data Model node of the Data Model section.

You can continue to map more operations and build your Data Model structure.

Note

You can only map one operation from each operation type per Data Model, that is, only one Read operation per Data Model, only one Query operation per Data Model, and so on.

The next step is to set the key for a Property in each mapped operation to the Data Model, if no key Property has been proposed.

More Information