Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

How can I use parallel processing in ABAP?

$
0
0

Hello everyone,

 

I am experiencing some difficulties in the implementation of a function to use under parallel processing.
Here's what I have:

 

  1. Function Group created;
  2. Function Module created;
    1. Attributes: Normal Function Module;
    2. Import: Variables that I want to process internally ("Associated Type": ANY; "Pass Value" selected);
    3. Export: Variables that I want to retrieve their values ("Pass Value" selected);
    4. Source Code: implementation of the function using the Import Variables and assigning them to Export Variables.
  3. 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!


Viewing all articles
Browse latest Browse all 8332

Trending Articles