‎2010 May 10 3:29 PM
Hi All,
I have this following code
call function '/WSCGMBH/C_ORDER_UPDATE_RFC'
in background task
as separate unit
destination l_qrfcdest
exporting
order_number = p_aufnr.
*{ INSERT LI1K9A064Z 1
COMMIT work.
wait up to 10 seconds.
*} INSERT
Now I want to debug this FM, in order to say I have set the settings and check the option, "In background task: do not process".
Still I am not able to do so.Please suggest.
Thanks,
Warm Regards,
Sana.
‎2010 May 10 6:21 PM
Hi Sana,
You have two options to debug a tRFC call. If you are in a modifiable client you can insert a infinite loop and debug it otherwise you need to use transaction SM58.
My article deals exactly with the same subject:
http://divulgesap.com/blog.php?p=Mjg=
Hope it helps.
Regards,
Ravikiran
‎2010 May 10 6:33 PM
If you want to debug an RFC FM.
You should use External debugging and once your curser comes to This FM you can press F5 then it will take you to the RFC FM code.
if above step fails you can define an infinte loop in that FM at start of the code and execute your code and goto your RFC system and SM50 and excute the transactionm code.
There you will find your FM name and select that row and GOTO->Program/session->program->Debugging.
It will take you to that infinite loop.
Just pass that loop in debugging mode and you can test rest code normally.
(This 2nd point should do in RFC system)
Edited by: Naresh Nelapatla on May 10, 2010 7:33 PM
‎2010 May 10 8:49 PM
Edited by: Sandra Rossi on May 10, 2010 9:50 PM : SORRY IT'S TRFC ! (stupid sandra)
see SAP Note 890699 Debugging bgRFC in Release 7.0
Note: as the statement contains "as separate unit", the RFC call is not tRFC as indicated in another answer, but bgRFC
‎2010 May 11 12:23 PM
HI Ravikiran,
Thanks for sending the document, but I have a doubt in Method 2. I have added the infinite loop at the beginning of the RFC.
now I tried debugging teh program both by changing teh settings of "In background task: Do not process" but still it doesnt go inside the FM, the way you had shown in a snap shot.
Also though there comes an entry in SM50, but while debugging that too it is not going in the FM. Please suggest
Thanks,
Sana.
‎2010 May 11 6:13 PM
If you opt for the infinite loop solution, you should add it inside the function module, and you don't need to select the tRFC debug checkbox. As it is a standard FM (or partner), maybe you don't want that.
Otherwise, simply look at that thread: