<?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: Create a job + jobstep from program in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-job-jobstep-from-program/m-p/6660033#M1446169</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Harald,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this might be the key to my problem, when I have time to go through this authorization assignments I'll probably set this thread as solved!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once again, thank you very much&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;João Cabrita&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Mar 2010 14:09:43 GMT</pubDate>
    <dc:creator>joaopcabrita</dc:creator>
    <dc:date>2010-03-11T14:09:43Z</dc:date>
    <item>
      <title>Create a job + jobstep from program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-job-jobstep-from-program/m-p/6660029#M1446165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dears,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had a requirement to create a program that creates a job ( + its jobsteps ) by copy of another job.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The program developed it is already doing this fine, but now the new requirement is to change the user on the job steps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is that even possible without modifying directly standard tables on db?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Imagine my reference job:&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;JOB           A: user of the job:        "Adam" &lt;/P&gt;&lt;P&gt;JOBSTEP A1: user of the jobstep: "Adam"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have copied it and reschedule it successfully, but see details of my job:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;JOB           B: user of the job:        "Me" &lt;/P&gt;&lt;P&gt;JOBSTEP B1: user of the jobstep: "Me" -&amp;gt; I want this to be "Adam"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried BP_JOB_MODIFY and JOB_SUBMIT, both have a field with username, but both or ignored my new username assignment, or caused a dump.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone already done something similar? Preferentially not modifying directly the standard tables...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: João Pedro Cabrita on Mar 11, 2010 12:58 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Mar 2010 23:57:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-job-jobstep-from-program/m-p/6660029#M1446165</guid>
      <dc:creator>joaopcabrita</dc:creator>
      <dc:date>2010-03-10T23:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: Create a job + jobstep from program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-job-jobstep-from-program/m-p/6660030#M1446166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi João,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check out the documentation for &lt;A href="http://help.sap.com/abapdocu_70/en/ABAPSUBMIT_VIA_JOB.htm"&gt;SUBMIT - VIA JOB&lt;/A&gt; statement, which also contains an example. If you use the statement you can simply specify the user ID which should execute the given step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please note though, that in a production system this might be an issue, because there is an authorization check if a user is allowed to schedule jobs with other user ID's (obviously a risk).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers, harald&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;p.s.: If you want to know in detail which possibilities you have, check out the good SAP documentation &lt;A href="http://help.sap.com/saphelp_nw04s/helpdata/en/fa/096c53543b11d1898e0000e8322d00/frameset.htm"&gt;Programming with the Background Processing System&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Mar 2010 00:12:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-job-jobstep-from-program/m-p/6660030#M1446166</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-11T00:12:13Z</dc:date>
    </item>
    <item>
      <title>Re: Create a job + jobstep from program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-job-jobstep-from-program/m-p/6660031#M1446167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Harald,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good suggestion but still unsolved, everytime I try to use a different user(uname) that mine while using statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SUBMIT ZPROGRAM USER uname&lt;/P&gt;&lt;P&gt;                                    VIA JOB newjobnam NUMBER newjobcon&lt;/P&gt;&lt;P&gt;                                    AND RETURN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get this shortdump:&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------------------------------------" /&gt;&lt;P&gt;Runtime Errors         RAISE_EXCEPTION&lt;/P&gt;&lt;P&gt;Date and Time          11.03.2010 09:42:21&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Short text&lt;/P&gt;&lt;P&gt;     Exception condition "JOB_NOSTEPS" raised.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; What happened?&lt;/P&gt;&lt;P&gt;     The current ABAP/4 program encountered an unexpected&lt;/P&gt;&lt;P&gt;     situation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Error analysis&lt;/P&gt;&lt;P&gt;     A RAISE statement in the program "SAPLBTCH" raised the exception&lt;/P&gt;&lt;P&gt;     condition "JOB_NOSTEPS".&lt;/P&gt;&lt;P&gt;     Since the exception was not intercepted by a superior&lt;/P&gt;&lt;P&gt;     program, processing was terminated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     Short description of exception condition:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     Job Specified Does Not Contain Any Steps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     For detailed documentation of the exception condition, use&lt;/P&gt;&lt;P&gt;     Transaction SE37 (Function Library). You can take the called&lt;/P&gt;&lt;P&gt;     function module from the display of active calls.&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;And I dont think in this case the dump refelect the real cause of the dump, because when I use my user the dump does not occur, I think this has something to do with authorizations, could it be?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Imagine, its a bit dangerous that I have authorization to schedule a job under your name, isnt it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;More suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Mar 2010 08:44:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-job-jobstep-from-program/m-p/6660031#M1446167</guid>
      <dc:creator>joaopcabrita</dc:creator>
      <dc:date>2010-03-11T08:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: Create a job + jobstep from program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-job-jobstep-from-program/m-p/6660032#M1446168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hhhmmm, interesting. You could try an authorization trace or simply try scheduling manually a job with a different user ID. If you cannot do that, then most likely that's also causing trouble in your program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By the way, the authorization object relevant for granting access to scheduling jobs for different users is [S_BTCH_NAM|http://help.sap.com/saphelp_nw04/helpdata/EN/5f/ff2138faeb3807e10000009b38f889/frameset.htm]. So you could also add a check for that within your program.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Mar 2010 08:55:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-job-jobstep-from-program/m-p/6660032#M1446168</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-11T08:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: Create a job + jobstep from program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-job-jobstep-from-program/m-p/6660033#M1446169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Harald,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this might be the key to my problem, when I have time to go through this authorization assignments I'll probably set this thread as solved!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once again, thank you very much&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;João Cabrita&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Mar 2010 14:09:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-job-jobstep-from-program/m-p/6660033#M1446169</guid>
      <dc:creator>joaopcabrita</dc:creator>
      <dc:date>2010-03-11T14:09:43Z</dc:date>
    </item>
  </channel>
</rss>

