<?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 for Finding Job Log &amp; Spool for specific Job Date in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-finding-job-log-spool-for-specific-job-date/m-p/1891043#M373032</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;go to SE80 and Function Group &amp;lt;b&amp;gt; BTCH &amp;lt;/b&amp;gt;..&lt;/P&gt;&lt;P&gt;U will find FMs related to Batch Job..&lt;/P&gt;&lt;P&gt;amit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Jan 2007 05:54:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-01-09T05:54:15Z</dc:date>
    <item>
      <title>Function Module for Finding Job Log &amp; Spool for specific Job Date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-finding-job-log-spool-for-specific-job-date/m-p/1891040#M373029</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;Could any one let me know the name of function module to retrieve the Job Log &amp;amp; Spool for specified Date? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to apply Select Queries on Job Log/Spool of Job which has already run some days back. So I am in search of some efficient way by means of which I can retrieve Job Log/ Spool of Job which ran a few days back . I feel that there must be some Function module which would retrieve Job Log/Spool. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me out by making me aware with the same.&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Jigar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jan 2007 12:04:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-finding-job-log-spool-for-specific-job-date/m-p/1891040#M373029</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-08T12:04:09Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module for Finding Job Log &amp; Spool for specific Job Date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-finding-job-log-spool-for-specific-job-date/m-p/1891041#M373030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use JOB_OPEN, pass the job name &amp;amp; get the jobcount which is a unique id to refer to your job.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then use JOB_SUBMIT to Submit the job in background. Here you need to pass the jobname &amp;amp; jobcount. If you want the spool output to go to a printer then use GET_PRINT_PARAMETERS to get the print parameters &amp;amp; pass the same in JOB_SUBMIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then close the Job using JOB_CLOSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get the spool number use FM BP_JOB_READ. Pass jobname &amp;amp; jobcount &amp;amp; get job steplist. Read the same &amp;amp; get the spool number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REFRESH : i_jobsteplist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET PF-STATUS 'AGENCY'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the Spool Number&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BP_JOB_READ'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;job_read_jobcount = w_jobcount&lt;/P&gt;&lt;P&gt;job_read_jobname = w_jobname&lt;/P&gt;&lt;P&gt;job_read_opcode = '20'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;JOB_STEP_NUMBER =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;job_read_jobhead = wa_jobhead&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;job_read_steplist = i_jobsteplist&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CHANGING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;RET =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;invalid_opcode = 1&lt;/P&gt;&lt;P&gt;job_doesnt_exist = 2&lt;/P&gt;&lt;P&gt;job_doesnt_have_steps = 3&lt;/P&gt;&lt;P&gt;OTHERS = 4&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Read the Job Step list to get the spool number&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-------------------------------------------" /&gt;&lt;P&gt;READ TABLE i_jobsteplist INTO wa_jobsteplist INDEX 1.&lt;/P&gt;&lt;P&gt;CHECK wa_jobsteplist-listident &amp;lt;&amp;gt; space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Spool Number&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="------------" /&gt;&lt;P&gt;l_rqident = wa_jobsteplist-listident.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Check the spool in TSP01&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------------------" /&gt;&lt;P&gt;SELECT SINGLE * FROM tsp01 WHERE rqident = l_rqident.&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;LEAVE TO LIST-PROCESSING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="--------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Display the Spool Content on Screen&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="--------------------------------" /&gt;&lt;P&gt;CALL FUNCTION 'RSPO_DISPLAY_SPOOLJOB'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;rqident = l_rqident&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FIRST_LINE = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;LAST_LINE =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;no_such_job = 1&lt;/P&gt;&lt;P&gt;job_contains_no_data = 2&lt;/P&gt;&lt;P&gt;selection_empty = 3&lt;/P&gt;&lt;P&gt;no_permission = 4&lt;/P&gt;&lt;P&gt;can_not_access = 5&lt;/P&gt;&lt;P&gt;read_error = 6&lt;/P&gt;&lt;P&gt;OTHERS = 7&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get the status of the job, get Jobhead from FM BP_JOB_READ. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;To Display the STATUS of the JOB which is exectued in background&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR : wa_jobsteplist.&lt;/P&gt;&lt;P&gt;REFRESH : i_jobsteplist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE:/ text-044. " 'DISPLAYING JOB STATUS'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BP_JOB_READ'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;job_read_jobcount = w_jobcount&lt;/P&gt;&lt;P&gt;job_read_jobname = w_jobname&lt;/P&gt;&lt;P&gt;job_read_opcode = '20'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;JOB_STEP_NUMBER =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;job_read_jobhead = wa_jobhead&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;job_read_steplist = i_jobsteplist&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CHANGING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;RET =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;invalid_opcode = 1&lt;/P&gt;&lt;P&gt;job_doesnt_exist = 2&lt;/P&gt;&lt;P&gt;job_doesnt_have_steps = 3&lt;/P&gt;&lt;P&gt;OTHERS = 4&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;HR originaltext="-----------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;To Display the status text as per the status type&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------" /&gt;&lt;P&gt;CASE wa_jobhead-status.&lt;/P&gt;&lt;P&gt;WHEN 'S'. WRITE: / text-045. "'Scheduled'.&lt;/P&gt;&lt;P&gt;WHEN 'R'. WRITE: / text-046. "'Released'.&lt;/P&gt;&lt;P&gt;WHEN 'F'. WRITE: / text-047. "'Completed'.&lt;/P&gt;&lt;P&gt;WHEN 'A'. WRITE: / text-048. "'Cancelled'.&lt;/P&gt;&lt;P&gt;WHEN OTHERS.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, inorder to see the job log :-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;To display the log of the background program&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LEAVE TO LIST-PROCESSING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BP_JOBLOG_SHOW_SM37B'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;client = sy-mandt&lt;/P&gt;&lt;P&gt;jobcount = w_jobcount&lt;/P&gt;&lt;P&gt;joblogid = ' '&lt;/P&gt;&lt;P&gt;jobname = w_jobname&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;error_reading_jobdata = 1&lt;/P&gt;&lt;P&gt;error_reading_joblog_data = 2&lt;/P&gt;&lt;P&gt;jobcount_missing = 3&lt;/P&gt;&lt;P&gt;joblog_does_not_exist = 4&lt;/P&gt;&lt;P&gt;joblog_is_empty = 5&lt;/P&gt;&lt;P&gt;joblog_show_canceled = 6&lt;/P&gt;&lt;P&gt;jobname_missing = 7&lt;/P&gt;&lt;P&gt;job_does_not_exist = 8&lt;/P&gt;&lt;P&gt;no_joblog_there_yet = 9&lt;/P&gt;&lt;P&gt;no_show_privilege_given = 10&lt;/P&gt;&lt;P&gt;OTHERS = 11.&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jan 2007 12:07:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-finding-job-log-spool-for-specific-job-date/m-p/1891041#M373030</guid>
      <dc:creator>former_member188829</dc:creator>
      <dc:date>2007-01-08T12:07:41Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module for Finding Job Log &amp; Spool for specific Job Date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-finding-job-log-spool-for-specific-job-date/m-p/1891042#M373031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thanks a lot for such a quick answer....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In order to get the Job Log, we need to pass Job Log ID .Could you please let me know how to get the Job Log ID? I am interested for getting Job Log of some specific Date. My job runs daily  and I would like to get the JOb Log of Job which ran couple of days back. Also my requirement is to store the this Job Log inside one internal Table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jan 2007 05:51:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-finding-job-log-spool-for-specific-job-date/m-p/1891042#M373031</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-09T05:51:56Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module for Finding Job Log &amp; Spool for specific Job Date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-finding-job-log-spool-for-specific-job-date/m-p/1891043#M373032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;go to SE80 and Function Group &amp;lt;b&amp;gt; BTCH &amp;lt;/b&amp;gt;..&lt;/P&gt;&lt;P&gt;U will find FMs related to Batch Job..&lt;/P&gt;&lt;P&gt;amit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jan 2007 05:54:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-finding-job-log-spool-for-specific-job-date/m-p/1891043#M373032</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-09T05:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module for Finding Job Log &amp; Spool for specific Job Date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-finding-job-log-spool-for-specific-job-date/m-p/1891044#M373033</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;Please use the following FM to retrieve the JOBLOG.&lt;/P&gt;&lt;P&gt;BP_JOBLOG_READ&lt;/P&gt;&lt;P&gt;BP_JOBLOG_SHOW&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RSPO_DISPLAY_SPOOLJOB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Bhupal Reddy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jan 2007 05:55:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-finding-job-log-spool-for-specific-job-date/m-p/1891044#M373033</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-09T05:55:05Z</dc:date>
    </item>
  </channel>
</rss>

