Application Development 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: 

"asynchronous method call"

ChristianFi
Active Participant
0 Kudos

Dear all,

I am writing a program for which I would like to enable parallel processing. As the programm is designed in classes and methods, I thought it would be nice and consistent to use methods calls instead of asynchronous function calls. I found a class for remote method calls but this does not appear asynchronous.

Any idea if it is possible?

Thanks

Christian

3 REPLIES 3

nablan_umar
Active Contributor
0 Kudos

Chris,

You can do parallel processing by calling a function module.

Program A

Call function module B starting new task 'NEWTASK'

exporting

param1 = param1

exceptions

communication_failure = 1

system_failure = 2.

0 Kudos

Yes I know,

but the question was if there is something similar for method calls. (the reason why I ask is that I do not want to encapsulate the development in fm (which would be neceassary (or perform some weird call back scenario).

Thanks for the input anyway.

Christian

0 Kudos

Hi,

Perhaps a way to accomplish this is to create an OO transaction in SE93. Take a look at http://help.sap.com/saphelp_nw04/helpdata/en/a8/485d60cf4611d4b2e90050dadfb92b/frameset.htm for further details.

You can then issue the statement CALL TRANSACTION <tcode> UPDATE 'A' (for asynchronous), or as suggested in one of previous discussions, use


CALL FUNCTION 'ABAP4_CALL_TRANSACTION' STARTING NEW TASK 'TEST' 
  DESTINATION 'NONE' 
  EXPORTING 
      TCODE = <your_oo_tcode> 
  EXCEPTIONS 
    COMMUNICATION_FAILURE = 1 MESSAGE MSG_TEXT 
    SYSTEM_FAILURE        = 2 MESSAGE MSG_TEXT.

You can also look at ABAP Object Services, especially Transaction Service, at http://help.sap.com/saphelp_nw04/helpdata/en/ab/9d0a3ad259cd58e10000000a11402f/frameset.htm.

Hope this helps.