<?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: background in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/background/m-p/1410468#M197749</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;You need to create two programs say Zreport1 and zreport2. From zreport1, you are passing selection parameters to zreport2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In ZREPORT1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Export it_tab&lt;/P&gt;&lt;P&gt;       to database db(idx) index indx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use FM : JOB_OPEN&lt;/P&gt;&lt;P&gt;Pass Job name &amp;amp; import Jobcount. Jobcount is unique id.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to set print parameters then use FM 'GET_PRINT_PARAMETERS'. If spool size is not important then this FM is not required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use FM : JOB_SUBMIT. pass report name as 'ZREPORT2'. This is the program which you want to call in background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of JOB_SUBMIT, you can also use SUBMIT &amp;lt;report&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use FM : JOB_CLOSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In ZREPORT2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Import it_tab&lt;/P&gt;&lt;P&gt;       from  database db(idx) index indx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_tab into wa_tab.&lt;/P&gt;&lt;P&gt;write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; wa_tab-matnr.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Jun 2006 15:16:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-06-19T15:16:25Z</dc:date>
    <item>
      <title>background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/background/m-p/1410461#M197742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want to create a program wants to run in background  ie batch job/ program that is scheduled periodically  ? can u give some ideas on it ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;points for sure for good answers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Srini&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jun 2006 10:06:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/background/m-p/1410461#M197742</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-19T10:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/background/m-p/1410462#M197743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Execute transaction &amp;lt;b&amp;gt;SM36&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Click Steps &lt;/P&gt;&lt;P&gt;Click ABAP/4 and type in the program name &lt;/P&gt;&lt;P&gt;Click Save &lt;/P&gt;&lt;P&gt;Finally fill in the Start date &lt;/P&gt;&lt;P&gt;In 4.6x, SAP provide a friendly GUI transaction code &amp;lt;b&amp;gt;SM36WIZ&amp;lt;/b&amp;gt; for users to submit jobs in the background. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Schedule Manager&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;Automate your routinue task with Schedule Manager.  It facilitate the definition, scheduling, execution, and review of tasks that are executed on a regular basis, such as period-end closing. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;SCMA&amp;lt;/b&amp;gt; - Schedule Manager &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Checking your program Background Job Status&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Checking  your job status with &amp;lt;b&amp;gt;SM50&amp;lt;/b&amp;gt; (processor type BTC) is more accurate then &amp;lt;b&amp;gt;SM37&amp;lt;/b&amp;gt;.  SAP updates the tables TBTCO wheneveryour background jobs status change.  If SAP is shutdown, the currentjobs might not be update ontime to the table. ( e.g. a background job wasshown as Active (SM37), in fact it real status should be Cancelled. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The type of work process: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DIA  - work process for executing dialog steps in user transactions &lt;/P&gt;&lt;P&gt;UPD - update process for executing U1 (time-critical) database changes &lt;/P&gt;&lt;P&gt;UP2  - update process for executing U2 (non-critical) database changes &lt;/P&gt;&lt;P&gt;ENQ - for setting and releasing locks on SAP lock objects &lt;/P&gt;&lt;P&gt;BTC  - for executing background jobs &lt;/P&gt;&lt;P&gt;SPO  - for spool formatting processes &lt;/P&gt;&lt;P&gt;PID:  Process ID of the work process. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Change the variants or SAP Printers of scheduled background jobs&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;SM37 - At the Job Overview screen, position your cursor at the scheduled jobs you want to changed (the jobs status must still be Released) &lt;/P&gt;&lt;P&gt;Click Job -&amp;gt; Change &lt;/P&gt;&lt;P&gt;Click the Steps button -&amp;gt; here you can move, add or delete addition programs steps to be run &lt;/P&gt;&lt;P&gt;Double click the program name you want to change &lt;/P&gt;&lt;P&gt;Click the Print specifications button if you want to change the SAP printers &lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;vinod&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jun 2006 10:09:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/background/m-p/1410462#M197743</guid>
      <dc:creator>vinod_gunaware2</dc:creator>
      <dc:date>2006-06-19T10:09:10Z</dc:date>
    </item>
    <item>
      <title>Re: background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/background/m-p/1410463#M197744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi srini,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Any program (se38) program,&lt;/P&gt;&lt;P&gt;   having a saved variant,&lt;/P&gt;&lt;P&gt;   can be run in background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Its only matter of scheduling this&lt;/P&gt;&lt;P&gt;   program to run in background,&lt;/P&gt;&lt;P&gt;  using SM36.&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;regards,&lt;/P&gt;&lt;P&gt;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jun 2006 10:10:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/background/m-p/1410463#M197744</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-19T10:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/background/m-p/1410464#M197745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. Create ZPROGRAM&lt;/P&gt;&lt;P&gt;2. SM36 -&amp;gt; start condition -&amp;gt; Date/Time -&amp;gt; Save&lt;/P&gt;&lt;P&gt;3. Step -&amp;gt; Specify zprogram and variant&lt;/P&gt;&lt;P&gt;4. Save&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jun 2006 10:11:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/background/m-p/1410464#M197745</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-19T10:11:17Z</dc:date>
    </item>
    <item>
      <title>Re: background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/background/m-p/1410465#M197746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i dont want using tcode SM36 but i want to write a program using job_open ? can u help me in this regard ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jun 2006 10:45:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/background/m-p/1410465#M197746</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-19T10:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/background/m-p/1410466#M197747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. sample code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Note (we can either use SUBMIT statement,  &lt;/P&gt;&lt;P&gt;   or JOB_SUBMIT to submit our program in background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report abc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA  : JN(32) TYPE C.&lt;/P&gt;&lt;P&gt;JN  = 'JOB001'.&lt;/P&gt;&lt;P&gt;BREAK-POINT.&lt;/P&gt;&lt;P&gt;DATA : J(8) TYPE C.&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;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                = JN&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  JOBCLASS               =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   JOBCOUNT               = J&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;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : P TYPE PRI_PARAMS.&lt;/P&gt;&lt;P&gt;P-PDEST = 'PRINTER'.&lt;/P&gt;&lt;P&gt;P-PDEST = 'LOCL'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GET_PRINT_PARAMETERS'&lt;/P&gt;&lt;P&gt;       EXPORTING  NO_DIALOG             = 'X'&lt;/P&gt;&lt;P&gt;                  MODE                  = 'CURRENT'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                 NEW_LIST_ID           = $PRNEW&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;       IMPORTING  OUT_PARAMETERS       =  P.&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;HR originaltext="----------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;submit HINCF160 using selection-set '2102'&lt;/P&gt;&lt;P&gt;  VIA JOB JN NUMBER J&lt;/P&gt;&lt;P&gt;AND RETURN&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------------------------------------" /&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             = J&lt;/P&gt;&lt;P&gt;    jobname              = JN&lt;/P&gt;&lt;P&gt;    STRTIMMED            = 'X'&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;    INVALID_TARGET       = 8&lt;/P&gt;&lt;P&gt;    OTHERS               = 9.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BREAK-POINT.&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;regards,&lt;/P&gt;&lt;P&gt;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jun 2006 10:49:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/background/m-p/1410466#M197747</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-19T10:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/background/m-p/1410467#M197748</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;&lt;/P&gt;&lt;P&gt;or use fm K_BATCH_REQUEST&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andreas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jun 2006 11:11:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/background/m-p/1410467#M197748</guid>
      <dc:creator>andreas_mann3</dc:creator>
      <dc:date>2006-06-19T11:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/background/m-p/1410468#M197749</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;You need to create two programs say Zreport1 and zreport2. From zreport1, you are passing selection parameters to zreport2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In ZREPORT1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Export it_tab&lt;/P&gt;&lt;P&gt;       to database db(idx) index indx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use FM : JOB_OPEN&lt;/P&gt;&lt;P&gt;Pass Job name &amp;amp; import Jobcount. Jobcount is unique id.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to set print parameters then use FM 'GET_PRINT_PARAMETERS'. If spool size is not important then this FM is not required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use FM : JOB_SUBMIT. pass report name as 'ZREPORT2'. This is the program which you want to call in background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of JOB_SUBMIT, you can also use SUBMIT &amp;lt;report&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use FM : JOB_CLOSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In ZREPORT2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Import it_tab&lt;/P&gt;&lt;P&gt;       from  database db(idx) index indx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_tab into wa_tab.&lt;/P&gt;&lt;P&gt;write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; wa_tab-matnr.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jun 2006 15:16:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/background/m-p/1410468#M197749</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-19T15:16:25Z</dc:date>
    </item>
  </channel>
</rss>

