Start of Content Area

Procedure documentation Using Java Functions of Function Libraries  Locate the document in its SAP Library structure

Use

You want to use Java functions of a function library within a message mapping or a mapping template. Since the procedure is the same for message mappings and mapping templates, the following description only refers to message mappings, but the statements apply equally to mapping templates.

Prerequisites

The function library is in the same software component version as the message mapping in which you want to use the functions of the function library, or in an underlying version. There is already a corresponding function library and a corresponding message mapping in the Enterprise Services Repository.

You have loaded a source structure and a target structure to the structure overview  of the mapping editor.

Procedure

...

       1.      The table for selecting function libraries is on the left side of the data-flow editor. If it is not visible, choose Display Function Libraries Used (This graphic is explained in the accompanying text) on the left.

       2.      To add a function library to the table, proceed as follows:

                            a.      First, insert a new table line.

                            b.      Either use the input help in the Function Librarycolumn of the new line to select a function library, or use drag and drop to select a function library from the navigation tree in the ES Builder and drag it to the table.

                            c.      Enter an instance name for each function library. In this way, you can use a function library more than once in a message mapping if you need different object instances of the class belonging to the function library.

       3.      Save your changes.

Result

The functions of the function library entered in the mapping editor appear in the data-flow editor (either in one of the standard function categories assigned to the function or in a new function category that has been introduced in the function library). The title of the function is made up as follows:

Function Names in the Data-Flow Editor

Function Library Where Function is Defined

Function Name

Local function library

local.<Title of the function>

Independent function library

<Instance name>.<Title of the function>

Note

If you use multiple function libraries in a message mapping, there are several Java area Attributes and Methods, and several init()and cleanUp() methods. The mapping runtime executes this source text at the beginning or end of the message mapping in the sequence in which you have entered the corresponding function libraries in the table for using the libraries. See also: Function Overview and Function Properties

 

 

 

 

 

End of Content Area