<?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: capturing messages from background session in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-messages-from-background-session/m-p/1059311#M91380</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;BP_JOBLOG_READ will give you the "job log" for the job, but will not give you the actual output of the lists, which is what I think you are after, right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Nov 2005 18:54:24 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2005-11-09T18:54:24Z</dc:date>
    <item>
      <title>capturing messages from background session</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-messages-from-background-session/m-p/1059307#M91376</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;I'm running an ABAP report in which I call a function module in several different tasks. This function module is eventually submitting RSNAST00 for generating the outputs. I want to capture the messages for the log like they appear in the job log if RSNAST00 is scheduled in the background job using SM36.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since I'm using SUBMIT and RETURN, it runs in a new internal session. Also I do not get back anything in the EXPORTING LIST TO MEMORY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way to capture the system messages that have been generated during that RSNAST00 run.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in anticipation,&lt;/P&gt;&lt;P&gt;Satya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2005 18:37:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-messages-from-background-session/m-p/1059307#M91376</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-09T18:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: capturing messages from background session</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-messages-from-background-session/m-p/1059308#M91377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use this function module BP_JOBLOG_READ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2005 18:40:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-messages-from-background-session/m-p/1059308#M91377</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-09T18:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: capturing messages from background session</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-messages-from-background-session/m-p/1059309#M91378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you need these messages right away,  or do you really want to see them in a job log like in SM37.   Reason why I ask, is you can create a background job on the fly and submit it, then the error jog would be visible from SM37.  So do you need the error log coming back to you at runtime?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example for submitting job in background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001 .

data:   l_valid,
        ls_params like pri_params,
        l_jobcount like tbtcjob-jobcount,
        l_jobname  like tbtcjob-jobname.

start-of-selection.

* Get Print Parameters
  call function 'GET_PRINT_PARAMETERS'
       exporting
            no_dialog      = 'X'
       importing
            valid          = l_valid
            out_parameters = ls_params.

* Open Job
  l_jobname = 'RSNAST00'.
  call function 'JOB_OPEN'
       exporting
            jobname  = l_jobname
       importing
            jobcount = l_jobcount.

* Submit report to job
  submit RSNAST00
       via job     l_jobname
           number  l_jobcount
       to sap-spool without spool dynpro
           spool parameters ls_params
                       and return.

* Schedule and close job.
  call function 'JOB_CLOSE'
       exporting
            jobcount  = l_jobcount
            jobname   = l_jobname
            strtimmed = 'X'.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2005 18:46:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-messages-from-background-session/m-p/1059309#M91378</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-11-09T18:46:41Z</dc:date>
    </item>
    <item>
      <title>Re: capturing messages from background session</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-messages-from-background-session/m-p/1059310#M91379</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 problem is the my Z program says 100 records. split in 5 sessions of 20 each.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I call a 'Z' function module starting in new task&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;within that i say SUBMIT RSNAST00 with ...&lt;/P&gt;&lt;P&gt;                                       ....&lt;/P&gt;&lt;P&gt;                         and return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dont have the job number here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are some problems when you try to use the FM JOB_OPEN, JOB_SUBMIT AND JOB_CLOSE in a BACKGROUND PROCESS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way I can get the job number during SUBMIT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Satya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2005 18:54:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-messages-from-background-session/m-p/1059310#M91379</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-09T18:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: capturing messages from background session</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-messages-from-background-session/m-p/1059311#M91380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;BP_JOBLOG_READ will give you the "job log" for the job, but will not give you the actual output of the lists, which is what I think you are after, right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2005 18:54:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-messages-from-background-session/m-p/1059311#M91380</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-11-09T18:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: capturing messages from background session</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-messages-from-background-session/m-p/1059312#M91381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In order to have a job number it must be scheduled to run in a batch job either thru SM36 or on the fly with the code above.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me try to get a handle on your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have a "Z" program which uses paraellel processing and in that call to the function module, it submits the "NAST" program and you need to get the output of the NAST program and bring it back to the "Z" program?&lt;/P&gt;&lt;P&gt;&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;Rich HEilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2005 19:00:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-messages-from-background-session/m-p/1059312#M91381</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-11-09T19:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: capturing messages from background session</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-messages-from-background-session/m-p/1059313#M91382</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 main program ZRSNAST00 is running in a background job.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it then calls Z_PROCESS_RSNAST00 function module in 5 different tasks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;within the Z_PROCESS_RSNAST00 function module RSNAST00 is to be submitted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is that since its already into a background session which is using a batch job and that job is not yet closed. Will the JOB_OPEN function module not fail in certain or all cases?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rich, if you can help me on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;Satya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2005 19:05:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-messages-from-background-session/m-p/1059313#M91382</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-09T19:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: capturing messages from background session</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-messages-from-background-session/m-p/1059314#M91383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You know, I don't know if it would fail or not.  I have to think that a background job spawning other background jobs would be allowed.  But you may run out of Background processes if you only have a couple.  I would try it out.   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will try it with my example program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2005 19:14:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-messages-from-background-session/m-p/1059314#M91383</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-11-09T19:14:18Z</dc:date>
    </item>
    <item>
      <title>Re: capturing messages from background session</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-messages-from-background-session/m-p/1059315#M91384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, I submitted this program in background, it creates 4 more jobs calling my test program ZRICH_0005.  In that program, I am just issuing a message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No problems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001 .

data:   l_valid,
        ls_params like pri_params,
        l_jobcount like tbtcjob-jobcount,
        l_jobname  like tbtcjob-jobname.

parameters: p_check.

start-of-selection.

  do 4 times.

* Get Print Parameters
    call function 'GET_PRINT_PARAMETERS'
         exporting
              no_dialog      = 'X'
         importing
              valid          = l_valid
              out_parameters = ls_params.

* Open Job
    clear l_jobname.
    l_jobname = sy-index.
    shift l_jobname left deleting leading space.
    concatenate 'ZRICH_0005' l_jobname into l_jobname.

    call function 'JOB_OPEN'
         exporting
              jobname  = l_jobname
         importing
              jobcount = l_jobcount.

* Submit report to job
    submit zrich_0005
         via job     l_jobname
             number  l_jobcount
         to sap-spool without spool dynpro
             spool parameters ls_params
                         and return.

* Schedule and close job.
    call function 'JOB_CLOSE'
         exporting
              jobcount  = l_jobcount
              jobname   = l_jobname
              strtimmed = 'X'.

  enddo.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2005 19:23:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-messages-from-background-session/m-p/1059315#M91384</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-11-09T19:23:55Z</dc:date>
    </item>
  </channel>
</rss>

