Batch job scheduling based on Event AND for the job to complete

I am trying to schedule a background job based on an event AND based on the job finishing itself.
Example:
Job name: Send_Message
After Event: SAP_NEW_PROCESS Message
Program:  Program xxxx
I want that the Send_Message job only runs when the Event SAP_NEW_PROCESS message happens AND the Send_Message job is not running.
Right now, I could only schedule it based on the event SAP_NEW_PROCESS Message which means that everytime this event happens the job runs and I end up having the job "Send_Message" in multilple intances where the others will immediately cancel since the first job is still running and so I end up with a lot of Cancelled job when it is not necessary to run them all when there is already 1 instance of the Job running.
How do I set it up in SAP?

Thanks but I am new to SAP having to set up a batch job.
The Event "SAP_NEW_PROCESS_MESSAGES" is a standard SAP Event.  We used that such that when a new transaction comes in, the batch job will run but we don't want to run the batch job if the same batch job is already running.
YOu mentioned that I should set up Job_0.  Do I need to create an ABAP prorgram to check if JOB_1 is running?  How do I set up Job_0?  What is the trigger for my Job_0 to run?
You also said that I set up Job_1 and trigger that based on the outcome of Job_0 AND at the same time be triggered by the event "SAP_NEW_PROCESS_MESSAGES".  How do I set up  this Job_1 so that it can be triggered by both Job_0 and a new transaction coming in(SAP_NEW_PROCESS_MESSAGES).
if you can provide me the step by step guide as I am new to this and I only know basic.
The current set up I have is
Job_1
Job Start:
      After Event
            Event: SAP_NEW_PROCESS_MESSAGES
      Step 1: program to run RCOCB002
I was thinking following your suggestion is this:
Job_0
Job Start
      After Event
            Event: SAP_NEW_PROCESS_MESSAGES
      Step 1: program to run - What will be my program to run?
Job_1
Job_Start
      After Event
            Event: What will be my trigger for Job_1 and how do I set it up?
      Step 1: program to run RCOCB002
Edited by: Shirley Te on Mar 10, 2010 3:25 PM

