With ABAP construction STARTING NEW TASK I can start a separate task running independently of the current, e.g. for batch execution.
I would like to hand over an Object instance RFC functions don’t accept these kind of parameters. Is there somebody out there who wanted to pass over an object instance too and found a workaround to this?
Today my workaround is to pass structured data and re-create the objects inside module, so I do the “marshalling” by hand.
Perhaps there is a nicer way to to that? Or can I run methods of object instance in a separate background task?
P.S. I am using SAP R3 4.6C
In 4.6C, there’s no solution to pass an instance to an RFC-enabled function module. It’s only possible to re-instantiate it from scratch inside the function module.
But from ABAP 6.20, it’s possible to serialize an instance to a
STRINGorXSTRINGvariable, by including the interfaceIF_SERIALIZABLE_OBJECTin the instance class, and by calling theIDtransformation viaCALL TRANSFORMATION, as explained in this part of the ABAP documentation:This way, you may pass the serialized instance to the RFC-enabled function module, via a parameter of type
STRINGorXSTRING.