<?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: How to call a function in (CALL FUNCTION ..) in background - syntax in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-call-a-function-in-call-function-in-background-syntax/m-p/6767191#M1462652</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;If your function module is RFC enabled, you can call the function module in background by using IN BACKGROUND TASK as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION &amp;lt;function module name&amp;gt; IN BACKGROUND TASK [DESTINATION]&lt;/P&gt;&lt;P&gt;EXPORTING....&lt;/P&gt;&lt;P&gt;EMPORTING....&lt;/P&gt;&lt;P&gt;TABLES.....&lt;/P&gt;&lt;P&gt;EXCEPTIONS....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;Jayesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Apr 2010 06:12:48 GMT</pubDate>
    <dc:creator>jayesh_gupta</dc:creator>
    <dc:date>2010-04-23T06:12:48Z</dc:date>
    <item>
      <title>How to call a function in (CALL FUNCTION ..) in background - syntax</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-call-a-function-in-call-function-in-background-syntax/m-p/6767188#M1462649</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;Can we call a function in background. If so, what is the syntax for it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to call a function in backgorund with return parameter as timeout variable &amp;amp; do further processing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any updates will be highly helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Gyanaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Apr 2010 04:35:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-call-a-function-in-call-function-in-background-syntax/m-p/6767188#M1462649</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-21T04:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to call a function in (CALL FUNCTION ..) in background - syntax</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-call-a-function-in-call-function-in-background-syntax/m-p/6767189#M1462650</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;You may create a separate report program and call your function module in that report normally.&lt;/P&gt;&lt;P&gt;Then call this report program in your program by submitting it as a background job.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;Jayesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Apr 2010 06:15:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-call-a-function-in-call-function-in-background-syntax/m-p/6767189#M1462650</guid>
      <dc:creator>jayesh_gupta</dc:creator>
      <dc:date>2010-04-21T06:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to call a function in (CALL FUNCTION ..) in background - syntax</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-call-a-function-in-call-function-in-background-syntax/m-p/6767190#M1462651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may use the following code in your report to submit the new report rpt_call_func(containing the function module)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: global_job        LIKE tbtcjob.
  DATA: global_start_date LIKE tbtcstrt.
  DATA: global_step_tbl   LIKE tbtcstep OCCURS 0 WITH HEADER LINE.

  DATA: ls_jobs_of_step TYPE ty_bpxminfo.

  global_job-jobname        = 'MYJOBFOR_CALL_FUNC'.
  global_job-jobclass       = 'B'.
  global_job-newflag        = 'O'.
  global_step_tbl-program   = 'RSBTCPT3'.    "dummy step
  global_step_tbl-typ       = 'A'.
  global_step_tbl-status    = 'P'.     "scheduled
  global_step_tbl-authcknam = sy-uname.
  APPEND global_step_tbl.

  CALL FUNCTION 'BP_JOB_CREATE'
       EXPORTING
            job_cr_dialog   = 'N'
            job_cr_head_inp = global_job
       IMPORTING
            job_cr_head_out = global_job
            job_cr_stdt_out = global_start_date
       TABLES
            job_cr_steplist = global_step_tbl.

  SUBMIT rpt_call_func AND RETURN
          USER sy-uname
          VIA JOB global_job-jobname NUMBER global_job-jobcount
          WITH p_func_param1 = gv_var1
          WITH p_func_param2 = gv_var2
          WITH p_func_param3 = gv_var3
          WITH p_func_param4 = gv_var4.


  
  CALL FUNCTION 'JOB_CLOSE'
       EXPORTING
            jobcount             = global_job-jobcount
            jobname              = global_job-jobname
            strtimmed            = 'X'
       EXCEPTIONS
            cant_start_immediate = 1
            invalid_startdate    = 2
            jobname_missing      = 3
            job_close_failed     = 4
            job_nosteps          = 5
            job_notex            = 6
            lock_failed          = 7
            OTHERS               = 8.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Apr 2010 06:23:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-call-a-function-in-call-function-in-background-syntax/m-p/6767190#M1462651</guid>
      <dc:creator>jayesh_gupta</dc:creator>
      <dc:date>2010-04-21T06:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to call a function in (CALL FUNCTION ..) in background - syntax</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-call-a-function-in-call-function-in-background-syntax/m-p/6767191#M1462652</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;If your function module is RFC enabled, you can call the function module in background by using IN BACKGROUND TASK as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION &amp;lt;function module name&amp;gt; IN BACKGROUND TASK [DESTINATION]&lt;/P&gt;&lt;P&gt;EXPORTING....&lt;/P&gt;&lt;P&gt;EMPORTING....&lt;/P&gt;&lt;P&gt;TABLES.....&lt;/P&gt;&lt;P&gt;EXCEPTIONS....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;Jayesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Apr 2010 06:12:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-call-a-function-in-call-function-in-background-syntax/m-p/6767191#M1462652</guid>
      <dc:creator>jayesh_gupta</dc:creator>
      <dc:date>2010-04-23T06:12:48Z</dc:date>
    </item>
  </channel>
</rss>