Similar Messages

  • Convert Spool to PDF and mail for the jobs not run in background.

    Dear All,
    I need to convert the spool job into pdf and mail as attachment for job not run in background.
    I am printing the bills  using the program  SD70AV3A to print the bills in a batch using the SUBMIT.
    But i am not using the spool options since its going to into waiting state in spool...and i need to change the printer properties to G
    to get the printer to print the reports as these jobs run in backgroud....but this solution is not acceptable solution.
    SUBMIT SD70AV3A
             WITH RG_KSCHL-LOW = 'ZRR'
             WITH RG_NACHA-LOW = '1'
             WITH PM_VERMO = '2'
             WITH PM_NSORT = '1'
             WITH RG_VBELN IN range.
    *        TO SAP-SPOOL
    *        SPOOL PARAMETERS print_parameters
    *        WITHOUT SPOOL DYNPRO
    *        VIA JOB name NUMBER number
    *        AND RETURN.
    so how do i get the spool number from the above after the job is submitted....and then convert into pdf and mail
    please suggest some solution. I have searched on net but most the solutions are say to run the job as background job...
    i have also looked into the program RSTXPDFT4 but it asks for the spool id ....how can i get spool id for the job that has been completed.
    please suggest some solution.
    Thanks
    Bhargava.

    Hi,
    Spool to PDF : FM 'CONVERT_ABAPSOOLJOB_2_PDF'
    Table TSP01 to get spool number
    You ,may need to convert OTF to PDF: FM CONVERT_OTF
    and the to binary : FM 'SMCS_XSTRING_TO_BINARY'
    To send mail use class: cl_document _bcs.
    Regards,
    Maria João Rocha

  • Ati HD 2600 XT man enough for the job? Motion and Final cut

    Hi all, just got my new 2008 Mac Pro with a ATI HD 2600 XT graphics card
    I have a dell 24"monitoer running at 1920x1200 pixels
    I am just about to buy the final cut studio package and I'm wondering if I need to spring for the 8800GT card?
    so my question is: just how taxing on the gpu is Motion? is the Ati HD 2600 XT man enough for the job running at 1920x1200 pixels?

    Rob Morgan at Barefeats.com has some benchmarks that compare the 2600 XT to the 1900 XT in a 2.8 8 core machine. In his test the 2600 XT was only a hair slower with Motion. I have not noticed any performance hit with the 2600 XT. I plan on sticking with the 2600 XT.

  • BODS 3.1 : How to trigger an email alert for the jobs on BODS server ?

    Hi All.
    I have this request.
    BODS 3.1 : How to trigger an email alert for the jobs on BODS server ?
    We have jobs scheduled on BODS running smoothly and absolutely fine.
    But to check, i am logging into the admin console and check for the jobs status.
    I would like to have an email to be received from BODS after each job is finished.
    It could succuessful. Or it could fail.
    Whatsoever, i wish to receive an email alert as soon as a job is finished.
    Can anyone advise me as to whether this could be made possible.
    And if yes, how this could be done.
    Thanks for your help in advance.
    In BOE CMC / for webi / schedule / we find an option to send email for a job success or a job failure.
    Is there any option similar to that in BODS ?
    Also would like to know :
    how to use the smtp_to or mail_to functions ?
    how to set up the smtp server for this ?
    thanks
    REgards
    indu
    Edited by: Indumathy Narayanan on May 31, 2011 3:47 PM

    Hi.
    Since am new to this BODS. I need some help.
    I already have many jobs which are running absolutely fine.
    And when a job runs, and finishes, am able to see the trace saying
    e.g. :
    Job_abc is completed successfully.
    We got the smtp service activated for our test server.
    and we hae a group email id.
    I have put the details of the smtp server / ip address / and said apply restarted.
    The i created a simple test script as below :
    print (' Before email ' );
    smtp_to('abc@company_name.com', 'Job ' || job_name() ||' on ' || host_name() || ' has FAILED',
    ' the job has failed', 0, 0);
    print('After Email ');
    It does send a email to as per smtp_to whatever email is specified.
    But how to differentiate between a job success
    And a job which has failed.
    I wish to have a mail which says on the subject :
    'Job ' || job_name() ||' on ' || host_name() || ' has completed successfully'
    ==> IF it is a success
    OR
    'Job ' || job_name() ||' on ' || host_name() || ' has failed'
    ==> if it has failed
    How to make the system identify, whether
    to send a success message or a error message whatever
    Could anyone advise.
    thanks
    indu

  • Job Scheduling in Solution Manager - Error creating Periodic Job

    Hi all,
    I am in the process of testing the Job Scheduling functionality using the Solution Manager.  I have setup the criteria manager, ec. in the satellite system, and done the config in Solman as well. 
    I am able to successfully setup up a 'on-time' job.
    it's only when I try to setup a periodic job, I end up getting following error
    Any thoughts?  Is there any piece of config that's missing?  All the SICF services needed for this functionality are running fine.
    Thanks for the help.
    500 Internal Server Error
    Error when processing your request
    What has happened?
    The URL https://fsspsm.target.com:/sap/bc/webdynpro/sap/wd_ags_ejr_job_req_gaf_app was not called due to an error.
    Note
    The following error text was processed in the system PSM : Message was not created
    The error occurred on the application server fsspsmap01_PSM_00 and in the work process 1 .
    The termination type was: ERROR_MESSAGE_STATE
    The ABAP call stack was:
    Function: BAPI_NOTIFICATION_CREATE of program SAPLDSWP_NOTIF
    Method: MSG_SUBMIT of program CL_DSMOP_BSP_NOTI_MODEL=======CP
    Method: SUBMIT_REQ_CRM_DATA of program CL_AGS_EJR_JOB_REQUEST_FACTORYCP
    Method: SUBMIT of program CL_AGS_EJR_JOB_REQUEST_FACTORYCP
    Method: PROCESS_SCENARIO_PERIODIC of program CL_AGS_EJR_JSM_PROC_STANDARD==CP
    Method: PROCESS_JOB_SCENARIO of program CL_AGS_EJR_JSM_PROC_STANDARD==CP
    Method: IF_AGS_EJR_JSM_PROC_FPM_CTRL~AFTER_PROCESS_EVENT of program CL_AGS_EJR_JSM_PROC_STANDARD==CP
    Method: AFTER_PROCESS_EVENT of program /1BCWDY/K54G9RCMK7J4Z427H49S==CP
    Method: IWCI_IF_FPM_APP_CONTROLLER~AFTER_PROCESS_EVENT of program /1BCWDY/K54G9RCMK7J4Z427H49S==CP
    Method: CALL_UIBB_PROCESS_EVENT of program CL_FPM========================CP

    Hello,
    This is the basic Job Scheduling functionality and not the Redwood Job scheduling, correct?
    Have you performed the IMG Activiteis in SPRO?
    See the following Help link:
    http://help.sap.com/saphelp_sm70ehp1_sp23/helpdata/en/c5/7edcbd58ce4e29bc1baf1c4761d71f/frameset.htm
    Change a job
    You can change the scheduling of a job as long as it has not been completed. Proceed as follows:
    Make changes.
    Note
    When you change a periodic job, the system searches for the changeable successor and only changes this successor.
    If there is more than one changeable job with the same name, the system does not change any of these jobs.
    End of the note.
    Save your entries.
    To release the job in the target system, select Release.
    You go to the transaction SM37 in the target system.
    You just may want to ensure HTTP Services have been enabled. I realize you said the services workin SICF, but this needs to be verified as 500 Internal Server Error most often means the HTTP services are not activated.
    Regards,
    Paul

  • What are the possible values for the JOB status?

    What are the possible values for the JOB status in the table TBTCP and significance for each?

    Hi,
    Have a look at include LBTCHDEF.
    The standard include from SAP.
    -> Definitions and Constants for Function group BTCH
    Kind Regards
    Raymond

  • Warning: "No terminating events defined for the task used"

    Dear all,
    I created a task with ABAP class and method as its object method. This task is a background task. The ABAP class inherits the IF_WORKFLOW interface but doesn't implement any method of the interface.
    When I try to confirm the task settings in transaction SWDD, a message shows up "No terminating events defined for the task used" and I cannot continue the work. Does anybody have any idea what I should do?
    Thanks + Best Regards
    Jerome

    Hi Jerome,
    If you set a background task in your workflow, and if it is asynchronous, then you need some way to tell the template if it is finished and what happened.  In this case you set terminating events - that is events which are published in the system as a result of your method (ie document.posted etc).
    Either use a synchronous method for your task or set appropriate terminating events in your task setup.
    Regards
    Gareth

  • SQL Server upgradation Issue : 2012 to 2014. A job step received an error at line 1 in a PowerShell script. The corresponding line is 'set-executionpolicy RemoteSigned -scope process -Force'. Correct the script and reschedule the job.

    Message
    Executed as user: CORPTST\XXXXX. A job step received an error at line 1 in a PowerShell script. The corresponding line is 'set-executionpolicy RemoteSigned -scope process -Force'. Correct the script and reschedule the job. The error information returned
    by PowerShell is: 'Security error.  '.  Process Exit Code -1.  The step failed.
    I receive this error during the sql server job 'syspolicy_purge_history' execution  when sql server got upgraded form SQL Server 2008 to 2014.

    Hi Vishnu,
    According to the error message, it also occurs in SQL Server 2012.  Here is a feedback about the error in the link below.
    https://connect.microsoft.com/SQLServer/feedback/details/754063/sql-server-2012-syspolicy-purge-history-job-step-3-fails-with-security-error
    To resolve this issue, please change the value of the following registry key from ‘RemoteSigned’ to ‘Unrestricted’. For more details, you can review this similar
    blog.
    HKLM\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.SqlServer.Management.PowerShell.sqlps120\ExecutionPolicy
    Thanks,
    Lydia Zhang

  • Is Keynote the right application for the job?

    I have a job that requires integrating an audio soundtrack with some slides. The difference between this presentation and a normal slide presentation is that most of the information is in the soundtrack (it's a lecture, with some slides as visual aids). The amount of time in which the slides need to appear is relatively brief; in fact it's a fraction of the soundtrack's run-time.
    I have time index information that specifies where the slides should appear in the presentation. For example, there will be two minutes of soundtrack with a blue background, and then a slide will appear for 5 minutes while the soundtrack discusses its content. Then the slide should disappear into blue background for 10 minutes, then another slide for 3 minutes, then background for 20 minutes, then another slide...and so on.
    In other words, the soundtrack must play continuously, interspersed with occasional slides at specific times for specific durations, with blue background in between. I want to export the entire presentation as an integrated audio+video file and burn it to DVD. I already have the soundtrack as an .aiff file in Logic Pro 7.2, and I will have the slides as high-quality JPEG files. I don't own a Keynote license. I do have a QuickTime Pro license. I've played with this in Microsoft PowerPoint enough to determine that it's not the right tool for the job.
    I've looked at Keynote's Help documentation, and it's not immediately apparent how to start with an audio soundtrack and simply insert slides at specific times, for specific durations. Can I accomplish that in Keynote, or is there another application that would be better suited to the task?
    Thanks in advance for any help anyone can offer.

    Brian:
    If I correctly understand the effect you've described, I imagine that would be VERY annoying. However, in the test presentation I made in iMovie, that's not exactly what I experienced. I added the soundtrack first, and then I placed the slide images where I wanted them. Initially, I did notice that I couldn't just jump ahead and place an image all the way at the end of the soundtrack file without iMovie adjoining it to the last image's segment on the timeline, but that was easy to fix. Once the image was in the timeline, I just dragged it all the way to the end of the soundtrack. After that, I could place images anywhere I wanted.

  • Can't print- 27" 2013 iMac-my epson stylus 3800 pro will not print-i updated driver n added printer in syst prefs-When i print the printer queue opens and shows the job as "stopped"-Supply level "information is not available"-maybe part of problem...thx

    I can't print from my  27" late 2013 iMac.  I am using an epson stylus 3800 pro.  I updated driver and added printer in system preferences. When i print the printer queue opens and shows the job as "stopped".  Supply level shows  "information is not available which maybe part of problem...thank you

    The first thing you could try is a reset of the printing system. Please note that this action will remove all printers and scanners from the Printers & Scanners preference pane.
    With the reset complete, unplug the Epson USB cable from the Mac for a minute and then reconnect it. This action should result in the printer being added again to the Mac automatically. If this does happen, then see if you can print again.
    If the printer is not added again automatically, open Printers & Scanners and click the plus button to add the Epson. Once this is done, then see if you can print again.

  • Right Laptop for the Job?

    Hi Folks,
    I work with wedding, performance, concert video and photo and considering to buy a new laptop for the job that will eveintually have Production Premium 5.5 & Lightroom 3. I have 3 following models in my consideration list.
    Sony Vaio:
    Intel® Core™ i7-740QM-prosessor
    8GB RAM
    NVIDIA® GeForce® GT 425M GPU
    HP EliteBook 8540W
    Intel Core i7 740QM 1,73 GHz
    8BG RAM
    NVIDIA Quadro FX 1800M
    Mac Book Pro
    2.3GHz Quad-core Intel Core i7
    8GB RAM
    Intel HD Graphics 3000
    AMD Radeon HD 6750M with 1GB GDDR5
    Price is not an issue.
    Which one should I chose & why ? Kindly given me an opinion beyond "mac vs pc" arguments .......

    Basically, for using the internet you have a few options:
    • Phone line
    • Ethernet cable (from internet jack in wall)
    • Wifi if you are in a Wifi zone (your Mac has built-in wireless capability, you just need to find a wireless network to join)
    • Some phone companies have USB cards that you can plug in and get internet anywhere, but of course for extra charge
    The Macbook you are looking at should do the job fine, and can access the internet via any of the options above.
    P.S. You may already know this, but you are allowed to have FCE installed on one desktop computer and one laptop, so you could install your FCE HD on your new laptop. Also, make sure if you are editing HDV (I assume this is the case since FCE HD doesn't support AVCHD) that you get the white macbook, not the aluminum one because the aluminum doesn't have a firewire port that is required to capture HDV footage. If you are planning to edit AVCHD, you need to get FCE4.
    Message was edited by: skalicki`

  • Purchased a new Apple TV and the remote double clicks each time I press the button. It worked fine during set up and for the first two days.  I have since moved it and this problem started. Restarted,reset,unplugged,change remotes, no change.Help please.

    Purchased a new Apple TV and the remote double clicks each time I press the button. It worked fine during set up and for the first two days.  I have since moved it and this problem started. Restarted,reset,unplugged,changed remotes, no change. Latest software update. This is really annoying.  iPhone remote app works just fine.  Any suggestions?

    That's one of the weird things.. it recognizes it maybe 10% of the time. And usually, only after I do the two-button reset. Problem is.. since it won't charge above 2%, anytime I try to do a restore or anything like that using iTunes, my device shuts off and I lose whatever progress I'd made.
    So, an update... after reading through a bunch of similar complaints (there are literally 1000's of them so there's NO WAY this isn't somehow ios7 related, thanks a lot APPLE ) I decided to try a restore in recovery mode. After 3 hours and several disconnections... I ended up having to just set it up as a new iPad, as the restore did nothing. Weirdly though... as I was doing the restore in recovery mode.. I noticed I'd gotten up to a 10% charge.. higher than it's been since September, so after setting it up as a new device, I turned it off and plugged it in using the wall charger. 2 hours later and I was up to 38%. Still not great, as my iPad, before ios7 could've fully charged twice in the amount of time it took for me to now get 28% more of a charge. And that's with a fully cleaned out device.. so that really ***** and I'm now more confused than ever.
    But I'm gonna leave it overnight charging and see what I come up with tomorrow. Sadly, when I paid $600 for it in February, I never expected to have to play "wait and see" with it...

  • Jasper report on HTML when one image loaded from database and for the other

    How to generate jasper report on HTML when one image loaded from database and for the other we give a image path
    My code
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
              exporter = new JRHtmlExporter();
              exporter.setParameter(JRExporterParameter.JASPER_PRINT, print);
              exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, baos);
              exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, strImageInputDirectory);
         exporter.setParameter(JRHtmlExporterParameter.IMAGES_DIR_NAME, strImageOutputPath == null ? "." : strImageOutputPath);
         exporter.setParameter(JRHtmlExporterParameter.IS_OUTPUT_IMAGES_TO_DIR, Boolean.TRUE);
         exporter.setParameter(JRHtmlExporterParameter.IS_USING_IMAGES_TO_ALIGN, Boolean.FALSE);
         exporter.setParameter(JRHtmlExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.FALSE);
              exporter.exportReport();
              byte[] bdata = ((ByteArrayOutputStream) baos).toByteArray();
    Can any one help pls
    Message was edited by:
    ameet.au

    hey sorry for posting it in this forum.
    but do u have sample code for making it work.. since i am able to do it on PDF format(image from Database and another stored in the webserver) using
    byte image[] =(byte[]) outData.get("image");
                        ByteArrayInputStream img = new ByteArrayInputStream(image);
                        hmimg.put("P_PARAMV3", img);
    print = JasperFillManager.fillReport(reportFileName, hmimg, jrxmlds);
    bdata= JasperExportManager.exportReportToPdf(print);

  • I recently bought a new i phone 4 as my other one had seen beter days and for the last sevral days have been trying to transfer my photos ect from my old phone to my new one after I've plugged my old iPhone into iTunes to back it up i then plug in my    i

    I recently bought a new i phone 4 as my other one had seen beter days and for the last sevral days have been trying to transfer my photos ect from my old phone to my new one after I've plugged my old iPhone into iTunes to back it up i then plug in my one to transfer it over I've had no luck I've tryed restoring my new phone to the last time i backed up my old files the phone restores but always to its own backup point wen i first connected it to iTunes can anyone help me please?

    Since this is the second computer you've had this problem with, I recommend you look for answers on the iPhone forum. My thinking is it is an iPhone issue rather than a computer issue (unless it is some software incompatibility).

  • How do I upload to Facebook in High Resolution using my iPhone. Do I need an app? Which ones are best for the job? (I know how to do it on a PC :) )

    How do I upload photos to Facebook in High Resolution using my iPhone. Do I need an app? Which ones are best for the job? (I know how to do it on a PC )

    100pat wrote:
    Thanks, I can do it fine from my Windows desktop PC, I just want to know how to do it from an iPhone4
    Like I said before ask facebook or look at their support site to see if that is even a feature.

Maybe you are looking for

  • Dreamweaver 8 freeze in Code-View

    I have a Site: ASP/VBScript; Testserver local; When I open my function libary (file: funktion.asp with 5000 lines) and go to the Code-View and click into the code Dreamweaver 8 freeze. I know I'm not the only one with this problem, but I didn't find

  • I updated my iTunes to 10.5. I see my library but it doesnt react to any commands now

    Hey there, I updated my iTunes to 10.5 which was a big mistake. iTunes opens normally but it does not react to any commands. I cannot click on any song or field in the menue. I use a Lenovo 64 bit machine with Windows 7. I also use iCloud. I tried to

  • Mapping issues with soap sender adapter

    Scenario SOAP->XI-> file. I have configured a sender soap adapter. When the soap message is sent to XI from third party system using the 'DOC' , SXMB_MONI shows the following format <SOAP-ENV:Envelope   xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap

  • New feature for autosuggest widget

    Hi Spry developers! I have implemented a new feature in autosuggest widget, and I ask you if you can add this feature in Spry 1.6 release... You can view my example here: Multiple Autosuggest Example You can choose a splitting string that reinitializ

  • Change default toolbar colors, default interface in PSE8

    I do not have good vision and am colorblind. The choice between "dark" and "light" user interface in the PSElements8 Preferences is still not high-contrast enough for my vision: I can't see the menu names and the buttons all fade into the background,