‎2010 Nov 29 11:37 AM
Hi Experts,
I am calling an RFC Function module in Background Task. I need to capture the return table of this FM. Since i call in background task am unable to capture the return table. Can you provide any other appropriate solution where i can make use of the return table paramters from the FM?
Pls Help.
Regards
Ramanan RS
‎2010 Nov 29 1:03 PM
‎2010 Nov 29 1:19 PM
Create A DB dtab table with table with components of the return table of the function module.
After the function module completes successfully.
Add code to
Loop after the return table of the FUN module
itab--> internal table
istr line of itab
loop at itab into istruc
append istruc to dtab.
if sy-subrc <>0
error.
ENDLOOP
Edited by: Vighneswaran CE on Nov 29, 2010 2:23 PM
‎2010 Nov 29 4:46 PM
Hi,
Are you using a "starting new task" approach??
If this is the case, have you tried the addition "PERFORMING ..... ON END OF TASK"??
You most declare a routine as follows
form process_results.
......
.....
RECEIVE RESULTS FROM 'FUNCTION_MODULE'.
.....
....
endform.
Doing this, your calls to the FUNCTION_MODULE may look like this:
Call function 'FUNCTION_MODULE' starting new task g_taskname
destination in group g_group
performing process_results on end of task
.....
....
With this you can process the return table.
I hope this may help you.