Application Development and Automation 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: 
Read only

Threading in ABAP OO

Former Member
0 Likes
1,367

Can I define synchronized method in ABAP class similar to one in Java (I mean method available to different threads subsequently but not simultaneously)?

If there's no real threading in ABAP OO how such behavior can be simulated?

Thanks,

Yacov

1 ACCEPTED SOLUTION
Read only

ssimsekler
Product and Topic Expert
Product and Topic Expert
0 Likes
963

Hi Yacov

I guess you need some parallel processing. OO method call does not support this. However, you can achieve this by calling function modules at background or starting new tasks (<b>CALL FUNCTION STARTING NEW TASK IN DESTINATION GROUP, WAIT, and RECEIVE keywords</b>). To do this in OO context, call functions via one of these ways within your methods i.e. wrap them with your methods.

For more information, inspect the following links:

<a href="http://help.sap.com/saphelp_47x200/helpdata/en/fa/096ff6543b11d1898e0000e8322d00/frameset.htm">Parallel-Processing Function Modules</a>

<a href="http://help.sap.com/saphelp_47x200/helpdata/en/a5/63235f43a211d189410000e829fbbd/frameset.htm">Background Processing</a>

*--Serdar

Hi Yacov

I guess you need some parallel processing. OO method call does not support this. However, you can achieve this by calling function modules at background or starting new tasks (<b>CALL FUNCTION STARTING NEW TASK IN DESTINATION GROUP, WAIT, and RECEIVE keywords</b>). To do this in OO context, call functions via one of these ways within your methods i.e. wrap them with your methods.

For more information, inspect the following links:

<a href="http://help.sap.com/saphelp_47x200/helpdata/en/fa/096ff6543b11d1898e0000e8322d00/frameset.htm">Parallel-Processing Function Modules</a>

<a href="http://help.sap.com/saphelp_47x200/helpdata/en/a5/63235f43a211d189410000e829fbbd/frameset.htm">Background Processing</a>

*--Serdar

2 REPLIES 2
Read only

ssimsekler
Product and Topic Expert
Product and Topic Expert
0 Likes
964

Hi Yacov

I guess you need some parallel processing. OO method call does not support this. However, you can achieve this by calling function modules at background or starting new tasks (<b>CALL FUNCTION STARTING NEW TASK IN DESTINATION GROUP, WAIT, and RECEIVE keywords</b>). To do this in OO context, call functions via one of these ways within your methods i.e. wrap them with your methods.

For more information, inspect the following links:

<a href="http://help.sap.com/saphelp_47x200/helpdata/en/fa/096ff6543b11d1898e0000e8322d00/frameset.htm">Parallel-Processing Function Modules</a>

<a href="http://help.sap.com/saphelp_47x200/helpdata/en/a5/63235f43a211d189410000e829fbbd/frameset.htm">Background Processing</a>

*--Serdar

Read only

Former Member
0 Likes
963

Hi Yacov,

Use Update Function module.

Creation: From attributes tab of function module select the option UPDATE FUNCTION.

Syntax: CALL FUNCTION <FUNCTION NAME> IN UPDATE TASK

TABLES

<paratable 1 = tablename 1>

......

<paratable n = tablename n> .

COMMIT WORK.

Limitations:

1. Import, Export and Change parameters are not allowed. All the data should be passed using Table parameter.

2. All the runtime expections should be handled manually otherwise session will terminate.

3. COMMIT statement should not used in Function module.

Debugging: Update functions can't debugged as ordinary ABAP programs or functions. Select the option Update Debugging from setting option of debugging screen.

Have a nice day

Venkat