<?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: SUBMIT VIA JOB MESSAGE TYPE 'E' in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-via-job-message-type-e/m-p/980095#M71754</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your attention. I'm already found solution for this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The question was how to get error message type 'E' from report called through SUBMIT VIA JOB. Everytime when this message occurs in report we got full terminate(right after SUBMIT VIA JOB) of the calling module(especially in RFC-call). So after all we got clear log and open job. But I need to handle all errors from report in a normal way, after 'JOB_CLOSE'. How could it be? I don't know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I found my own solution. I wrote additional FM where I put my SUBMIT VIA JOB. And then I replaced my SUBMIT-call with FM-call with addition "STARTING NEW TASK..." and "PERFORMING return_info ON END OF TASK". Where in return_info form I get all message errors(even type 'E') from message text of the exceptions COMMUNICATION_FAILURE and SYSTEM_FAILURE of the RECEIVE command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After all of this, I want to say, that it was a really big trick, but IT WORKS! I'm really happy. &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Aug 2005 16:15:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-08-16T16:15:01Z</dc:date>
    <item>
      <title>SUBMIT VIA JOB MESSAGE TYPE 'E'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-via-job-message-type-e/m-p/980092#M71751</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 help me, I can't use submit via background job, because he can't handle message errors of type 'E'. When this kind of message occurs, all background processing stops and I get a report screen with this message in the status bar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any solution?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Aug 2005 09:26:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-via-job-message-type-e/m-p/980092#M71751</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-15T09:26:27Z</dc:date>
    </item>
    <item>
      <title>Re: SUBMIT VIA JOB MESSAGE TYPE 'E'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-via-job-message-type-e/m-p/980093#M71752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you saying that you want to continue processing even though you may have a critical error?  Please expand on your requirement.&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>Mon, 15 Aug 2005 13:07:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-via-job-message-type-e/m-p/980093#M71752</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-08-15T13:07:50Z</dc:date>
    </item>
    <item>
      <title>Re: SUBMIT VIA JOB MESSAGE TYPE 'E'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-via-job-message-type-e/m-p/980094#M71753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let me understand this. You have a program A from which you submit a program B in the background and if in program B an error is raised, your program A execution stops. Is this true?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you do a job close in your code. Here is a sample program ZTEST1 that submits another program ZTEST2 in the background. If there is an error message thrown out in ZTEST2, the job submitted is cancelled, with the job log showing the error message. The processing of ZTEST1 continues even after that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know why yours is not. Please let us know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;Program ZTEST1&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT ztest1 .

PARAMETERS: p_matnr1 LIKE mara-matnr.

DATA: v_jobcount LIKE tbtcjob-jobcount,
      v_jobname  LIKE tbtcjob-jobname.

START-OF-SELECTION.

  v_jobname = 'TESTJOB'.

*-- open the job
  CALL FUNCTION 'JOB_OPEN'
       EXPORTING
            jobname          = v_jobname
       IMPORTING
            jobcount         = v_jobcount
       EXCEPTIONS
            cant_create_job  = 1
            invalid_job_data = 2
            jobname_missing  = 3
            OTHERS           = 4.
  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
*-- submit the report
  SUBMIT ztest2 WITH p_matnr2 = p_matnr1
                USER sy-uname VIA JOB v_jobname
              NUMBER v_jobcount AND RETURN.
*-- close the job
  CALL FUNCTION 'JOB_CLOSE'
       EXPORTING
            jobcount             = v_jobcount
            jobname              = v_jobname
            strtimmed            = 'X'
       EXCEPTIONS
            cant_start_immediate = 1
            invalid_startdate    = 2
            jobname_missing      = 3
            job_close_failed     = 4
            job_nosteps          = 5
            job_notex            = 6
            lock_failed          = 7
            OTHERS               = 8.
  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.

  WRITE:/ 'Job submitted successfully.'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;Program ZTEST2&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT ztest2 MESSAGE-ID zz.


PARAMETERS: p_matnr2 LIKE mara-matnr.


DATA: itab LIKE mara OCCURS 0 WITH HEADER LINE.

START-OF-SELECTION.

  SELECT * INTO TABLE itab FROM mara
                          WHERE matnr = p_matnr2.
  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE e000 WITH 'Invalid material number'.
  ENDIF.

  LOOP AT itab.
    WRITE:/ itab-matnr.
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Aug 2005 17:32:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-via-job-message-type-e/m-p/980094#M71753</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-15T17:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: SUBMIT VIA JOB MESSAGE TYPE 'E'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-via-job-message-type-e/m-p/980095#M71754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your attention. I'm already found solution for this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The question was how to get error message type 'E' from report called through SUBMIT VIA JOB. Everytime when this message occurs in report we got full terminate(right after SUBMIT VIA JOB) of the calling module(especially in RFC-call). So after all we got clear log and open job. But I need to handle all errors from report in a normal way, after 'JOB_CLOSE'. How could it be? I don't know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I found my own solution. I wrote additional FM where I put my SUBMIT VIA JOB. And then I replaced my SUBMIT-call with FM-call with addition "STARTING NEW TASK..." and "PERFORMING return_info ON END OF TASK". Where in return_info form I get all message errors(even type 'E') from message text of the exceptions COMMUNICATION_FAILURE and SYSTEM_FAILURE of the RECEIVE command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After all of this, I want to say, that it was a really big trick, but IT WORKS! I'm really happy. &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Aug 2005 16:15:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-via-job-message-type-e/m-p/980095#M71754</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-16T16:15:01Z</dc:date>
    </item>
  </channel>
</rss>

