What the CRfcFunction Class Represents 

The CRfcFunction Class directly corresponds to remotely callable function modules. For each remotely callable function, an instance of a CRfcFunction-derived class (whether CRfcClientFunc or CRfcServerFunc) can be created. The instance then acts as a container for all parameters required for its function. It packs and unpacks parameter values to process RFC calls.

The CRfcFunction class keeps as its data members three lists:

It also keeps two references: one to a CRfcConnection object that keeps a live connection to R/3, and another to a string to store the function name.

No parameter object is contained in the function object immediately after it is created. The user of the function object is required to create all parameter objects needed by the function, and to provide their pointers to the function object. The function object then adds these to its appropriate parameter lists.

Note that a function object only keeps records of parameter object pointers in its lists. The function object is not responsible for creating and destroying the parameter objects. When the function object is destroyed, the object pointers stored in its lists are simply purged from memory. The actual destruction of these parameter objects is up to the user. The same is true for the connection object pointer stored in the function object.