Skip to Content
author's profile photo Former Member
Former Member

Parallel Processing through ABAP program

Hi,

We are trying to do the parallel processing through ABAP. As per SAP documentation we are using the CALL FUNCTION STARTING NEW TASK DESTINATION.

We have one Z function Module and as per SAP we are making this Function module (FM)as Remote -enabled module.

In this FM we would like to process data which we get it from internal table and would like to send back the processed data(through internal table) to the main program where we are using CALL FUNCTION STARTING NEW TASK DESTINATION.

Please suggest how to achieve this.

We tried out EXPORT -IMPORT option meaning we used EXPORT internal table in the FM with some memory ID and in the main program using IMPORT internal table with the same memory ID. But this option is not working even though ID and name of the internal table is not working.

Also, SAP documentation says that we can use RECEIVE RESULTS FROM FUNCTION 'RFC_SYSTEM_INFO'

IMPORTING RFCSI_EXPORT = INFO in conjunction with CALL FUNCTION STARTING NEW TASK DESTINATION. Documentation also specifies that "RECEIVE is needed to gather IMPORTING and TABLE returns of an asynchronously executed RFC Function module". But while creating the FM remote-enabled we cant have EXPORT or IMPORT parameters.

Please help !

Thanks in advance

Santosh

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Feb 09, 2005 at 09:15 PM

    HI Rich,

    Thanks for your help. It helped me but I have another question. Is it possible to import internal table through receive ?

    Thanks

    Santosh

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 09, 2005 at 08:54 PM

    <i>We tried out EXPORT -IMPORT option meaning we used EXPORT internal table in the FM with some memory ID and in the main program using IMPORT internal table with the same memory ID. But this option is not working even though ID and name of the internal table is not working</i>

    I think that this is not working because that memory does not work across sessions/tasks. I think that the

    IMPORT FROM SHARED BUFFER and EXPORT TO SHARED BUFFER would work. I have used these in the past and it works pretty good.

    Also,

    here is a quick sample of the "new task" and "recieve" functionality. You can not specify the importing parameters when call the FM. You specify them at the recieving end.

    
    report zrich_0001 .
    
    data: session(1) type c.
    
    data: ccdetail type bapi0002_2.
    
    start-of-selection.
    
    * Call the transaction in another session...control will be stop
    * in calling program and will wait for response from other session
    
      call function 'BAPI_COMPANYCODE_GETDETAIL'
               starting new task 'TEST' destination 'NONE'
                   performing set_session_done on end of task
        exporting
          companycodeid             = '0010'
    * IMPORTING
    *   COMPANYCODE_DETAIL        = ccdetails
    *   COMPANYCODE_ADDRESS       =
    *   RETURN                    =
                .
    * wait here till the other session is done
      wait until session = 'X'.
    
      write:/ ccdetail.
    
    ************************************************************************
    *       FORM SET_session_DONE
    ************************************************************************
    form set_session_done using taskname.
    
    * Receive results into messtab from function.......
    * this will also close the session
      receive results from function 'BAPI_COMPANYCODE_GETDETAIL'
        importing
           companycode_detail        = ccdetail.
    
    * Set session as done.
      session = 'X'.
    
    endform.
    
    

    Hope this helps.

    Rich Heilman

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.