2021 Jan 11 3:21 PM
Hi all
I am trying to use IN BACKGROUND unit as follows:
DATA(lo_inbound) = cl_bgrfc_destination_inbound=>create( dest_name = 'YCAS1' ).
DATA(lo_trcf) = lo_inbound->create_trfc_unit( ).
CALL FUNCTION 'ZAMAR_BG_PROCESS' IN BACKGROUND UNIT lo_trcf
EXPORTING
iv_num = 20.
CALL FUNCTION 'ZAMAR_BG_PROCESS' IN BACKGROUND UNIT lo_trcf
EXPORTING
iv_num = 30.
CALL FUNCTION 'ZAMAR_BG_PROCESS' IN BACKGROUND UNIT lo_trcf
EXPORTING
iv_num = 10.
WRITE:/ 'Hello'.
The implementation of function module is very simple:
FUNCTION ZAMAR_BG_PROCESS.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(IV_NUM) TYPE NUMC4
*"----------------------------------------------------------------------
wait up to iv_num SECONDS.
ENDFUNCTION.
After the program is running, I can not see any tasks at SM58:
What am I doing wrong?
Thanks
2021 Jan 11 3:32 PM
2021 Jan 11 3:32 PM
2021 Jan 12 6:35 AM
Hello 3a9e4ce873a94034b33dc62b0ce600ee
Thanks a lot for your answer. One more quesion, where can I see the running BGRFC processes. On the transaction SBGRFCMON I can see only errors but not the running tasks.
Thanks
2021 Jan 12 7:55 AM
2021 Jan 12 8:33 AM
Hi
For instance, the FB does long running loops about 20000000
CALL FUNCTION 'ZAMAR_BG_PROCESS' IN BACKGROUND UNIT lo_trcf
EXPORTING
iv_num = 20000000.
FUNCTION zamar_bg_process.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(IV_NUM) TYPE NUMC4
*"----------------------------------------------------------------------
do iv_num TIMES.
ENDDO.
ENDFUNCTION.
However, it does appear in SBGRFCMON at all, why?
Thanks