2010 Jan 25 12:31 PM
Hello,
How to run 3 Instances of a classes (i.e objects are created) at the same time , all 3 are independent on each other.
Parallel processing?
Rgds,
Ö
2010 Jan 25 2:55 PM
Hello,
you can have as many instances as you want:
DATA: lo_obj1 TYPE REF TO ZCL_ANY_CLASS,
lo_obj2 TYPE REF TO ZCL_ANY_CLASS,
lo_obj3 TYPE REF TO ZCL_ANY_CLASS.
CREATE OBJECT lo_obj1.
CREATE OBJECT lo_obj2.
CREATE OBJECT lo_obj3.
CALL METHOD lo_obj1->do_something.
CALL METHOD lo_obj2->do_the_same.
CALL METHOD lo_obj3->do_something_else.
Or is your question about parallel processing, i.e. multi-threading?
Best regards
David
Hello,
How to run 3 Instances of a classes (i.e objects are created) at the same time , all 3 are independent on each other.
Parallel processing?
Rgds,
Ö
2010 Jan 25 2:55 PM
Hello,
you can have as many instances as you want:
DATA: lo_obj1 TYPE REF TO ZCL_ANY_CLASS,
lo_obj2 TYPE REF TO ZCL_ANY_CLASS,
lo_obj3 TYPE REF TO ZCL_ANY_CLASS.
CREATE OBJECT lo_obj1.
CREATE OBJECT lo_obj2.
CREATE OBJECT lo_obj3.
CALL METHOD lo_obj1->do_something.
CALL METHOD lo_obj2->do_the_same.
CALL METHOD lo_obj3->do_something_else.
Or is your question about parallel processing, i.e. multi-threading?
Best regards
David
2010 Jan 26 9:21 AM
Hi David,
Thanks your reply.
CALL METHOD lo_obj1->do_something.
CALL METHOD lo_obj2->do_the_same.
CALL METHOD lo_obj3->do_something_else.
This i am doign currently already, what i want to achieve is to call method of obj2 with out waiting for the method of Object one to be completed (as eahc object is independent of what they do).
Yes, i am more for Multi Threading , how do i implement the same.
Regds,
Ö
2010 Jan 26 9:21 AM
Hi David,
Thanks your reply.
CALL METHOD lo_obj1->do_something.
CALL METHOD lo_obj2->do_the_same.
CALL METHOD lo_obj3->do_something_else.
This i am doing currently already, what i want to achieve is to call method of obj2 with out waiting for the method of Object one to be completed (as each object is independent of what they do).
Yes, i am more for Multi Threading , how do i implement the same.
Regds,
Ö
Edited by: One Family on Jan 26, 2010 4:22 AM
2010 Jan 26 9:28 AM
Hello,
please refer to this [thread|http://forums.sdn.sap.com/click.jspa?searchID=37566999&messageID=8625569].
Regards
David
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |