The SAP RFC Editor is used to edit the Remote Function Call that will be sent to the SAP server.

To open the SAP RFC Editor, double click on it from the Rhapsody SAP Configuration Editor. Alternatively, select the Remote Function Call and then click the Edit RFC icon  from the RFC Toolbar. The SAP RFC Editor is then displayed:

The SAP RFC Editor consists of the following key sections:

Section Description
RFC Name The name of the Remote Function Call that will be executed.
Input Parameters Tab Selects message fields or message properties to be mapped to the input parameters of the Remote Function Call. Refer to Input Parameters for more information.
Output Parameters Tab Selects the output parameter results of the Remote Function Call to be mapped to message fields or message properties, or appended to the message. Refer to Output Parameters for more information.
Input Tables Tab Selects the input tables to be read from an IDoc message to send in the Remote Function Call. Refer to Input Tables for more information.
Output Tables Tab Selects how to use the output tables results of the Remote Function call. Refer to Output Tables for more information.
SAP RFC Explorer Displays Remote Function Calls that match the search criteria. Refer to SAP RFC Explorer for more information.
Message Structure Displays the messages structure. This allows easy reference to the message definition and enables you to drag and drop message fields into your Remote Function Call. Refer to Loading Message Definitions for more information.

SAP RFC Explorer

The SAP RFC Explorer enables the SAP server to be searched for Remote Function Calls:

The following steps detail how to select an Remote Function Call for this configuration.

  1. Enter the name, or part of the name, of the Remote Function Call that you would like to use, and click the Search button.
  2. The SAP RFC Explorer will connect to the SAP server and get all the results that match your search term. While this search is running a dialog will be displayed, as shown in the following diagram.

    The search can be cancelled at any time by clicking the Cancel button on the search dialog.
  3. From the list of search results, double-click on the desired Remote Function Call. This will populate the appropriate fields on the Input Parameters, Output Parameters, Input Tables and Output Tables tabs as appropriate for the selected Remote Function Call.

Input Parameters

The Input Parameters tab, shown in the following diagram, allows message fields or message properties to be mapped to the input parameters of the Remote Function Call.

All of the parameters that are associated with the Remote Function Call are populated from the SAP server. For each parameter, the following options are available.

Option Description
Message Property The parameter will get its value from a message property. If this is chosen, the name of the message property should be entered in the Value field.
Message Field The parameter will get its value from a message field. If this is chosen, the text <Select Field> will be displayed. Clicking this text will display a dialog where a message field can be selected from the messages available in the message definition that is being used. Refer to Loading Message Definitions for more information.
Literal The parameter will get its value from the text that is entered in the Value field.

If no option is selected for a parameter, no value will be sent in the Remote Function Call for that parameter.

Output Parameters

The Output Parameters tab allows message fields or message properties to be populated from the output parameters of the Remote Function Call.


All of the parameters that are associated with the Remote Function Call are populated from the SAP server. Clicking the Add button while a Parameter is selected will add another row for that parameter. Clicking the Remove button while a Parameter is selected will remove that row. For each parameter, the following options are available.

Option Description
Set Message Property Inserts the value of the Parameter into a message property. The name of the message property to insert into should be typed into this field.
Set Message Field

Inserts the value of the Parameter into a message field. Clicking the text <Select Field> displays a dialog, where a message field can be selected from the message definition that is being used:

 

Refer to Loading Message Definitions for more information.

Output Type

Options: No Output, Append As Z Segment, Output As XML

If No Output is selected, nothing will be done with this parameter (although it can still be used to set a message field or property).
If Append As Z Segment is selected, the parameter will be appended to the end of the message as a Z Segment. If this is selected, a valid Z Segment name should be entered in the Z Segment Name field, or if the Default Name For Z Segment field has been filled in, this will be pre-populated. This option is intended to be used with a HL7 message definition.
If Output As XML is selected, the message body will be replaced with XML, and the parameter will be an XML element, where the parameter name will be the element name, and the parameter value will be the text node for that element.

Note that the Append As Z Segment and Output As XML options are mutually exclusive and will result in a configuration error if selected together.

Input Tables

The Input Tables tab allows an IDoc message to be mapped to the input tables of the Remote Function Call:

The following options are available:

Option

Description

Read From IDoc This should be selected if the Table is to be read from the IDoc message body.
Is Control Table This should be selected if the Table should be the control table.

Output Tables

The Output Tables tab allows the output tables of the Remote Function Call to be used to populate the message:

All of the tables that are associated with the Remote Function Call are populated from the SAP server. Clicking the Add button while a Table is selected will add another row for that table. Clicking the Remove button while a Table is selected will remove that row. For each table, the following Output Type options are available:

Output Type Description
No Output This table will not be used to populate the message.
Output As XML If this option is selected, the message body will be replaced with XML, and the contents of the table will be output as XML.
Append As Z Segment If this option is selected, the contents of the table will be appended to the end of the message as Z Segments, with one segment for each row of the table. If this is selected, a valid Z Segment name should be entered in the Z Segment Name field, or if the Default Name For Z Segment field has been filled in, this will be pre-populated. This option is intended to be used with a HL7 message definition.
Map To Field

If this option is selected, the Field and Column columns will appear in the table. This allows a particular column of the output table to be mapped to a message field. Clicking the text <Select Field> displays a dialog, where a message field can be selected from the message definition that is being used:

Refer to Loading Message Definitions for details.

A Column should be selected to map to that field. If more than one column-to-field mapping is required from a single output table, additional Table rows should be generated using the Add button.

Note that the Append As Z Segment and Output As XML options are mutually exclusive and will result in a configuration error if selected together.