‎2009 Jun 22 9:33 PM
Hi Frnds,
I have a requirement where in I need to call a FM which executes 'VA02' BDC in some user exit.
Since this has to be executed after the commit work is executed in the calling program i am using the background mode.
something like below,
CALL FUNCTION 'Z_SD_AVAILABILITY_CHECK_BDC'
IN BACKGROUND TASK
DESTINATION 'NONE'
TABLES
t_vbap = xvbap.
This above FM is RFC enabled.
And this FM is also called successfully and VA02 is executed without any error. But the FM's session does not get killed after its executed completly. Instead it creates another session of the same FM and executes the BDC again. This is goion on and on and multiple sessions are created at the end.
Am I missing something here? Do I have to include the Performing RETURN_INFO ON END OF TASK also?
Please give ur suggestions.
regards,
Karthick C
‎2009 Jun 22 10:19 PM
Hi,
Check the SM58 to see how many calls are there. It might be that the function is called multiple times every time the user exit is triggered. So put a break point in the user exit and check that the function is actually only called once per transaction.
As the SAP help says that the calls are stored in the tables ARFCSSTATE and ARFCSDATA, it might be worth checking the entries of this table for the function calls before the transaction commit work is executed. See [here|http://help.sap.com/saphelp_nw04/helpdata/en/8e/d05f3ce4dd3370e10000000a114084/frameset.htm]
regards,
Advait
Edited by: Advait Gode on Jun 22, 2009 11:19 PM
‎2009 Jun 22 10:19 PM
Hi,
Check the SM58 to see how many calls are there. It might be that the function is called multiple times every time the user exit is triggered. So put a break point in the user exit and check that the function is actually only called once per transaction.
As the SAP help says that the calls are stored in the tables ARFCSSTATE and ARFCSDATA, it might be worth checking the entries of this table for the function calls before the transaction commit work is executed. See [here|http://help.sap.com/saphelp_nw04/helpdata/en/8e/d05f3ce4dd3370e10000000a114084/frameset.htm]
regards,
Advait
Edited by: Advait Gode on Jun 22, 2009 11:19 PM
‎2009 Aug 13 7:40 AM
Hi Karthick
Was your BDC a call transaction or session method ?
‎2009 Aug 13 12:49 PM
hi
I have a requirement same as Karthick C except that instead of VA01 i have QM01 tcocde
Bt notification is not getting created if I use Call FM in background task
Pls help