<?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 Problem calling function in background in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-calling-function-in-background/m-p/5058281#M1175619</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   I've a problem calling a function in background task. This is the involved code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
                            CALL FUNCTION 'ZRECEP_COMPRA_DIRECTA_MMPP' IN BACKGROUND TASK
                              EXPORTING
                                num_pedido   = wg_24_temp-pedido
                                entrega_exp  = wg_24_temp-entrega
                                estado         = wg_24_temp-estado
                              TABLES
                                datos_pedido = wt_sd_105_temp[]
                                wt_ltap      = wt_ltap_temp[].
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that function is not executed on background. I execute this code and check SM50, and the process is not there. But the most incredible is that sometimes the background process is executed fine. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've this code at the beginning of the funcion  ZRECEP_COMPRA_DIRECTA_MMPP to ensure the background process could be seen (and debugged) on SM50 (my user is DANIP)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  if sy-uname = 'DANIP'.
    data: aux value '2'.

    while aux = '2'.

    endwhile.
  endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm on SAP ECC 6.0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anybody knows if exists any system parameter which maybe controls something related to background processing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Jan 2009 13:22:19 GMT</pubDate>
    <dc:creator>danielpalacios3</dc:creator>
    <dc:date>2009-01-20T13:22:19Z</dc:date>
    <item>
      <title>Problem calling function in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-calling-function-in-background/m-p/5058281#M1175619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   I've a problem calling a function in background task. This is the involved code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
                            CALL FUNCTION 'ZRECEP_COMPRA_DIRECTA_MMPP' IN BACKGROUND TASK
                              EXPORTING
                                num_pedido   = wg_24_temp-pedido
                                entrega_exp  = wg_24_temp-entrega
                                estado         = wg_24_temp-estado
                              TABLES
                                datos_pedido = wt_sd_105_temp[]
                                wt_ltap      = wt_ltap_temp[].
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that function is not executed on background. I execute this code and check SM50, and the process is not there. But the most incredible is that sometimes the background process is executed fine. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've this code at the beginning of the funcion  ZRECEP_COMPRA_DIRECTA_MMPP to ensure the background process could be seen (and debugged) on SM50 (my user is DANIP)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  if sy-uname = 'DANIP'.
    data: aux value '2'.

    while aux = '2'.

    endwhile.
  endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm on SAP ECC 6.0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anybody knows if exists any system parameter which maybe controls something related to background processing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jan 2009 13:22:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-calling-function-in-background/m-p/5058281#M1175619</guid>
      <dc:creator>danielpalacios3</dc:creator>
      <dc:date>2009-01-20T13:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: Problem calling function in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-calling-function-in-background/m-p/5058282#M1175620</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;The function module calling in BACKGROUND TASK way runs only if a COMMIT WORK is forced: so have u inserted a COMMIT WORK after calling your fm?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jan 2009 13:25:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-calling-function-in-background/m-p/5058282#M1175620</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-20T13:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: Problem calling function in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-calling-function-in-background/m-p/5058283#M1175621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Max&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   There was a COMMIT after this code but inside a LOOP that not always was executed. This is the reason why sometimes it works fine. Now i've put another COMMIT inmediately after the CALL FUNCTION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You've solved my problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jan 2009 13:33:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-calling-function-in-background/m-p/5058283#M1175621</guid>
      <dc:creator>danielpalacios3</dc:creator>
      <dc:date>2009-01-20T13:33:08Z</dc:date>
    </item>
  </channel>
</rss>

