‎2011 Sep 14 8:20 PM
Halo Experts,
I am working on an Perfomance Optimization project . I am trying to optimize the program by scehduling the individual methods inside the program via asynchronous function modules . By this way I can run this independent methods parallely ( and not sequentailly) . for eg
if the program has
me->m1( ).
me->m2( ).
me->m3( )
if m2 and m3 are independent of each other I schedule them parallely by
CALL FUNCTION 'ZM2'
STARTING NEW TASK 'FUNC1'
DESTINATION 'NONE'
CALLING ZCLASS=>set_flag_4_m2 ON END OF TASK.
CALL FUNCTION 'ZM3'
STARTING NEW TASK 'FUNC2'
DESTINATION 'NONE'
CALLING ZCLASS=>set_flag_4_m3 ON END OF TASK.
WAIT UNTIL l_m2_flag = 'X' AND
l_m3_flag = 'X'.
Now the problem is methods m2 and m3 are having lot of local methods which is not available in FM ZM2 and ZM3 . I am not able to pass the instance of the class ZCLASS also to this FMs( as type ref to is not allowed in Remote Function Module ).
I also tried to do with shared memory area . When I tried that it says shared memory area tick is not possible for classes with event handler methods.
Do I have any option to pass the instance ZCLASS to Asynchronous RFM ?
Regards
Arshad
‎2011 Sep 14 8:40 PM
Hi,
you may try to serialize/deserialize the instance (CALL TRANSFORMATION with the ID transformation), by defining IF_SERIALIZABLE_OBJECT interface at the class level, and you pass the serialized (x)string to the RFC-enabled function module.
Best regards,
Sandra