<?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: calling a function in tasks in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-function-in-tasks/m-p/4789447#M1121753</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thomas and Rich , thank you very much for your help , it seems to be working now , my function module was missing RFC enabled and few other tinkering .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Dec 2008 17:06:37 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-12-04T17:06:37Z</dc:date>
    <item>
      <title>calling a function in tasks</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-function-in-tasks/m-p/4789441#M1121747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI gurus &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is the following implementation in-correct.  This for me should be creating invoices as the function module YSHELL_INCOMING is calling a bapi inturn...however I do not get any tables filled and there is no return in the return table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO 5 TIMES.&lt;/P&gt;&lt;P&gt;WRITE SY-INDEX TO V_TASK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CALL FUNCTION 'YSHELL_INCOMING'&lt;/P&gt;&lt;P&gt;      STARTING NEW TASK V_TASK&lt;/P&gt;&lt;P&gt;       performing set_function1 on end of task&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            HEADERDATA       = G_INV_HEADER&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            ITEMDATA         = G_INV_ITEMDATA&lt;/P&gt;&lt;P&gt;            ACCOUNTINGDATA   = G_INV_ACCDATA&lt;/P&gt;&lt;P&gt;            GLACCOUNTDATA    = G_INV_GLDATA&lt;/P&gt;&lt;P&gt;            WITHTAXDATA      = G_INV_WITHTAXDATA&lt;/P&gt;&lt;P&gt;            RETURN           = G_INV_RETURN.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form set_function1 using taskname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  receive results from function 'YSHELL_INCOMING'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          IMPORTING&lt;/P&gt;&lt;P&gt;            INVOICEDOCNUMBER = G_INVOICE&lt;/P&gt;&lt;P&gt;            FISCALYEAR       = G_FYEAR.&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Dec 2008 15:50:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-function-in-tasks/m-p/4789441#M1121747</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-04T15:50:16Z</dc:date>
    </item>
    <item>
      <title>Re: calling a function in tasks</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-function-in-tasks/m-p/4789442#M1121748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;DEL&gt;Move&lt;/DEL&gt; Add &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; TABLES&lt;/P&gt;&lt;P&gt;&amp;gt; RETURN = G_INV_RETURN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to the RECEIVE RESULTS section. Also add this to the aRFC-call and check sy-subrc, as there might be a technical problem with the aRFC:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;     EXCEPTIONS&lt;/P&gt;&lt;P&gt;&amp;gt;         communication_failure = 1&lt;/P&gt;&lt;P&gt;&amp;gt;        system_failure        = 2&lt;/P&gt;&lt;P&gt;&amp;gt;         resource_failure      = 3&lt;/P&gt;&lt;P&gt;&amp;gt;         others                = 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S. you should also do a COMMIT WORK inside YSHELL_INCOMING&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Dec 2008 15:57:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-function-in-tasks/m-p/4789442#M1121748</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2008-12-04T15:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: calling a function in tasks</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-function-in-tasks/m-p/4789443#M1121749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pretty sure you need to WAIT till its done.  Here is an example program using the WAIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;report zrich_0001.

data: functioncall1(1) type c.
constants: done(1) type c value 'X'.

data: cstgdetail1 type bapicustomer_kna1.

parameters: p_kunnr1 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.


* Receive remaining asynchronous replies
  wait until functioncall1 = done.

  write:/  cstgdetail1.

************************************************************************
*       FORM FUNCTION1_DONE
************************************************************************
form set_function1_done using taskname.

  receive results from function 'BAPI_CUSTOMER_GETDETAIL2'
   importing
      customergeneraldetail       = cstgdetail1.

  functioncall1 = done.

endform.

&lt;/CODE&gt;&lt;/PRE&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>Thu, 04 Dec 2008 15:59:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-function-in-tasks/m-p/4789443#M1121749</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2008-12-04T15:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: calling a function in tasks</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-function-in-tasks/m-p/4789444#M1121750</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;&lt;/P&gt;&lt;P&gt;One question  : Does my Z-function module have to RFC enabled to make this work .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Dec 2008 16:20:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-function-in-tasks/m-p/4789444#M1121750</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-04T16:20:47Z</dc:date>
    </item>
    <item>
      <title>Re: calling a function in tasks</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-function-in-tasks/m-p/4789445#M1121751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich , should my Z- Function Module be RFC enabled to make this work , I am receiving a short dump right now.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Dec 2008 16:31:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-function-in-tasks/m-p/4789445#M1121751</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-04T16:31:10Z</dc:date>
    </item>
    <item>
      <title>Re: calling a function in tasks</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-function-in-tasks/m-p/4789446#M1121752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In case Rich is out for lunch: yes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also I strongly recommend you see my answer above. I am using aRFC and it works nicely.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw70/helpdata/EN/22/042592488911d189490000e829fbbd/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw70/helpdata/EN/22/042592488911d189490000e829fbbd/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Dec 2008 16:34:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-function-in-tasks/m-p/4789446#M1121752</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2008-12-04T16:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: calling a function in tasks</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-function-in-tasks/m-p/4789447#M1121753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thomas and Rich , thank you very much for your help , it seems to be working now , my function module was missing RFC enabled and few other tinkering .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Dec 2008 17:06:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-function-in-tasks/m-p/4789447#M1121753</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-04T17:06:37Z</dc:date>
    </item>
  </channel>
</rss>

