<?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: call function STARTING NEW TASK TASKNAME in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-starting-new-task-taskname/m-p/1168598#M122511</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich,&lt;/P&gt;&lt;P&gt;  Thanks for your reply. After check the sample,it's good to get data from 'NONE' destination...do you ever try to get data from not 'NONE' destination because I need it but it can't be work...Is there other configuration need to be set?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Jan 2006 02:29:39 GMT</pubDate>
    <dc:creator>rt50896</dc:creator>
    <dc:date>2006-01-24T02:29:39Z</dc:date>
    <item>
      <title>call function STARTING NEW TASK TASKNAME</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-starting-new-task-taskname/m-p/1168595#M122508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;  I have a request to solve call RFC in other destination "time out" problem.and I want to use &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;STARTING NEW TASK xxx DESTINATION yyy
PERFORMING zzz ON END OF TASK&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;,and a subroutine zzz is used for &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;RECEIVE RESULTS FROM FUNCTION&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; and&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;WAIT UNTIL &amp;lt;contition&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;for condition true then continue...&lt;/P&gt;&lt;P&gt;  But when I try to debug how the "Asychronized RFC" work:&lt;/P&gt;&lt;P&gt;after call FM,then return back soon,and go to subroutine zzz,and make the condition is true.Actually nothing was got from another destination.&lt;/P&gt;&lt;P&gt;Q1: is there any configuration need for asychronized RFC?&lt;/P&gt;&lt;P&gt;Q2: if this is not a good way,do you have any idea to recommend? or samples to review?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tks a lot!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regina&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 Feb 2024 02:02:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-starting-new-task-taskname/m-p/1168595#M122508</guid>
      <dc:creator>rt50896</dc:creator>
      <dc:date>2024-02-04T02:02:42Z</dc:date>
    </item>
    <item>
      <title>Re: call function STARTING NEW TASK TASKNAME</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-starting-new-task-taskname/m-p/1168596#M122509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Regina.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you use [DESTINATION IN GROUP] when calling aRFC,&lt;/P&gt;&lt;P&gt;you can maintain the group via t-code RZ12.&lt;/P&gt;&lt;P&gt;And Chek up t-code SM59.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You said that the condition was true.&lt;/P&gt;&lt;P&gt;But, I think that it did not satify the condition in a subroutine zzz. You need to check up the condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The best paractice is F1(help). There are some samples. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2006 10:57:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-starting-new-task-taskname/m-p/1168596#M122509</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-23T10:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: call function STARTING NEW TASK TASKNAME</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-starting-new-task-taskname/m-p/1168597#M122510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is some sample code if you need it.  This program works pretty good in my system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;



report zrich_0001.


data: functioncall1(1) type c.
data: functioncall2(1) type c.
constants: done(1) type c value 'X'.

data: cstgdetail1 type bapicustomer_kna1.
data: cstgdetail2 type bapicustomer_kna1.

parameters: p_kunnr1 type kna1-kunnr,
            p_kunnr2 type kna1-kunnr.

start-of-selection.

  call function 'BAPI_CUSTOMER_GETDETAIL2'
           starting new task 'FUNC1'
             destination 'NONE'
              performing set_function1_done on end of task
    exporting
      customerno                  = p_kunnr1.

  call function 'BAPI_CUSTOMER_GETDETAIL2'
           starting new task 'FUNC2'
             destination 'NONE'
              performing set_function2_done on end of task
    exporting
      customerno                  = p_kunnr2.


* Receive remaining asynchronous replies
  wait until functioncall1 = done
         and functioncall2 = done.

  write:/  cstgdetail1.
  write:/  cstgdetail2.

************************************************************************
*       FORM FUNCTION1_DONE
************************************************************************
form set_function1_done using taskname.

  receive results from function 'BAPI_CUSTOMER_GETDETAIL2'
   importing
      customergeneraldetail       = cstgdetail1.

  functioncall1 = done.

endform.

************************************************************************
*       FORM FUNCTION2_DONE
************************************************************************
form set_function2_done using taskname.

  receive results from function 'BAPI_CUSTOMER_GETDETAIL2'
   importing
      customergeneraldetail       = cstgdetail2.

  functioncall2 = done.

