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: 

CALL_FUNCTION_REMOTE_ERROR

Former Member
0 Kudos

I'm building a program that will call an asynchronous RFC repeatedly, for downloading files from a DMS document server to a local directory on the presentation server.

In order to do this, I am calling the function a number of times in parallel (based on number of available processes). However, I keep getting dumps of type CALL_FUNCTION_REMOTE_ERROR, due to problems in the form defined as "on end of task". Here's my sample code:

call function 'ZCA_MY_DOWNLOAD_RFC'

starting new task taskname

destination in group default

performing reduce_process_counter on end of task

exporting

...

In the "reduce_process_counter" form, the following code is executed:

receive results from function 'ZCA_MY_DOWNLOAD3_RFC'

changing ch_taskname = lv_taskname.

Note that the "changing" parameter is defined in the function module and is working OK in most cases.

Now, the issue is the following: In most cases, the logic functions. I have a parameter in the calling program, allowing me to specify how many RFC calls I should run in parallell (based on available processes in the app servers). However, every once in a while - and especially if I run more than 2 or 3 calls in parallel, I get the CALL_FUNCTION_REMOTE_ERROR. This occurs on the "receive results" statement, with the dump reading "ThISend: bad tm type / connection closed (no data)".

It seems to me that my RFC's are "running wild" once I allow more than 2 or 3 of them to run in parallel. Again, there is no consistent behaviour here - some times, I can launch 5 in parallel; 8 will terminate properly, but the 9th will crash with the above error. I have implemented logging fuinctionality using a specific Z-table, so I can monitor the behaviour of bot the main program and the RFC's. Also, by checking SM66, I see my 5 processes running peacefully in parallel, until one suddenly "explodes"...

Any idea what's wrong here?

Regards,

Trond

6 REPLIES 6

raymond_giuseppi
Active Contributor
0 Kudos

Is this changing parameter the actual taskname of the submited task, if yes remove it, the form/method executed at end of call has this optional parameter already defined

FORM reduce_process_counter USING value(p_taskname).

Regards,

Raymond

0 Kudos

Thanks Raymond, I will try it out and let you know the outcome. Might take a few days as I cannot transport to a proper test system until later.

Regards,

Trond

0 Kudos

Hi Trond,

Have you solved this issue? I am encountering the same problem now. Hope you don't mind sharing the solution. It will help us a lot. Thank you!

Regards,

Charm

0 Kudos

Hi Stroemme,

I am facing  the same ABAP DUMP ERROR(CALL_FUNCTION_REMOTE_ERROR Program : SAPLATPC)

. Could you please revel  the solution. If you  have solved this issue?



Many Thanks

Kiran.Mudhigonda

+91-9948270789

former_member201285
Active Participant
0 Kudos

Hi,

Possibly, it could have to to with the error/delay handling. See the following code working without any problems on our system. Of course, I don't know if it has something to do with your issue...

Regards,

Ulrich

    DATA:

     lv_rfcmsg(80) TYPE c,            " Errormessage
    lv_rfcdest TYPE rfcdes-rfcdest" Servername
    lv_rfcdest_20 TYPE pbtresourc-servername,
    lv_ok TYPE boole-boole.

    CLEAR: lv_ok.

    WHILE lv_ok IS INITIAL.

      ASSERT sy-index < 9999.

      CALL FUNCTION 'Z_FSCD_ABGLEICH_RFC'
        STARTING NEW TASK task_id
        DESTINATION IN GROUP DEFAULT
        CALLING me->on_return ON END OF TASK

*        ... import/export
        EXCEPTIONS
          communication_failure = 1
          system_failure        = 2
          resource_failure      = 3.

      CASE sy-subrc.

        WHEN 0.        

          CALL FUNCTION 'SPBT_GET_PP_DESTINATION'
            IMPORTING
              rfcdest = lv_rfcdest.

          CLEAR s_task.
          s_task-taskid = task_id.
          s_task-rfcdest = lv_rfcdest.
          INSERT s_task INTO TABLE t_task.

          lv_ok = 'X'.
          ADD 1 TO mv_snt_jobs.
          ADD 1 TO task_id.

        WHEN 1 OR 2.

*         Determine the last server and exclude it

          CALL FUNCTION 'SPBT_GET_PP_DESTINATION'
            IMPORTING
              rfcdest = lv_rfcdest.

          lv_rfcdest_20 = lv_rfcdest.

          CALL FUNCTION 'SPBT_DO_NOT_USE_SERVER'
            EXPORTING
              server_name                 = lv_rfcdest_20
            EXCEPTIONS
              invalid_server_name         = 1
              no_more_resources_left      = 2
              pbt_env_not_initialized_yet = 3
              OTHERS                      = 4.

        WHEN 3.

*         No ressources available temporarily - wait one second and try again...


          WAIT UNTIL mv_rcv_jobs = mv_snt_jobs UP TO 1 SECONDS.

      ENDCASE.   


    ENDWHILE

******************************************************************************

   * Callback-Method


  METHOD on_return.

    DATA: lv_message(100) TYPE c.

*   increase received returns

    ADD 1 TO mv_rcv_jobs.

*   fetch task-ID

    s_task-taskid = p_task.

    CLEAR s_task-count.

    RECEIVE RESULTS FROM FUNCTION 'Z_FSCD_ABGL_RFC'
      IMPORTING e_counter = s_task-count
      EXCEPTIONS
        system_failure        = 1 MESSAGE lv_message
        communication_failure = 2 MESSAGE lv_message.

    ASSERT sy-subrc = 0.

    MODIFY TABLE t_task FROM s_task TRANSPORTING count.

    RAISE EVENT finished EXPORTING taskid = p_task.

  ENDMETHOD.

0 Kudos

Thanks for your Update..

But Team still facing the same dump..

Information on where terminated

    Termination occurred in the ABAP program "SAPLATPC" - in "COMMIT_TREE_DATA".

    The main program was "RVV50R10C ".

    In the source code you have the termination point in line 19

    of the (Include) program "LATPCFCB".

    The program "SAPLATPC" was started as a background job.

    Job Name....... STORE_STO_DDL"

  

Error analysis

    An error occurred when executing a REMOTE FUNCTION CALL.

    It was logged under the name " "

    on the called page.

    Last error logged in SAP kernel

Thanks

Kiran