Mentor SAP

RFC/BOR Interface Import

The service implementation is performed by mapping the different methods of the RFC function module to the respective OData operation of an entity set.

 

It is important to note that the steps are not actually performed sequentially as depicted in the figure.

 

 

Service Implementation via Mapping

The implementation process starts with the import of the interface of an RFC function module. In contrast to code-based service implementation, service implementation via mapping can already be started prior to generating the source code and registering the service in the back end. Developers usually start with the mapping of the Read and Query methods, then the service is activated on the hub and the implementation can be tested.

 

If necessary, you can also implement the CUD methods via mapping, provided that appropriate RFC function modules are available.

 

Otherwise new RFC function modules have to be created and the service has to be implemented via mapping of this new RFC function module or the CUD methods have to be implemented via code-based implementation.

 

 

Import the RFC/BOR Interface

To import the RFC/BOR Interface, right-click Data Model and choose ImportRFC/BOR Interface. This opens the first step of the wizard Create Entity Type from Data Source.

 

 

Create Entity Type from Data Source Wizard

The entity type and entity set usually have to be renamed after the import of an interface of an RFC function module. This is because the generator doesn’t take the name of the entity type that has been chosen in the first screen. The reason for this behavior is that the wizard allows you to import several interfaces at once. The first screen, however, only allows you to choose one name.

 

 

RFC/BOR Operations Mapping

In principle, service implementation by mapping can be performed before the runtime artifacts have been generated.

 

When mapping data sources for service implementation, the following data source attributes are available:

 

 

Propose Mapping

Use Propose Mapping to automatically generate and display the available mapping relations between the properties of the entity set and the parameters of the data source.

 

 

Mapping $top

Several query options can be supported if they are being mapped in the service implementation. To map $top in the Data Source Parameter view on the right, expand the Max Rows node. Select BAPIMAXROW and choose Set/Unset Max Hits.

 

 

Mapping $filter — GetEntitySet (Query)

To map $filter, you need to create an input parameter and map it with a range table. You do this by following these steps:

  1. Choose Append Row.
  2. In the Entity Set field property, enter SoId by using the value help.
  3. Click and drag the Data Source ParameterSELPARAMSOID on the right to the Data Source Parameter field of the new table entry on the left.

Please note the icon that indicates that there is a mapping for a range table. Also note the different mapping directions.

 

Mapping GetEntity (Read)

The read method needs to be mapped to a different RFC function module. From the context menu of the GetEntity (Read) method entry, choose Map to Data Source. In the dialog box that opens, select the Remote Function Call data source type and enter the name of the RFC function module. In this case, enter BAPI_EPM_SO_GET_DETAIL to get the details of the sales order.