<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ABAP Dump due to RFC Function module call in another thread in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-dump-due-to-rfc-function-module-call-in-another-thread/m-p/1093519#M101467</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi, Amara&lt;/P&gt;&lt;P&gt;I agree with Rich said, and do a simulate test in my server, here is the analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assume we have a RFC, like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FUNCTION ZGZL_DUMPTEST.
*"----------------------------------------------------------------------
*"*"Local interface:
*"  EXPORTING
*"     VALUE(OUT) TYPE  I
*"  EXCEPTIONS
*"      CONVERT_FAIL
*"----------------------------------------------------------------------

  data:a  type  i.
  a = 'A'.

ENDFUNCTION.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;And call this RFC like you way:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT ZGZL_DUMPTEST .
DATA:
  SEMAPHORE(1) VALUE SPACE,
  LC_OUT       TYPE  I.

CALL FUNCTION 'ZGZL_DUMPTEST'
STARTING NEW TASK 'DUMP'
PERFORMING RETURN_INFO ON END OF TASK.

WAIT UNTIL SEMAPHORE = 'X'.
WRITE: 'OVER'.

FORM RETURN_INFO USING TASKNAME.
  RECEIVE RESULTS FROM FUNCTION 'ZGZL_DUMPTEST'
          IMPORTING  OUT = LC_OUT.

  SEMAPHORE = 'X'.
ENDFORM.                    " RETURN_INFO
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;if we run the RFC in se37 directly, obviously it will occur a rumtime error CONVT_NO_NUMBER, and dump.&lt;/P&gt;&lt;P&gt;But if we run the above application to call the RFC, we will get a different runtime error CALL_FUNCTION_REMOTE_ERROR.&lt;/P&gt;&lt;P&gt;Error Analysis in ST22 like this:&lt;/P&gt;&lt;P&gt;An error occurred when executing a REMOTE FUNCTION CALL.&lt;/P&gt;&lt;P&gt;It was logged under the name "CONVT_NO_NUMBER"&lt;/P&gt;&lt;P&gt;on the called page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that means the application receive the runtime error from RFC when call  &amp;lt;b&amp;gt;RECEIVE RESULTS&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;In normal CALL FUNCTION, the external application will accept the rumetime error throw from FM, that's correct, because it let the caller can handle these runtime errors.&lt;/P&gt;&lt;P&gt;In you case, you said RFC run in a new task, yes, that's true, so you can call the RFC like this:&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CALL FUNCTION 'ZGZL_DUMPTEST'
STARTING NEW TASK 'DUMP'
PERFORMING RETURN_INFO ON END OF TASK.

WAIT UNTIL SEMAPHORE = 'X'.
WRITE: 'OVER'.

FORM RETURN_INFO USING TASKNAME.
  SEMAPHORE = 'X'.
ENDFORM.                    " RETURN_INFO
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will goes well, no dump. Why? because we don't use RECEIVE RESULT. RECEIVE RESULT will bring the result from FM, also bring the runtime error from FM.&lt;/P&gt;&lt;P&gt;So if you want to call the FM and receive the result, handle the runtime error in FM inside at first.&lt;/P&gt;&lt;P&gt;like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  
  CATCH SYSTEM-EXCEPTIONS CONVT_NO_NUMBER = 1.
    a = 'A'.
  ENDCATCH.
  IF SY-SUBRC = 1.
    RAISE CONVERT_FAIL.
  ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then you call FM like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CALL FUNCTION 'ZGZL_DUMPTEST'
STARTING NEW TASK 'DUMP'
PERFORMING RETURN_INFO ON END OF TASK.

WAIT UNTIL SEMAPHORE = 'X'.
WRITE: 'OVER'.


FORM RETURN_INFO USING TASKNAME.
  RECEIVE RESULTS FROM FUNCTION 'ZGZL_DUMPTEST'
          IMPORTING  OUT = LC_OUT
          EXCEPTIONS CONVERT_FAIL = 1.

  SEMAPHORE = 'X'.
ENDFORM.                    " RETURN_INFO
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;That's will be ok for your scenario.&lt;/P&gt;&lt;P&gt;Hope my reply is useful.&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 19 Nov 2005 04:39:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-11-19T04:39:04Z</dc:date>
    <item>
      <title>ABAP Dump due to RFC Function module call in another thread</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-dump-due-to-rfc-function-module-call-in-another-thread/m-p/1093517#M101465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am facing some problem since yesterday. In one of my executable program I am calling a RFC fm as below mentioned     &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZREPORT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'Z_XXXXXXXXX'&lt;/P&gt;&lt;P&gt;      STARTING NEW TASK L_NAME&lt;/P&gt;&lt;P&gt;      DESTINATION IN GROUP 'TASK'&lt;/P&gt;&lt;P&gt;      PERFORMING RETURN_INFO ON END OF TASK&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        P_exp1       = l_emp&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        R_VBELN      = r_it_vbeln&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        NO_DATA_TO_PROCESS = 1&lt;/P&gt;&lt;P&gt;        OTHERS             = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wait until v_task = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;update ztable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Due to some data inconsistence one of the SAP function &lt;/P&gt;&lt;P&gt;module which I am calling in my function module Z_XXXXXXXXX&lt;/P&gt;&lt;P&gt;is generating dump with message type X. Since there is data inconsistence it is generating dump that's OK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the problem i am getting is, report ZREPORT is generating dump at WAIT statement saying illegal statement even though I am calling that function module &lt;/P&gt;&lt;P&gt;Z_XXXXXXXXX as a separate new task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can somebody help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Amara.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Nov 2005 22:17:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-dump-due-to-rfc-function-module-call-in-another-thread/m-p/1093517#M101465</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-18T22:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Dump due to RFC Function module call in another thread</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-dump-due-to-rfc-function-module-call-in-another-thread/m-p/1093518#M101466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the system exception?  Can it be caught using TRY...ENTRY or CATCH...ENDCATCH?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the dump.  The exception will be at the top of the abap dump.  Then do F1 help on CATCH,  in the help there should be a link to system exceptions.  Check to see if your exception can be caught.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REgards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Nov 2005 02:29:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-dump-due-to-rfc-function-module-call-in-another-thread/m-p/1093518#M101466</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-11-19T02:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Dump due to RFC Function module call in another thread</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-dump-due-to-rfc-function-module-call-in-another-thread/m-p/1093519#M101467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi, Amara&lt;/P&gt;&lt;P&gt;I agree with Rich said, and do a simulate test in my server, here is the analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assume we have a RFC, like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FUNCTION ZGZL_DUMPTEST.
