2010 Aug 03 7:02 AM
Hi All,
i'm using trfc for processing FM only in background work process
CALL FUNCTION 'FUNCTION_MODULE' IN BACKGROUND TASK
but when i execute FM it's occupying two work process one is dialog (running current FM )and another one is background( running SAPLERFC) .
so pls suugest me how to avaiod FM to occupy dialog workprocess.
Regards,
Anuj jain
2010 Aug 18 8:20 AM
Thanks Amit and Suhas for your support ....
Now i'm sure that we can't process Any RFC directlly in background work process but can i process any FM (not RFC) in background work process ...like
calling FM inside RFC and call that FM in background work process.
Call RFC in diallog
function.
.
call function FM(nt RFC) in background
.
..
..
endfunction.
will it work????? .....
Regards,
Anuj jain
2010 Aug 10 6:56 AM
2010 Aug 10 7:13 AM
Why do you use the I[N BACKGROUND TASK|http://help.sap.com/abapdocu_70/en/ABAPCALL_FUNCTION_BACKGROUND_TASK.htm] option (start after commit) and not a simpler [STARTING NEW TASK|http://help.sap.com/abapdocu_70/en/ABAPCALL_FUNCTION_STARTING.htm] task
Nevertheless, check via SM59 there are options on destination (default NONE) (in menu) to manage the RSARFCSE report (which contain the call to the FG you mentioned) (number of call, delay, etc.)
Regards,
Raymond
2010 Aug 10 7:31 AM
Thanks Raymond for your reply,
I'm using IN BACKGROUND becoz i want to rum my FM only in background work process,which is not supported in STARTING NEW TASK.
Regards,
Anuj Jain
2010 Aug 10 2:50 PM
Hi,
Create a programa to call the FM and put it on a job, or execute the programa in background..
Regards,
Maria joão Rocha
2010 Aug 12 8:23 AM
As says "Create a programa to call the FM and put it on a job, or execute the programa in background"
I can't use any program for process FM in BKG job....
Regards,
Anuj
2010 Aug 12 8:33 AM
Create a report program, call your FM in this report....and execute this report in the background (or through a scheduled job).
does it not work for you?
2010 Aug 12 8:46 AM
Hi Priyank,
I have to Process FM remotely...so that RFC in background...in this case i cant use any report progam .
Regards,
Anuj
2010 Aug 12 9:00 AM
You cannot call an RFC in a BG work process.
RFC always executes via a Dialog work process. The addition IN BACKGROUND TASK doesn't facilitate the RFC to be executed in a BG process. Read the documentation thoroughly.
Anyways can you elaborate what's your requirement & why you want the RFC to be executed in BG mode ?
2010 Aug 12 9:40 AM
Thanks suhas for your reply,
But as per below link we can process RFC in background job..
http://help.sap.com/saphelp_nw04/helpdata/EN/22/042585488911d189490000e829fbbd/frameset.htm
but my concern is other....as it's occupying both dialog and backgroud work process.
Regards,
Anuj
2010 Aug 17 7:39 AM
Can any one elaborate on background processing in context of my requirement?
Regards,
Anuj jain
2010 Aug 17 9:18 AM
Hi Anuj,
I tried the same scenario here, and below are my comments.
1. When we call the RFC FM in Background Task, then it will occupy DIALOG work process, and not background work process.
2. The second process which you are seeing, i.e. SAPLERFC, that is required by the server to start the RFC. however, this gets displayed only for some time (to start the background task), after that it disappears.
regards,
amit m.
2010 Aug 17 9:28 AM
Thanks Amit for your findings...
But i want to ask what does background task means..
Either it means to start FM in a particular time in Dialog work process OR it means to start FM in a particular time in only BACKground work process.
Regards,
Anuj jain.
2010 Aug 17 9:32 AM
Hi Anuj,
It unfortunately means:
start FM in a particular time in Dialog work process
The BACKGROUND word in abap syntax is misleading.
For true background processing, i.e. background WORK PROCESS (of type BGD in SM50)
ONLY ABAP PROGRAMS or Commands or External Programs
can be run under background work process. (as per SM36)
Here we are trying a function module, which is not supported. This is as per my understanding.
regards,
amit m.
Edited by: Amit Mittal on Aug 17, 2010 2:03 PM
Edited by: Amit Mittal on Aug 17, 2010 2:05 PM
2010 Aug 17 9:42 AM
RFCs always use dialog work process, that's the golden rule for RFCs
BACKGROUND TASK is kind of misnomer. This is used to implement the tRFC (transactional RFC) model. If you read the SAP documentation it's very well documented.
BR,
Suhas
2010 Aug 17 10:05 AM
Hi All,
I'm going to closed this question as i can't find any solution to process my RFC(without report) in background work process (:
Anyway thanks to Amit n suhas for their valuble time.
Regards,
Anuj
2010 Aug 18 8:20 AM
Thanks Amit and Suhas for your support ....
Now i'm sure that we can't process Any RFC directlly in background work process but can i process any FM (not RFC) in background work process ...like
calling FM inside RFC and call that FM in background work process.
Call RFC in diallog
function.
.
call function FM(nt RFC) in background
.
..
..
endfunction.
will it work????? .....
Regards,
Anuj jain
2010 Aug 18 10:02 AM
Hi again,
As per my understanding we cannot do that, even though the FM is normal and not RFC enabled.
Below are my comments.
1. FMs can be CALLED synchronously or asynchronously ONLY. There is no option of background work process. It will work only with dialog work process.
2. For background work process, we NECESSARILY have to use a SEPARATE Z PROGRAM, and inside that call the FM.
3. We can BACKGROUND a Z Program, not the FM.
Hope this helps.
Regards,
Amit Mittal.
2010 Aug 18 10:15 AM
Hi Anuj;
I got some infomation on the background processing of RFM.
From your calling statement, it belongs to transacational RFM calling.
Call Function rfm_name
in background task
...
you need to write a 'Commit work' after a serial of such calling which are in same LUW. And only after the statement, the LUM willl start its background processing in the target system. But note that, it does not allowed interactive dialog processing with target system and debugging..
Hope this help you..
regards
Vindy
2010 Aug 18 10:22 AM
Hi Vindy,
"you need to write a 'Commit work' after a serial of such calling which are in same LUW. And only after the statement, the LUM willl start its background processing in the target system. But note that, it does not allowed interactive dialog processing with target system and debugging"
i'm already using commit work in my code...but RFM nt working in background
Regards,
Anuj jain
2010 Aug 18 10:32 AM
Hi Anuj;
But how can you know it's not running in background.
After the 'Commit work', that FM should work in background automatically same as that postfix meaning.
Were you able to debug that FM executed in foreground?
While in background the control should not be able to come inside that FM
in debugging either. Anyhow, you should not be able to debugging the processing logic of that FM..
Regards
Vindy
2010 Aug 18 10:39 AM
Hi Vindy,
We can check whether the RFM is processing in background or dialog or any workprocess through SM50.
The thing is that CALL FUNCTION 'RFM' IN BACKGROUND is misleading everyone it doen't means that it'll work in BGD workprocess.
Regards,
Anuj
2010 Aug 18 10:56 AM
All you wanted to know about ABAP Connectivity techniques: [http://wiki.sdn.sap.com/wiki/display/ABAPConn/ABAPConnectivityHome]
Enjoy SAP !!
Suhas
2010 Aug 20 7:43 AM