<?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 Return value from the called program to the calling program in submit stmt in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-value-from-the-called-program-to-the-calling-program-in-submit-stmt/m-p/4134440#M988735</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 have a report_1 that is scheduled as a background job. this report is calling another report_2 through submit. Now there could be error or success of report_2 and then it gets updated in SM37.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SUBMIT report_2&lt;/P&gt;&lt;P&gt;      WITH bill_no = gs_bill_no-vbeln&lt;/P&gt;&lt;P&gt;       AND RETURN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently SM37 is not getting updated but it shows the stauts finished even if its an error.&lt;/P&gt;&lt;P&gt;How do i return that error value to report_1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Jun 2008 07:36:42 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-30T07:36:42Z</dc:date>
    <item>
      <title>Return value from the called program to the calling program in submit stmt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-value-from-the-called-program-to-the-calling-program-in-submit-stmt/m-p/4134440#M988735</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 have a report_1 that is scheduled as a background job. this report is calling another report_2 through submit. Now there could be error or success of report_2 and then it gets updated in SM37.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SUBMIT report_2&lt;/P&gt;&lt;P&gt;      WITH bill_no = gs_bill_no-vbeln&lt;/P&gt;&lt;P&gt;       AND RETURN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently SM37 is not getting updated but it shows the stauts finished even if its an error.&lt;/P&gt;&lt;P&gt;How do i return that error value to report_1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 07:36:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-value-from-the-called-program-to-the-calling-program-in-submit-stmt/m-p/4134440#M988735</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-30T07:36:42Z</dc:date>
    </item>
    <item>
      <title>Re: Return value from the called program to the calling program in submit stmt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-value-from-the-called-program-to-the-calling-program-in-submit-stmt/m-p/4134441#M988736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi...use job open and job close..... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'JOB_OPEN'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            jobname          = wf_jobname&lt;/P&gt;&lt;P&gt;            sdlstrtdt        = sy-datlo&lt;/P&gt;&lt;P&gt;            sdlstrttm        = wf_timlo&lt;/P&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;            jobcount         = wf_jobcount&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            cant_create_job  = 1&lt;/P&gt;&lt;P&gt;            invalid_job_data = 2&lt;/P&gt;&lt;P&gt;            jobname_missing  = 3&lt;/P&gt;&lt;P&gt;            OTHERS           = 4.&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;    RAISING action_not_performed.&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;&lt;/P&gt;&lt;P&gt;SUBMIT ZPROGRAM&lt;/P&gt;&lt;P&gt;        AND RETURN&lt;/P&gt;&lt;P&gt;        VIA JOB wf_jobname NUMBER wf_jobcount&lt;/P&gt;&lt;P&gt;        TO SAP-SPOOL WITHOUT SPOOL DYNPRO&lt;/P&gt;&lt;P&gt;        KEEP IN SPOOL xflag_gc.&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;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'JOB_CLOSE'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            jobcount             = wf_jobcount&lt;/P&gt;&lt;P&gt;            jobname              = wf_jobname&lt;/P&gt;&lt;P&gt;            sdlstrtdt            = sy-datum&lt;/P&gt;&lt;P&gt;            sdlstrttm            = sy-uzeit&lt;/P&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;            job_was_released     = wf_job_release&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            cant_start_immediate = 1&lt;/P&gt;&lt;P&gt;            invalid_startdate    = 2&lt;/P&gt;&lt;P&gt;            jobname_missing      = 3&lt;/P&gt;&lt;P&gt;            job_close_failed     = 4&lt;/P&gt;&lt;P&gt;            job_nosteps          = 5&lt;/P&gt;&lt;P&gt;            job_notex            = 6&lt;/P&gt;&lt;P&gt;            lock_failed          = 7&lt;/P&gt;&lt;P&gt;            OTHERS               = 8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc NE 0 OR&lt;/P&gt;&lt;P&gt;     ( sy-subrc EQ 0 AND wf_job_release NE xflag_gc ).&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;    RAISING action_not_performed.&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;based on sy-subrc u can determine the success or failure...&lt;/P&gt;&lt;P&gt;Reward points if useful.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 07:40:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-value-from-the-called-program-to-the-calling-program-in-submit-stmt/m-p/4134441#M988736</guid>
      <dc:creator>former_member195383</dc:creator>
      <dc:date>2008-06-30T07:40:01Z</dc:date>
    </item>
  </channel>
</rss>

