Connect SAPJCo form – Completing the Method tab

Identify the parameters and return value of the method to be called. Use a Map from mapping for the parameters and a Map to mapping for the return value.

Important: Connect SAPJco rules are no longer being actively developed. To avoid upgrade issues when these rules are deprecated, use other web-based SAP capabilities.
Field Description
Parameters Order the entries in this array to match the method signature — the types and order of method parameters.
Data type Enter a Java data type for each parameter.
Map from Select how the system creates the request parameter values. The choice you make for this field depends on the Data type:
  • Clipboard — The system maps the data value to the scalar property specified in the Map from key field.
  • Constant — The system sends a fixed value.
  • HTML Stream — The system composes a stream of HTML text formatted according to an HTML rule.
  • XML Stream — The system composes a stream of XML text formatted according to an XML rule.

If more choices appear, they identify a custom function rule in a MapFrom library. Review the function rule to determine what it does.

Map from key Enter a source for the Map From value:
  • If you map from Clipboard, enter the property name from which the data is to be mapped. This data is passed by value; the external Java code may change the value of a property passed as input, but the updated value is not automatically or visible. Only properties listed in the Return Value array contain results.
  • If you map from Constant, enter a literal text string. To include blank spaces in your text string, surround the string with double quotation marks.
  • If you map from HTML Stream, enter the Stream Name key part of HTML rule that is to generate the data. The system uses the Applies To class of this Connect Java rule as the Applies To class of the HTML rule.
  • If you map from XML Stream, enter the Stream Name key part of XML rule that is to generate the data. The system uses the Applies To class of this Connect Java rule as the Applies To class of the XML Stream rule.
  • If you map from a Rule-Utility-Function from a MapFrom library, either select the property that holds the value to be processed by the function or leave this field blank, as appropriate for the function.
Return value  
Data type Enter the external Java data type of the return value, or void. Both primitive Java types ( int, boolean, char, String, and so on) and arrays of primitive types are supported.

You can map complex return values. For example, the return value may have data type:

com.sun.j2ee.blueprints.shoppingcart.cart.model.ShoppingCartModel
Map to Select how the system creates the response parameter values. The choice you make for this field depends on the Data Type.
  • Clipboard — Maps the data value from the scalar property specified by the Map to key.
  • XML ParseRule — Indicates that the incoming data value is a stream of XML, to be parsed using the data mappings specified in a rule of the Rule-Parse-XML rule type.
  • Delimited ParseRule — Indicates that the incoming data value is a text value to be parsed with a Parse Delimited rule.
  • Structured ParseRule — Indicates that the incoming data value is a text value to be parsed with a Parse Structured rule.

If more choices appear, they identify a custom function rule in a MapTo library. Review the function rule to determine what it does.

Map to key Identify a destination for the Map to value:
  • If you map to Clipboard, enter a destination property reference.
  • If you map to XML ParseRule, enter the Namespace name (second key part) and the Element Name name — third key part — of the appropriate Parse XML rule. Separate the Namespace from the Element Name with a space. That is, use the syntax "NamespaceName ElementName". The system uses the Applies To class of this connector rule as the first key part of the parse rule.

    To maintain backward compatibility for connector rules created in releases before PRPC Version 5.2, you can specify a data mapping with only a Namespace value. In that case, the system at runtime determines the Element Name key from the root element of the incoming XML document. However, this mapping works only if the Parser Type of the Parse XML rule is set to DOM and validation is not enabled. As a best practice, specify both the Namespace Name and the Element Name of the rule.

  • If you map to a Delimited ParseRule, enter the Namespace key part, a period, and the Record Type key part of the Parse Delimited rule that the system is to use to parse the data in the Map to key field. The system uses the Applies To class of this Connect Java rule as the Applies To class of the parse rule.
  • If you map to a Structured ParseRule, enter the Record Type key part of the Parse Structured rule that the system is to use to parse the data in the Map to key field. The system uses the Applies To class of this Connect Java rule as the Applies To class of the parse rule.
  • If you map to a Rule-Utility-Function function from a MapTo library, either select a property to hold the results of the function or leave this field blank, as appropriate for the function.