<?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 Job log in background processing in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/job-log-in-background-processing/m-p/3241117#M773491</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;I am executing a report in background mode and based on some conditions i need to show an error log to the user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My code looks like following -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  if pa_upda = 'X'.  " If report running in background mode
    loop at t_final into w_final.
      CALL METHOD CL_EMMA_CASE_FUNCTIONS=&amp;gt;CANCEL_NO_DIALOG
        EXPORTING
          IV_CASENR     = w_final-casenr
          IV_CURRPROC   = SY-UNAME
          IV_CANCODE    = c_canccode
          IV_TESTRUN    = ' '
        EXCEPTIONS
          CANCEL_FAILED = 1
          others        = 2.

*logic to show the log
      IF SY-SUBRC &amp;lt;&amp;gt; 0.
        case sy-subrc.
          when '1'.
            w_final-message = text-002.
            write:/ w_final-casenr,20 w_final-anlage,40  w_final-message.

          when '2'.
            w_final-message = text-003.
            write:/ w_final-casenr,20 w_final-anlage,40  w_final-message.

        endcase.
      endif.
      clear w_final.
    endloop.
  else.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when i go to SM37 and see the job log i am not able to see the contents of my write statement.Can anyone help me out with these or suggest me some alternate solution..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code Formatted by: Alvaro Tejada Galindo on Jan 8, 2009 4:31 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Jan 2008 07:28:06 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-17T07:28:06Z</dc:date>
    <item>
      <title>Job log in background processing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/job-log-in-background-processing/m-p/3241117#M773491</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;I am executing a report in background mode and based on some conditions i need to show an error log to the user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My code looks like following -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  if pa_upda = 'X'.  " If report running in background mode
    loop at t_final into w_final.
      CALL METHOD CL_EMMA_CASE_FUNCTIONS=&amp;gt;CANCEL_NO_DIALOG
        EXPORTING
          IV_CASENR     = w_final-casenr
          IV_CURRPROC   = SY-UNAME
          IV_CANCODE    = c_canccode
          IV_TESTRUN    = ' '
        EXCEPTIONS
          CANCEL_FAILED = 1
          others        = 2.

*logic to show the log
      IF SY-SUBRC &amp;lt;&amp;gt; 0.
        case sy-subrc.
          when '1'.
            w_final-message = text-002.
            write:/ w_final-casenr,20 w_final-anlage,40  w_final-message.

          when '2'.
            w_final-message = text-003.
            write:/ w_final-casenr,20 w_final-anlage,40  w_final-message.

        endcase.
      endif.
      clear w_final.
    endloop.
  else.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when i go to SM37 and see the job log i am not able to see the contents of my write statement.Can anyone help me out with these or suggest me some alternate solution..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code Formatted by: Alvaro Tejada Galindo on Jan 8, 2009 4:31 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jan 2008 07:28:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/job-log-in-background-processing/m-p/3241117#M773491</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-17T07:28:06Z</dc:date>
    </item>
    <item>
      <title>Re: Job log in background processing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/job-log-in-background-processing/m-p/3241118#M773492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; There will a list button on the application custom tool bar then u can see ur write statements on the list in se37.&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR - REQUEST OR OFFER POINTS ARE FORBIDDEN&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Jan 8, 2009 4:32 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jan 2008 07:30:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/job-log-in-background-processing/m-p/3241118#M773492</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-17T07:30:11Z</dc:date>
    </item>
    <item>
      <title>Re: Job log in background processing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/job-log-in-background-processing/m-p/3241119#M773493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arun,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to show your messages in the job log you have to use the MESSAGE statement. In case you use WRITE statements an output list be created which can be found in the spool (there is an icon to go to the spool directly).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jan 2008 07:32:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/job-log-in-background-processing/m-p/3241119#M773493</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-17T07:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: Job log in background processing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/job-log-in-background-processing/m-p/3241120#M773494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2009 21:23:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/job-log-in-background-processing/m-p/3241120#M773494</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-08T21:23:36Z</dc:date>
    </item>
  </channel>
</rss>

