Once you switched your FM to RFC enabled, add an exception like NODATA to the FM to raise an error if no data read and add some code like
* Call CALL FUNCTION 'Z_FUNCTION' STARTING NEW TASK taskname DESTINATION IN GROUP DEFAULT PERFORMING receive_results ON END OF TASK EXPORTING var1 = var1 var2 = var2 " , and so on... EXCEPTIONS communication_failure = 1 system_failure = 2 resource_failure = 3. * Receive RECEIVE RESULTS FROM FUNCTION 'Z_FUNCTION' IMPORTING var3 = var3 " and so on... EXCEPTIONS nodata = 1.
And manage the exceptions in the program (Like not submitting more call than available process, look at FM like SPBT_INITIALIZE and other FMs of group SPBT)
Regards,
Raymond