Setting Parameter Values 

Before calling an RFC function, you must set export and table parameter values. Depending on the ABAP function definition, you may not have to use all the formal variables specified in the interface. If you don’t specify a value for a parameter, it is not sent with the call.

If the control cannot convert between ABAP data types and your variable data types, it sends an error message as soon as you fill the parameter.

For information about handling export and import parameters, see Using Parameter and Structure Objects.

For information about handling table parameters, see Viewing Table Objects.

Handling parameter objects

RFC objects "depend" on the parent object that contains them. If you assign the object to an object variable, the variable shares the object with the containing parent object.

After the statement

Set ObjVar = FunctionsOCX ("RFC_PING")

ObjVar and FunctionsOCX ("RFC_PING") point to the same object. This is important because if you remove the object (or its parent) from the relevant collection, you invalidate the contents of the object variable.

In this example, if you remove Funct1 from its Functions collection, the variable ObjVar becomes invalid.

There are two exceptions to this rule:

Both of these become independent of the containing Function object. By contrast, you cannot detach Export/Import objects in this way. In addition, Table objects that are simply assigned (rather than unloaded) to a variable also remain shared.

Table and Structure objects are always independent of the Function objects when a remote function is called directly because there is no Function object created externally.