Special support for RFC_READ_TABLE using Virtual Fields activity

Support for RFC_READ_TABLE is available through the Document Open event Virtual Fields activity. To activate this functionality, you need a properly formatted connection document. An example is shown in the exactly like that used in the example in the "Special support for RFC_READ_TABLE Using Direct Transfer activity" section.

The object of a Virtual Fields activity is to match a key that you have in a Domino document with the data that you want from ECC. You want only a single record back. The only way to control the data that comes back from RFC_READ_TABLE is by entering values into the OPTIONS table of the call. The column TEXT in this table can contain query strings to uniquely identify the data that you want. However, there are issues that must be addressed.

Assume that you have used a Direct Transfer activity to provide documents containing only the key(s) to the information that you want. In this example, KUNNR, which is the customer number, is a key that uniquely returns a single customer. However, in this case, OPTIONSTEXT must be "KUNNR LIKE ‘00023456’". As when you used a Direct Transfer activity to initialize the key, ECC yields only 00023456 as a customer number. You must process this value to make it match the format that OPTIONTEXT expects.

You can use an agent in your target Domino database to perform this formatting task. A sample is shown below.

FIELD KUNNR := "KUNNR LIKE \'" + KUNNR + "\'"

Run this on the documents in your Domino database to yield valid inputs for table OPTIONS column TEXT. If you did not want to alter KUNNR, you could place the key in a hidden field KUNNR_KEY.

Once you have a valid key, you can determine the fields to be read from your table. Do this by creating a field in your key document that contains the desired list of the fields. Make a text field and enter the column names, separated by commas (no spaces). This field will then be mapped to the OPIONSTEXT field during field mapping. The underlying functionality parses out the columns and sets up table FIELDS correctly.



Notice that the field KUNNR, which was updated with the agent , is mapped to OPTIONSTEXT and that a field containing the desired list of fields is mapped to FIELDSFIELDNAME. Also notice that the External Data Source Table Name is *, which allows mapping to/from all tables.

To update the field in your Domino document to contain the desired fields, modify the agent that updated the KUNNR field as follows:
FIELD KUNNR := "KUNNR LIKE \’" + KUNNR + "\’";
FIELD READTABLEFIELDS := "STRAS,ORT01"

Your agent will update your key document so that it is ready for what you need to pass to RFC_READ_TABLE. It will also get the fields (STRAS,ORT01) that you want for the specified key (KUNNR).