*"----------------------------------------------------------------------
*"*"Local interface:
*"  EXPORTING
*"     VALUE(OUT) TYPE  I
*"  EXCEPTIONS
*"      CONVERT_FAIL
*"----------------------------------------------------------------------

  data:a  type  i.
  a = 'A'.

ENDFUNCTION.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;And call this RFC like you way:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT ZGZL_DUMPTEST .
DATA:
  SEMAPHORE(1) VALUE SPACE,
  LC_OUT       TYPE  I.

CALL FUNCTION 'ZGZL_DUMPTEST'
STARTING NEW TASK 'DUMP'
PERFORMING RETURN_INFO ON END OF TASK.

WAIT UNTIL SEMAPHORE = 'X'.
WRITE: 'OVER'.

FORM RETURN_INFO USING TASKNAME.
  RECEIVE RESULTS FROM FUNCTION 'ZGZL_DUMPTEST'
          IMPORTING  OUT = LC_OUT.

  SEMAPHORE = 'X'.
ENDFORM.                    " RETURN_INFO
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;if we run the RFC in se37 directly, obviously it will occur a rumtime error CONVT_NO_NUMBER, and dump.&lt;/P&gt;&lt;P&gt;But if we run the above application to call the RFC, we will get a different runtime error CALL_FUNCTION_REMOTE_ERROR.&lt;/P&gt;&lt;P&gt;Error Analysis in ST22 like this:&lt;/P&gt;&lt;P&gt;An error occurred when executing a REMOTE FUNCTION CALL.&lt;/P&gt;&lt;P&gt;It was logged under the name "CONVT_NO_NUMBER"&lt;/P&gt;&lt;P&gt;on the called page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that means the application receive the runtime error from RFC when call  &amp;lt;b&amp;gt;RECEIVE RESULTS&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;In normal CALL FUNCTION, the external application will accept the rumetime error throw from FM, that's correct, because it let the caller can handle these runtime errors.&lt;/P&gt;&lt;P&gt;In you case, you said RFC run in a new task, yes, that's true, so you can call the RFC like this:&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CALL FUNCTION 'ZGZL_DUMPTEST'
STARTING NEW TASK 'DUMP'
PERFORMING RETURN_INFO ON END OF TASK.

WAIT UNTIL SEMAPHORE = 'X'.
WRITE: 'OVER'.

FORM RETURN_INFO USING TASKNAME.
  SEMAPHORE = 'X'.
ENDFORM.                    " RETURN_INFO
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will goes well, no dump. Why? because we don't use RECEIVE RESULT. RECEIVE RESULT will bring the result from FM, also bring the runtime error from FM.&lt;/P&gt;&lt;P&gt;So if you want to call the FM and receive the result, handle the runtime error in FM inside at first.&lt;/P&gt;&lt;P&gt;like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  
  CATCH SYSTEM-EXCEPTIONS CONVT_NO_NUMBER = 1.
    a = 'A'.
  ENDCATCH.
  IF SY-SUBRC = 1.
    RAISE CONVERT_FAIL.
  ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then you call FM like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CALL FUNCTION 'ZGZL_DUMPTEST'
STARTING NEW TASK 'DUMP'
PERFORMING RETURN_INFO ON END OF TASK.

WAIT UNTIL SEMAPHORE = 'X'.
WRITE: 'OVER'.


FORM RETURN_INFO USING TASKNAME.
  RECEIVE RESULTS FROM FUNCTION 'ZGZL_DUMPTEST'
          IMPORTING  OUT = LC_OUT
          EXCEPTIONS CONVERT_FAIL = 1.

  SEMAPHORE = 'X'.
ENDFORM.                    " RETURN_INFO
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;That's will be ok for your scenario.&lt;/P&gt;&lt;P&gt;Hope my reply is useful.&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Nov 2005 04:39:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-dump-due-to-rfc-function-module-call-in-another-thread/m-p/1093519#M101467</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-19T04:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Dump due to RFC Function module call in another thread</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-dump-due-to-rfc-function-module-call-in-another-thread/m-p/1093520#M101468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi zhenglin gu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your time.I though the EXCEPTIONS keyword in call function statement should take what you have suggested. Anyway I will tomorrow as you suggested.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Amara.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2005 04:48:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-dump-due-to-rfc-function-module-call-in-another-thread/m-p/1093520#M101468</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-21T04:48:29Z</dc:date>
    </item>
  </channel>
</rss>

