Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Why TRFC does not appear in SM58?

friendlycoder
Participant
0 Kudos
694

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:

2021-01-11-16-20-15.png

What am I doing wrong?

Thanks

1 ACCEPTED SOLUTION

DominikTylczyn
Active Contributor
530

Hello bifunctor

cl_bgrfc_destination_inbound=>create creates bgRFC destination whereas SM58 monitors tRFC calls, here bg doesn't equal t.

Use transaction SBGRFCMON to monitor bgRFCs.

Best regards

Dominik Tylczynski

4 REPLIES 4

DominikTylczyn
Active Contributor
531

Hello bifunctor

cl_bgrfc_destination_inbound=>create creates bgRFC destination whereas SM58 monitors tRFC calls, here bg doesn't equal t.

Use transaction SBGRFCMON to monitor bgRFCs.

Best regards

Dominik Tylczynski

0 Kudos
530

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.

2021-01-12-07-34-39.png

Thanks

DominikTylczyn
Active Contributor
0 Kudos
530

Hello bifunctor

You should see the running processes in SSBGRFCMON too. However typical runtime of a process is short, so it's hard to catch them there.

Best regards

Dominik Tylczynski

0 Kudos
530

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