Hello everyone,
I am experiencing some difficulties in the implementation of a function to use under parallel processing.
Here's what I have:
- Function Group created;
- Function Module created;
- Attributes: Normal Function Module;
- Import: Variables that I want to process internally ("Associated Type": ANY; "Pass Value" selected);
- Export: Variables that I want to retrieve their values ("Pass Value" selected);
- Source Code: implementation of the function using the Import Variables and assigning them to Export Variables.
- Program in ABAP created as follows:
LOOP AT i_tab INTO aux_tab.
index = sy-tabix.
CONCATENATE 'Task' index INTO taskname.
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...
ENDLOOP.
FORM receive_results
USING
taskname.
RECEIVE RESULTS FROM FUNCTION 'Z_FUNCTION'
IMPORTING
var3 = var3, and so on...
ENDFORM.
If I don't use the "RECEIVE RESULTS FROM..." function, everything works (except for the fact that I don't receive the value of 'var3'). However, when I use such function, I receive this error: CALL_FUNCTION_REMOTE_ERROR (short text: "The function module 'Z_FUNCTION' cannot be used for 'remote' calls.").
Even if I don't use generic types for the import variables and check the "Remote-Enabled Module" option I still get errors, but this time they don't have anything to do directly to my code.
Thank you so much in advance!