‎2014 Jun 04 5:22 PM
Hi everybody,
My issue is that I have create a module function which insert into database .
loop AT t_DD02L into s_DD02L.
CALL FUNCTION 'Z_GET_DURATION_QUERY' "in BACKGROUND TASK
EXPORTING
s_table = s_DD02L-tabname
.
ENDLOOP.
It doesn't insert if it's called in background and if it's called normally it works perfect!
help please,
thank you,
Sam ZA
‎2014 Jun 05 7:46 AM
Hi,
Please add a commit work after calling the FM. Your background task sessions are not started until this. You can see pending tRFC session in the tcode SM58..
loop AT t_DD02L into s_DD02L.
CALL FUNCTION 'Z_GET_DURATION_QUERY' "in BACKGROUND TASK
EXPORTING
s_table = s_DD02L-tabname
.
ENDLOOP.
Commit work.
Cheers,
Mahesh
‎2014 Jun 04 5:29 PM
BACKGROUND TASK could use tRFC and tRFC will be processed latter or failing some situation?
Regards,
Vadamala A
‎2014 Jun 04 8:12 PM
Does your FM have a COMMIT WORK statement? Maybe there's no automatic commit in case of a function executed as bg task....
‎2014 Jun 05 7:46 AM
Hi,
Please add a commit work after calling the FM. Your background task sessions are not started until this. You can see pending tRFC session in the tcode SM58..
loop AT t_DD02L into s_DD02L.
CALL FUNCTION 'Z_GET_DURATION_QUERY' "in BACKGROUND TASK
EXPORTING
s_table = s_DD02L-tabname
.
ENDLOOP.
Commit work.
Cheers,
Mahesh
‎2014 Jun 05 9:05 AM
Hi , my code become as following :
loop AT t_DD02L into s_DD02L.
CALL FUNCTION 'Z_GET_DURATION_QUERY'
IN BACKGROUND TASK
EXPORTING
s_table = s_DD02L-tabname.
ENDLOOP.
COMMIT WORK.
ENDFORM. " GET_DATA
I checked the sm58 => Function module "Z_GET_DURATION_QUERY" cannot be u
sed for 'remote' calls.
Regards,
Sam ZA
‎2014 Jun 05 9:10 AM
‎2014 Jun 05 9:18 AM