<?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: Jobname during runtime in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/jobname-during-runtime/m-p/5570618#M1270756</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps the problem lies in the definition of the variable. I tried this little test and it gets the job name cleanly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use SM36 to create this job and run it, and then go to sm37 and capture the active job. This brings up the debuger, and there you can see you are trapped in the endless WHILE. Just look at the content of the NAME variable and you'll see the name of the job. To exit, change the content of the CONTROL variable to anything other than 'X', and then exit debugging. If the job doesn't appear to stop in SM37, refresh it a pair of times and you'll see it as finished.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is how you test this kind of functions or debug background programs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: name LIKE tbtcm-jobname,
control TYPE c.


control = 'X'.
CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
 IMPORTING
*   EVENTID                       =
*   EVENTPARM                     =
*   EXTERNAL_PROGRAM_ACTIVE       =
*   JOBCOUNT                      =
   jobname                       = name
*   STEPCOUNT                     =
 EXCEPTIONS
   no_runtime_info               = 1
   OTHERS                        = 2.

WHILE control = 'X'.

ENDWHILE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 May 2009 14:15:49 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-05-13T14:15:49Z</dc:date>
    <item>
      <title>Jobname during runtime</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/jobname-during-runtime/m-p/5570604#M1270742</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;My requirement is basically to get the current jobname when the job is running in the background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried using the FM 'GET_JOB_RUNTIME_INFO' but it always returns with exception NO_RUNTIME_INFO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can some one provide some answer for this.&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;Regards,&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2009 12:31:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/jobname-during-runtime/m-p/5570604#M1270742</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-13T12:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: Jobname during runtime</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/jobname-during-runtime/m-p/5570605#M1270743</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;allthe job names and information is stored in table..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TBTCO,TBTCP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you want to know the jon name..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-batch = 'X' "that means job is running in back ground.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fecth the job name .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select sigle * from tbtco where INTREPORT = 'reportname which you are running'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from above you get the job name related to program you are running.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Prabhduas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2009 12:35:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/jobname-during-runtime/m-p/5570605#M1270743</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-13T12:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: Jobname during runtime</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/jobname-during-runtime/m-p/5570606#M1270744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;TBTC is the master table which stores information about the job.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2009 12:39:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/jobname-during-runtime/m-p/5570606#M1270744</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-13T12:39:39Z</dc:date>
    </item>
    <item>
      <title>Re: Jobname during runtime</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/jobname-during-runtime/m-p/5570607#M1270745</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;Thanks for the reply.&lt;/P&gt;&lt;P&gt;But the problem is &lt;/P&gt;&lt;P&gt;Say for example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using a variant called Ztest .&lt;/P&gt;&lt;P&gt;Now i scheduled two jobs ZJ1 and ZJ2 using the same variant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now there is a problem in finding the current jobname.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2009 12:54:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/jobname-during-runtime/m-p/5570607#M1270745</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-13T12:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: Jobname during runtime</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/jobname-during-runtime/m-p/5570608#M1270746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do you know there is a problem? Try to debug the "finished job" &amp;amp; check why you are getting this error?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2009 12:56:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/jobname-during-runtime/m-p/5570608#M1270746</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2009-05-13T12:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: Jobname during runtime</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/jobname-during-runtime/m-p/5570609#M1270747</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 am not sure which problem are you referring to.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used this FM&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GET_JOB_RUNTIME_INFO'&lt;/P&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  EVENTID                       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  EVENTPARM                     =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  EXTERNAL_PROGRAM_ACTIVE       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  JOBCOUNT                      =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   JOBNAME                       = w_jobname&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  STEPCOUNT                     =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;   NO_RUNTIME_INFO               = 1&lt;/P&gt;&lt;P&gt;   OTHERS                        = 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here i am trying to get the jobname in w_jobname.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2009 13:01:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/jobname-during-runtime/m-p/5570609#M1270747</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-13T13:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: Jobname during runtime</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/jobname-during-runtime/m-p/5570610#M1270748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But as per your post you are always getting the EXCEPTION: NO_RUNTIME_INFO, when you are executing the 'GET_JOB_RUNTIME_INFO'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How are you testing the program? Plz revert back. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are trying to run the program in the online mode, you will always get this EXCEPTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2009 13:14:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/jobname-during-runtime/m-p/5570610#M1270748</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2009-05-13T13:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: Jobname during runtime</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/jobname-during-runtime/m-p/5570611#M1270749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try BP_FIND_JOBS_WITH_PROGRAM, or others in same Function group.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2009 13:15:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/jobname-during-runtime/m-p/5570611#M1270749</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-13T13:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: Jobname during runtime</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/jobname-during-runtime/m-p/5570612#M1270750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Inside the Function Module GET_JOB_RUNTIME_INFO , there is call made for  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL 'GetRuntimeInfo'&lt;/P&gt;&lt;P&gt;    ID 'JOB' FIELD I_JOBINFO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is failing here.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2009 13:17:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/jobname-during-runtime/m-p/5570612#M1270750</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-13T13:17:35Z</dc:date>
    </item>
    <item>
      <title>Re: Jobname during runtime</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/jobname-during-runtime/m-p/5570613#M1270751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am running the program in background job and debugging by JDBG in background.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2009 13:18:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/jobname-during-runtime/m-p/5570613#M1270751</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-13T13:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: Jobname during runtime</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/jobname-during-runtime/m-p/5570614#M1270752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The FM "GET_JOB_RUNTIME_INFO" will not work in DEBUG mode, because the stmt where the FM fails is an SAP Kernel call.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Suhas Saha on May 13, 2009 3:29 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2009 13:27:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/jobname-during-runtime/m-p/5570614#M1270752</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2009-05-13T13:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: Jobname during runtime</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/jobname-during-runtime/m-p/5570615#M1270753</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;Thanks for your answer.Can you please tell me how to debug the same without JDBG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2009 13:41:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/jobname-during-runtime/m-p/5570615#M1270753</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-13T13:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: Jobname during runtime</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/jobname-during-runtime/m-p/5570616#M1270754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for the previous post, Please ignore the same.i didnt see your reply.&lt;/P&gt;&lt;P&gt;But one question is , how can i test the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR &lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2009 13:42:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/jobname-during-runtime/m-p/5570616#M1270754</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-13T13:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: Jobname during runtime</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/jobname-during-runtime/m-p/5570617#M1270755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Vijay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You donot EXPORT any data to the FM, you just IMPORT data from it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that this FM is fool-proof &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AFAIK there is no way to test this FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2009 13:55:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/jobname-during-runtime/m-p/5570617#M1270755</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2009-05-13T13:55:55Z</dc:date>
    </item>
    <item>
      <title>Re: Jobname during runtime</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/jobname-during-runtime/m-p/5570618#M1270756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps the problem lies in the definition of the variable. I tried this little test and it gets the job name cleanly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use SM36 to create this job and run it, and then go to sm37 and capture the active job. This brings up the debuger, and there you can see you are trapped in the endless WHILE. Just look at the content of the NAME variable and you'll see the name of the job. To exit, change the content of the CONTROL variable to anything other than 'X', and then exit debugging. If the job doesn't appear to stop in SM37, refresh it a pair of times and you'll see it as finished.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is how you test this kind of functions or debug background programs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: name LIKE tbtcm-jobname,
control TYPE c.


control = 'X'.
CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
 IMPORTING
*   EVENTID                       =
*   EVENTPARM                     =
*   EXTERNAL_PROGRAM_ACTIVE       =
*   JOBCOUNT                      =
   jobname                       = name
*   STEPCOUNT                     =
 EXCEPTIONS
   no_runtime_info               = 1
   OTHERS                        = 2.

WHILE control = 'X'.

ENDWHILE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2009 14:15:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/jobname-during-runtime/m-p/5570618#M1270756</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-13T14:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: Jobname during runtime</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/jobname-during-runtime/m-p/5570619#M1270757</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;My Problem is solved now :)I had used the FM BP_FIND_JOBS_WITH_PROGRAM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for all the responses.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2009 14:25:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/jobname-during-runtime/m-p/5570619#M1270757</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-13T14:25:12Z</dc:date>
    </item>
  </channel>
</rss>