endform.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&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>Mon, 23 Jan 2006 12:39:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-starting-new-task-taskname/m-p/1168597#M122510</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-01-23T12:39:31Z</dc:date>
    </item>
    <item>
      <title>Re: call function STARTING NEW TASK TASKNAME</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-starting-new-task-taskname/m-p/1168598#M122511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich,&lt;/P&gt;&lt;P&gt;  Thanks for your reply. After check the sample,it's good to get data from 'NONE' destination...do you ever try to get data from not 'NONE' destination because I need it but it can't be work...Is there other configuration need to be set?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2006 02:29:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-starting-new-task-taskname/m-p/1168598#M122511</guid>
      <dc:creator>rt50896</dc:creator>
      <dc:date>2006-01-24T02:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: call function STARTING NEW TASK TASKNAME</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-starting-new-task-taskname/m-p/1168599#M122512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Regina!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Time-out can be solved by sending smaller packets or placing several commit works in your RFC-function. Commit work will reset the time-out timer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A general example for RFC can be found in &lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="96659"&gt;&lt;/A&gt; topic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2006 08:17:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-starting-new-task-taskname/m-p/1168599#M122512</guid>
      <dc:creator>christian_wohlfahrt</dc:creator>
      <dc:date>2006-01-24T08:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: call function STARTING NEW TASK TASKNAME</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-starting-new-task-taskname/m-p/1168600#M122513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;    Can anybody tell what is the use of this asynchronus type fm. &lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;p.kp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2006 09:25:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-starting-new-task-taskname/m-p/1168600#M122513</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-24T09:25:45Z</dc:date>
    </item>
    <item>
      <title>Re: call function STARTING NEW TASK TASKNAME</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-starting-new-task-taskname/m-p/1168601#M122514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;asynchronous fn module means it works parallelly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;generally when we call a fn module, it will stop the current program , go thera nd again control will return .&lt;/P&gt;&lt;P&gt;but with asynchronous fn module control will start parallelly with out stopping the current program from which u called the fn module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i hope it is clear&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2006 09:29:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-starting-new-task-taskname/m-p/1168601#M122514</guid>
      <dc:creator>hymavathi_oruganti</dc:creator>
      <dc:date>2006-01-24T09:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: call function STARTING NEW TASK TASKNAME</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-starting-new-task-taskname/m-p/1168602#M122515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Regina,&lt;/P&gt;&lt;P&gt;Richs sample is good to show RFC in general. To use 'NONE' or something else does not touch the logic in your program. The destination however needs to be configured (e.g. via TA 'SM59') and the name of the destination needs to be specified to your program.&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;  Klaus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2006 15:47:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-starting-new-task-taskname/m-p/1168602#M122515</guid>
      <dc:creator>former_member183804</dc:creator>
      <dc:date>2006-01-24T15:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: call function STARTING NEW TASK TASKNAME</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-starting-new-task-taskname/m-p/1168603#M122516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;  Basically I used call function for destination is no problem,so SM59 configure is done.Now I try to go aRFC&lt;/P&gt;&lt;P&gt;but it is not process as I thought. why it return soon when call function by NEW TASK in a DESTINATION? What can I see in the destination server?&lt;/P&gt;&lt;P&gt;  I ever tried to use DO...ENDDO until the WAIT UNTIL condition is fulfill then exit this loop to check result,but I see the status by SM51 in destination server is: waiting-&amp;gt;running-&amp;gt;stop-&amp;gt;waiting-&amp;gt;running-&amp;gt;stop...&lt;/P&gt;&lt;P&gt;seems endless loop occurs. Can you help me to check the following codes where have problem to go aRFC?&lt;/P&gt;&lt;P&gt;Tks!&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CALL FUNCTION 'Y_RFC_YCME' STARTING NEW TASK TASKNAME
                  DESTINATION RFC_DEST   "another server
                  PERFORMING BACK ON END OF TASK
   EXPORTING
       S_BUDAT_FROM         = S_BUDAT-LOW
       S_BUDAT_TO           = S_BUDAT-HIGH
       P_BUKRS              = P_BUKRS
       P_MATNR              = P_MATNR
       S_KUNNR_TO           = S_KUNNR-HIGH
       S_KUNNR_FROM         = S_KUNNR-LOW.

WAIT UNTIL  FLAG = 'X'.

*something strang because FLAG not equal 'X',but it still 
*go to the LOOP AT COMM_TAB statement...

LOOP AT COMM_TAB.
  ...
ENDLOOP.

*******************************************
FORM BACK USING TASKNAME.
RECEIVE RESULTS FROM FUNCTION 'Y_RFC_YCME'
  IMPORTING
        I_OWNSYS             = W_OWNSYS
  TABLES
        ITAB                 = ITAB
        KEY_COMBINATION      = KEY_COMBINATION
        COMM_TAB1            = COMM_TAB.

IF SY-SUBRC = 0 AND NOT COMM_TAB[] IS INITIAL.
   FLAG = 'X'.
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2006 08:02:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-starting-new-task-taskname/m-p/1168603#M122516</guid>
      <dc:creator>rt50896</dc:creator>
      <dc:date>2006-01-27T08:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: call function STARTING NEW TASK TASKNAME</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-starting-new-task-taskname/m-p/1168604#M122517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Regina!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looks like Y_RFC_YCME runs into a problem, can't fill comm_tab and returns before time. &lt;/P&gt;&lt;P&gt;This would explain little runtime and your flag would not be 'X' -&amp;gt; you have a endless loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to set the return flag without condition - even a wrong execution was a complete execution from aRFC point of view.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To be able to follow up the problems, run Y_RFC_YCME local.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2006 08:59:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-starting-new-task-taskname/m-p/1168604#M122517</guid>
      <dc:creator>christian_wohlfahrt</dc:creator>
      <dc:date>2006-01-27T08:59:52Z</dc:date>
    </item>
  </channel>
</rss>

