Additional Blogs by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

Introduction

In SAP NetWeaver Process Integration (PI) 7.1, there is now graphical support for JDBC and RFC mapping lookups in message mappings, instead of having to create a user-defined function with the relevant lookup code as in previous releases (e.g. XI 3.0/PI 7.0). This new feature significantly facilitates the creation of such mapping lookups and allows the PI developer to allocate his/her time to other mapping requirements.

 

Defining JDBC Lookups Graphically

Prerequisites

  • The JDBC channel to be used for the lookup must be configured and activated in the Integration Directory.
  • The definition of the table used for the lookup must already be imported into the ES Repository as an external definition (see the SAP PI 7.1 Mapping Enhancements Series: Import SQL Table's Metadata blog within this series by William Li for details).

Procedure

The first step in setting up a JDBC lookup graphically is to create a message mapping parameter within the Signature tab (for more information on parameters, see the related blog in this series SAP PI 7.1 Mapping Enhancements Series: Parameterized Message Mappings). The parameter should be an 'Import' parameter and have Category 'Adapter'and Type 'JDBC'.

Once the parameter is defined, you can proceed with defining the JDBC lookup in the target field mapping within the mapping definition. The JDBC Lookup standard function can be found among the functions in the Conversions category.

After the JDBC Lookup function is inserted into the data-flow editor of the mapping, bring up the properties for the function by selecting 'Properties' from the context menu or simply double-clicking on the function. This is where the SELECT statement can be defined graphically.

Within the properties:

  • Select the parameter to be used for the lookup. The parameter is maintained within the Signature tab as shown above. The name of the actual communication channel used for the lookup will be the value for this parameter.
  • Select the relevant external definition that corresponds to the table definition (see prerequisites). Note that, currently, the external definition must be located in the same SWCV as the mapping (of course, usage dependencies can be configured to allow for an external definition located within an external SWCV).
  • Move all fields to the left that should be used for reading a row in the database table (e.g. corresponds to the where clause in a SELECT statement. Source fields or results values from other functions must provide the input to these fields.
  • Move all fields to the right that should return a result from the SELECT statement. These results returned to these fields can then be processed further in the mapping.

And there you have it! The JDBC lookup setup is complete.

 

Defining RFC Lookups Graphically

Prerequisites

  • The RFC channel to be used for the lookup must be configured and activated in the Integration Directory.
  • The definition of the RFC structure used for the lookup must already be imported into the ES Repository as an imported archive.

Procedure

In procedure for setting up an RFC lookup graphically is very similar to the procedure for the JDBC lookup:

  • A message mapping parameter must be created within the Signature tab. It should be an 'Import' parameter and have Category 'Adapter'and Type 'RFC'.
  • Once the parameter is defined, you can proceed with defining the RFC lookup in the target field mapping within the mapping definition. The RFC Lookup standard function can be found among the functions in the Conversions category.

As one might suspect, the key differences reside in setting the properties for the RFC Lookup function itself.

  • Select the parameter to be used for the lookup. The parameter is maintained within the Signature tab as shown above. The name of the actual communication channel used for the lookup will be the value for this parameter.
  • Select the relevant RFC function module that will be used for the lookup. Only RFCs already imported as an Imported Object will be listed.
  • The left column represents the RFC Request message. All fields to be used as input for the request should be selected (double-click). The fields selected for the request will be displayed in the bottom left box.
  • The right column represents the RFC Response message. All fields to be used capture the response and further applied in the mapping should be selected (double-click). The fields selected for the response will be displayed in the bottom right box.

Now the RFC lookup setup is complete.

Testing

Testing Locally

When testing a message mapping (or operation mappinp) that contains parameters locally, there is a new Parameters tab that must be completed in order to execute the test.

Testing at Runtime

Runtime execution of parameterized mappings requires values to be set at configuration time in the Integration Directory using an interface determination (see the related blog in this series SAP PI 7.1 Mapping Enhancements Series: Parameterized Message Mappings). For JDBC and RFC lookups, the actual channel to be used for the lookup must be configured in the interface determination.

13 Comments