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: 

What is the use of CALL FUNCTION MODULE - AT BACKGROUND TASK?

Former Member
0 Kudos
912

Hi experts,

I found Call functional module in background task will make the FM run at the next commit work as some people said. So I have some questions:

1 if we use COMMIT WORK commend, the pending FM will be called? If there are several FMs called at background task, what is the sequence of them? How many conditions will trigger the running of these FMs?

2 Where can I find the log of this pending FMs? In SAP library, it says there are 2 tables. But I checked these tables and can only find the FM name and user of it. And I can not understand content of these tables. It seems one is for the main information of FM, and the other is for the data of the FM, maybe the parameters.

3 If I call a FM in this way, Can I canncel it before the next commit work in some way?

Finally, thanks for reading and help.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
77

HI,

When the COMMIT WORK statement is executed, the function modules registered for the current SAP-LUW are started in the order in which they were registered. ROLLBACK WORK deletes all previous registrations for the current SAP-LUW.

If the specified destination is not available when COMMIT WORK is executed, an executable program called RSARFCSE is started in background processing. By default, this tries to start the function modules registered for a SAP-LUW in their destination every 15 minutes and up to 30 times. These parameters can be changed in the transaction SM59. If the destination does not become available within the defined time, it is recorded in the database table ARFCSDATA as the entry "CPICERR". The entry in the database table ARFCSSTATE is deleted after a standard period of eight days

3 REPLIES 3

Former Member
0 Kudos
78

HI,

When the COMMIT WORK statement is executed, the function modules registered for the current SAP-LUW are started in the order in which they were registered. ROLLBACK WORK deletes all previous registrations for the current SAP-LUW.

If the specified destination is not available when COMMIT WORK is executed, an executable program called RSARFCSE is started in background processing. By default, this tries to start the function modules registered for a SAP-LUW in their destination every 15 minutes and up to 30 times. These parameters can be changed in the transaction SM59. If the destination does not become available within the defined time, it is recorded in the database table ARFCSDATA as the entry "CPICERR". The entry in the database table ARFCSSTATE is deleted after a standard period of eight days

0 Kudos
77

Thanks, some of them from HELP, I already read it. I have the question, Can I un-register the FM in a LUW before the next COMMIT WORK?

Former Member
0 Kudos
77

I found the answers.

As library, we can use ROLLBACK WORK to canncel the registered FM in background task. The sequence of the FMs that will be executed is according to the sequence they are called. And we can use some method to get and change the sequence. Refer to The library.

[http://help.sap.com/saphelp_nw04/helpdata/en/22/042585488911d189490000e829fbbd/content.htm]

Edited by: YICHAO SUN on Dec 20, 2010 4:27 AM