Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to pass Object references to Remote Function Module

Former Member
0 Likes
1,359

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

1 REPLY 1
Read only

Sandra_Rossi
Active Contributor
0 Likes
602

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