A function is an SAP Replication Server object that represents a data server operation, such as insert, delete, and begin transaction.
In order to operate in a heterogeneous database environment, SAP Replication Server differentiates database commands from the functions it uses to distribute data server requests to other sites. SAP Replication Server uses function strings to convert functions into data-server-specific commands. A function string is a template that SAP Replication Server uses to generate a command the data server can interpret as a transaction-control directive or data-modification instruction.
A function-string class is the set of all function strings used with a database. Function-string classes are provided for SAP ASE and DB2 data servers. Function strings for transaction control directives are defined just once for each function-string class. Function strings to insert a row, delete a row, or update a row are defined once for each replicated table in a database.
A function string can contain variables—identifiers enclosed in question marks (?)—that represent the values of columns, procedure parameters, system-defined information, and user-defined variables. SAP Replication Server replaces the variables with actual values before sending the function strings to the data server.
Function strings can be used to generate either Remote Procedure Call (RPC) or database commands such as SQL statements, depending on their format. An RPC-formatted function string contains a remote procedure call followed by a list of data parameters. Embedded variables can be used to assign runtime values to the parameters. SAP Replication Server interprets RPC function strings, builds a remote procedure call, and replaces the variables with runtime data values. An RPC can execute a registered procedure in an SAP® Open Server™ gateway to a data server or a stored procedure in an SAP ASE.
A language-formatted function string passes a database command to the data server. SAP Replication Server does not attempt to interpret the string, except to replace embedded variables with runtime data values. For example, several relational database servers use the SQL database language. A SQL command should be represented as a language function string.
RPC function strings can be more efficient than language function strings because the network packets sent from SAP Replication Server are more compact.
create connection to db2.subsys using profile rs_ase_to_db2;v9_1 set username to db2_maint set password to db2_maint_pwd set dsi_cmd_batch_size to ‘16384’