<?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: Function module is not getting executed when report is run in Background in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388433#M9511</link>
    <description>&lt;P&gt;Your report does not explicitly change whether your Function Module is called if the report is run as a background/scheduled job. &lt;/P&gt;&lt;P&gt;Providing your job is finishing and in succeed status i would suggest it IS getting executed but something within the Ztest function module is not working properly, or you are handling an exception which equates to a 'successful' run. So you would need to paste the code for the ztest function module for these kind sirs/madams to assist you further.&lt;/P&gt;&lt;P&gt;Hint: Transaction SE37 to get your Function module code.&lt;/P&gt;&lt;P&gt;Hint 2: If you are in a development environment, put an infinite loop in your report code prior to the function call. Schedule the job and when it is running, go to SM50 and find the dialog process for the program - the user the job is scheduled under will be the indicator in this case. Highlight the line and go to administration -&amp;gt; Program -&amp;gt; Debugging. Step through and you will see.&lt;/P&gt;&lt;P&gt;Hint 3: Take an ABAP course.&lt;/P&gt;&lt;P&gt;ALSO: Have you considered that the foreground and background execution users are different.&lt;/P&gt;</description>
    <pubDate>Tue, 15 Nov 2016 21:41:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2016-11-15T21:41:45Z</dc:date>
    <item>
      <title>Function module is not getting executed when report is run in Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388413#M9491</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I need to schedule a job for custom Function module for which I have created a report in which I have called the same custom Function module.&lt;/P&gt;&lt;P&gt;When I am executing the report in background , Job is getting scheduled but the Function module is not getting executed.&lt;/P&gt;&lt;P&gt;When I re-run the same job using JDBG then the FM is getting executed and also when I run the report in foreground FM is getting executed.&lt;/P&gt;&lt;P&gt;I am facing issue only when I execute the report in background.&lt;/P&gt;&lt;P&gt;Kindly provide suggestions on how to proceed&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;BestRegards,&lt;/P&gt;&lt;P&gt;Aamukta Malyada A&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2016 08:26:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388413#M9491</guid>
      <dc:creator>former_member296189</dc:creator>
      <dc:date>2016-11-15T08:26:17Z</dc:date>
    </item>
    <item>
      <title>Re: Function module is not getting executed when report is run in Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388414#M9492</link>
      <description>&lt;P&gt;There's really insufficient information here for a meaningful answer. How about posting the relevant code?&lt;/P&gt;&lt;P&gt;How do you &lt;STRONG&gt;know&lt;/STRONG&gt; the FM isn't being executed in background?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2016 08:29:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388414#M9492</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2016-11-15T08:29:02Z</dc:date>
    </item>
    <item>
      <title>Re: Function module is not getting executed when report is run in Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388415#M9493</link>
      <description>&lt;P&gt;Hi Matthew,&lt;/P&gt;&lt;P&gt;In the custom FM ,I have written a piece of code for RFC creation.&lt;/P&gt;&lt;P&gt;When I execute the report in background that RFC was not created where as when I execute the report in foreground RFC was created&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2016 08:45:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388415#M9493</guid>
      <dc:creator>former_member296189</dc:creator>
      <dc:date>2016-11-15T08:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: Function module is not getting executed when report is run in Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388416#M9494</link>
      <description>&lt;P&gt;...and How about posting the relevant code? &lt;/P&gt;&lt;P&gt;Have you checked for dumps, or in SM21? Have you looked at the job logs of the background report?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2016 08:55:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388416#M9494</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2016-11-15T08:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: Function module is not getting executed when report is run in Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388417#M9495</link>
      <description>&lt;P&gt;Have you implemented logging into your program? If not, do it, and log all relevant events, especially non-zero return codes.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2016 08:55:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388417#M9495</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2016-11-15T08:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: Function module is not getting executed when report is run in Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388418#M9496</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Did you write the custom function module? Either the FM tries to do something in the foreground for which it needs user interaction, or there is a piece of code checking sy-batch, or when you execute it in the background it uses a different user and that one is missing authorizations or missing user parameters.&lt;/P&gt;&lt;P&gt;Kind regards, Rob Dielemans&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2016 09:49:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388418#M9496</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-11-15T09:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: Function module is not getting executed when report is run in Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388419#M9497</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;It should be dumping then... some FM, indeed, are not meant to be executed in background. But, then you would receive a dump... Otherwise, I wonder how you claim that it was not executed. Log the action through ST05 and see what happens...&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Eli&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2016 09:54:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388419#M9497</guid>
      <dc:creator>iklovski</dc:creator>
      <dc:date>2016-11-15T09:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: Function module is not getting executed when report is run in Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388420#M9498</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Can you also provide info on the scenario which necessitated creation of RFCs in the background through a Custom FM rather than using SM59.&lt;/P&gt;&lt;P&gt;Are you are creating RFC using a BDC on SM59 ?&lt;/P&gt;&lt;P&gt;K.Kiran.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2016 10:48:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388420#M9498</guid>
      <dc:creator>kiran_k8</dc:creator>
      <dc:date>2016-11-15T10:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: Function module is not getting executed when report is run in Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388421#M9499</link>
      <description>&lt;P&gt;Hi Matthew,&lt;/P&gt;&lt;P&gt;Here is the code I used&lt;/P&gt;&lt;P&gt;REPORT ztest.&lt;BR /&gt;DATA:&lt;BR /&gt;lv_tasklist TYPE stc_scenario_id,&lt;BR /&gt;* ls_sid TYPE syst_sysid,&lt;BR /&gt;it_return TYPE bapirettab.&lt;BR /&gt;&lt;BR /&gt;lv_tasklist = 'Ztasklist_test'&lt;BR /&gt;&lt;BR /&gt;CALL FUNCTION 'Ztest' &lt;BR /&gt;EXPORTING&lt;BR /&gt;tasklist_name = lv_tasklist&lt;BR /&gt;system_id = sy-sysid&lt;BR /&gt;TABLES&lt;BR /&gt;it_return = it_return&lt;BR /&gt;EXCEPTIONS&lt;BR /&gt;errors_occurred = 1&lt;BR /&gt;no_data = 2&lt;BR /&gt;rfc_failed = 3&lt;BR /&gt;failed_updation = 4&lt;BR /&gt;OTHERS = 5.&lt;BR /&gt;COMMIT WORK.&lt;BR /&gt;&lt;BR /&gt;IF sy-subrc = 0.&lt;BR /&gt;WRITE: 'Entries updated'.&lt;BR /&gt;* Implement suitable error handling here&lt;BR /&gt;ENDIF.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2016 12:39:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388421#M9499</guid>
      <dc:creator>former_member296189</dc:creator>
      <dc:date>2016-11-15T12:39:24Z</dc:date>
    </item>
    <item>
      <title>Re: Function module is not getting executed when report is run in Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388422#M9500</link>
      <description>&lt;P&gt;I have created RFC Using Standard FM for RFC creation. and I created RFC in the FM as I need too update table in a different system&lt;/P&gt;&lt;P&gt;In order to connect to that system I have created a RFC in the FM&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2016 12:40:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388422#M9500</guid>
      <dc:creator>former_member296189</dc:creator>
      <dc:date>2016-11-15T12:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: Function module is not getting executed when report is run in Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388423#M9501</link>
      <description>&lt;P&gt;Sorry I did not get the concept of logging into the program&lt;/P&gt;&lt;P&gt;Can you please explain&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2016 12:41:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388423#M9501</guid>
      <dc:creator>former_member296189</dc:creator>
      <dc:date>2016-11-15T12:41:16Z</dc:date>
    </item>
    <item>
      <title>Re: Function module is not getting executed when report is run in Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388424#M9502</link>
      <description>&lt;P&gt;Yes, I have created the custom FM, I have passed all the required parameters&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2016 12:41:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388424#M9502</guid>
      <dc:creator>former_member296189</dc:creator>
      <dc:date>2016-11-15T12:41:57Z</dc:date>
    </item>
    <item>
      <title>Re: Function module is not getting executed when report is run in Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388425#M9503</link>
      <description>&lt;P&gt;I am not getting any dump and I will try checking ST05 now&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2016 12:42:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388425#M9503</guid>
      <dc:creator>former_member296189</dc:creator>
      <dc:date>2016-11-15T12:42:24Z</dc:date>
    </item>
    <item>
      <title>Re: Function module is not getting executed when report is run in Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388426#M9504</link>
      <description>&lt;P&gt;Umm, you check for dumps in ST22&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2016 12:54:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388426#M9504</guid>
      <dc:creator>raghug</dc:creator>
      <dc:date>2016-11-15T12:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: Function module is not getting executed when report is run in Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388427#M9505</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm not interested in  parameters I'm interested in which ABAP code that you have written behaves differently depending on foreground or background. For instance: do you use a popup function module? &lt;/P&gt;&lt;P&gt;Kind regards, Rob Dielemans&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2016 13:22:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388427#M9505</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-11-15T13:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: Function module is not getting executed when report is run in Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388428#M9506</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Inside the Function module I am creating a RFC for different system (say ABC) and updating a custom Table in that system(ABC) and No pop up FM's are used or any code that requires information from fore ground.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2016 15:13:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388428#M9506</guid>
      <dc:creator>former_member296189</dc:creator>
      <dc:date>2016-11-15T15:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: Function module is not getting executed when report is run in Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388429#M9507</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The exceptions of your FM is immediately followed by a commit work, which means that sy-subrc will either be 0 or 4.&lt;/P&gt;&lt;P&gt;Kind regards, Rob Dielemans&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2016 15:49:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388429#M9507</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-11-15T15:49:56Z</dc:date>
    </item>
    <item>
      <title>Re: Function module is not getting executed when report is run in Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388430#M9508</link>
      <description>&lt;P&gt;Correction sy-subrc is always 0&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2016 15:55:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388430#M9508</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-11-15T15:55:41Z</dc:date>
    </item>
    <item>
      <title>Re: Function module is not getting executed when report is run in Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388431#M9509</link>
      <description>&lt;P&gt;Yes,&lt;/P&gt;&lt;P&gt;But the Issue I am facing is the Function module is not getting Executed in Background&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2016 17:23:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388431#M9509</guid>
      <dc:creator>former_member296189</dc:creator>
      <dc:date>2016-11-15T17:23:15Z</dc:date>
    </item>
    <item>
      <title>Re: Function module is not getting executed when report is run in Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388432#M9510</link>
      <description>&lt;P&gt;And still there is no answer on how exactly you established that FM does not work and no code posted of what the FM does... &lt;/P&gt;&lt;P&gt;What have you tried so far to troubleshoot this? Quick Google search for "does not work in background site:sap.com" should've found all the answers regarding what the differences are. And if you can't debug in background then how about adding some messages to display in the job log? ("Logging" is a common programming concept.)&lt;/P&gt;&lt;P&gt;How did you get a job at SAP? If you are an intern/trainee then there should be a trainer assigned to you. SCN is not a replacement for this, sorry.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2016 17:39:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-is-not-getting-executed-when-report-is-run-in-background/m-p/388432#M9510</guid>
      <dc:creator>Jelena_Perfiljeva</dc:creator>
      <dc:date>2016-11-15T17:39:17Z</dc:date>
    </item>
  </channel>
</rss>

