How do I set up a periodic job to run only if the previous period job ran

I want to sent up a process that will run on the second work day of the month that will run program A.  If program A runs successfully, then I want to run program B.  If B is successful, then program C.
I tried to setup A to run on the second work day of the month using a calendar. 
I then setup B to run after event A.
I then setup C to run after event B.
This all worked great the first month.  Now we are coming up on the second month, and A is still scheduled and will run on the second work day of this month, but B and C are no where to be found.
I found various threads to use bp_event_raise and SM62, but I guess since I am not an ABAP programmer I did the program wrong.
can someone please give me detailed instructions on how to set this up.

Hi John,
Create a process Chain with start variant sheduled using EVENT.
1. Create a event in TCODE SM62. In the Event tab on the process chain give the event ID and a Parameter name.
2. In SE38, create a program. call method RAISE of class CL_BATCH_EVENT. Give Event ID and Paramter name as given in Process chain variant.
Coding will be like:
if sy-datum+6(2) = '02'.
  CALL METHOD cl_batch_event=>raise
    EXPORTING
      i_eventid                      =
      i_eventparm                    =
     i_server                       =
     i_ignore_incorrect_server      = 'X'
   EXCEPTIONS
     excpt_raise_failed             = 1
     excpt_server_accepts_no_events = 2
     excpt_raise_forbidden          = 3
     excpt_unknown_event            = 4
     excpt_no_authority             = 5
     others                         = 6
  IF sy-subrc <> 0.
  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  endif.
Schedule this program in background daily. when eve the date in '02' the event will be triggered.
3. Place the process type "ABAP progam", maintain the variant as Program A.
4.  Place the process type "ABAP progam", maintain the variant as Program B.
5. Place the process type "ABAP progam", maintain the variant as Program C.
Connect all this with tpye only on Success.
This will ensure that program A will be executed on 2nd of every month. If success Program B and then Program C.
-- Selva

Similar Messages

  • How do I set up an indicator to display for only 1 second?

    How do I set up an indicator to display for only 1 second?
    I am reading keys from a serial device and I turn on an indicator that corresponds to the key pressed
    on the serial device but how do I set this up so that it only stays lit (enabled) for a second or two?
    The indicator is inside of a case statement and turns on OK but I do not want it to stay on for more than
    a second or two. How do I modify this to display for only a second or two?
     (P.S. I am running an old version 8.2 and can only see vis that are 8.2 or older.)
    thanks

    Simplest way to turn the indicator off (false value) after a set time is to use a Sequence structure (flat or stacked).
    Frame 1, set to true,
    Frame 2, Wait ms (wire millisecond value to wait)
    Frame 3, set to false.
    This method, however, prevents the code outside the case structure from running during that wait time.  
    Something more elaborate will allow the external code to run.  What comes to mind is a shift register that holds the indicator name and the time stamp (in milliseconds) when it was turned on, in an array of clusters.  Each iteration of your loop will check this register to see if a certain time has passed (current time stamp minus turn on time).  If so, use a case structure to turn the indicator off and remove the elements from the shift register array (so you don't keep setting the indicator to false).  The array will let you control multiple indicators independently.
    A problem with this option could arise from multiple readings.  Lets say you want to turn it off after 2 seconds, but you read the value again after 1 second (this means the indicator should be on for a total of 3).  The code would still turn it off after the 2 second mark.  Of course this really depends on the time intervals involved with your code.

  • HT4628 How can I set up a standard account to auto disconnect from the wireless network upon logging out (Using Mavericks)?  There used to be a setting for this in previous versions of OSX but I can't find it in the new version.

    How can I set up a standard account to auto disconnect from the wireless network upon logging out (Using Mavericks)?  There used to be a setting for this in previous versions of OSX but I can't find it in the new version.

    How can I set up a standard account to auto disconnect from the wireless network upon logging out (Using Mavericks)?  There used to be a setting for this in previous versions of OSX but I can't find it in the new version.

  • How do I set up my iPad so that I can recieve the emails from my Outlook Express account

    How do I set up my iPad so that I can recieve the emails from my Outlook Express account

    Your iPad doesn't receive email from Outlook Express (or any other email client).  It receives email from your email provider.  To set up your email account on your iPad go to Settings>Mail,Contacts,Calendars...tap Add Account and add your email provider's account settings with your username and password.  iCloud, Gmail, Yahoo, AOL and Hotmail email settings are automatically entered by tapping the appropriate button.  Others must be manually entered by tapping Other.  (Exchange accounts will also require you to enter your email provider's settings.)

  • How do I set a fixed page size in Muse so that the window always stays the same size

    how do I set a fixed page size in Muse so that the window always stays the same size

    Hi Aish & thanks for responding;
    I would like the window size to stay the same for the entire site and not be
    able to scale to drag & scale it. ie 950 pixels x 500 pixels.
    Thanks,
    JB
    On 12/4/14 3:30 PM, "Aishvarya Raj Rastogi" <[email protected]>

  • How do I set up iTunes to automatically move on to play the next album after the last one has finished? (in Album view)

    How do I set up iTunes to automatically move on to / play the next album after the last one has finished? (in Album view).
    This used to happen automatically in Genre view.

    Hi Henryhippo,
    If you have questions about play order in iTunes, you may find the following article helpful; I believe you can use the Play Next or Add to Up Next to add albums as well as songs.
    iTunes 11 for Windows: Ways to play songs
    Regards,
    - Brenden

  • HT5312 how do i set a rescue email address if i cant remember the answers to my security questions?

    how do i set a rescue email address if i cant remember the answers to my security questions?

    w
    The Best Alternatives for Security Questions and Rescue Mail
         1.  Send Apple an email request at: Apple - Support - iTunes Store - Contact Us.
         2.  Call Apple Support in your country: Customer Service: Contact Apple support.
         3.  Rescue email address and how to reset Apple ID security questions.
    An alternative to using the security questions is to use 2-step verification:
    Two-step verification FAQ Get answers to frequently asked questions about two-step verification for Apple ID.

  • How do i set up my 3g sim for my iPad? the sim is already activated but i dont know how to get it to work

    how do i set up my 3g sim for my iPad? the sim is already activated but i dont know how to get it to work

    Setting>Cellular Data>On

  • How do I set up my AT&T mobile internet device on the Mac? Each time I go to the network set up, I don't have an option to select the device, only WiFi.

    How do I set up my AT&T mobile internet device on the Mac? Each time I go to the network set up, I don't have an option to select the device, only WiFi.

    Are you getting Airport confused with Airplay? 
    Secondly, I don't think a Mac can be used as an Airplay receiver.  You'll need an Apple TV for that.  There are third-party software packages that can turn your computer in to an Airplay receiver, but I'm not sure what the rules are about mentioning them here on Apple's forums. 
    Hint: google "airplay software"

  • HT4053 how to I set my clock's alarm to vibrate only when ringing?

    How do I set my clock's alarm to vibrate only?

    Scroll down and set the Sound to None.

  • How can I block all other mail account just to only use the exchange mailbox of our company? This is to prevent the user to setup his on company iPhone.

    How can I block all other mail account just to only use the exchange mailbox of our company? This is to prevent the user to setup his on company iPhone.

    I don't know if I'm asking this all in a way that can be understood? Thanks ED3K, however that part I do understand (in the link you provided!)
    What I need to know is "how" I can separate or rather create another Apple ID for my son-who is currently using "my Apple ID?" If there is a way to let him keep "all" his info on his phone (eg-contacts, music, app's, etc.) without doing a "reset?') Somehow I need to go into his phone's setting-create a new Apple ID and possibly a new password so he can still use our combined iCloud & Itunes account?
    Also then letting me take back my Apple ID & password, but again allowing us (my son and I) to use the same iCloud & Itunes account? Does that make more sense??? I'm sincerely trying to get this cleared up once and for all----just need guidance from someone who has a true understanding of the whole Apple iCloud/Itunes system!
    Thanks again for "anyone" that can help me!!!

  • On Mac when i enter full screen mode, how do I get bookmarks toolbar to show? I only have the address and tab bars showing!

    Im on the latest version of firefox 7.01 on Lion OSX mac.
    When i enter full screen mode, how do I get bookmarks toolbar to show? I only have the address and tab bars showing!

    hello davinci2, please right-click any bookmark where this is happening, go to ''properties'' and make sure that they are not set up to open in the sidebar.

  • HT202157 How can itv from my iPad to Apple TV I only get the sound and no picture

    How can itv from my iPad to Apple TV I only get the sound and no picture

    Welcome to the Apple Community.
    If you mean from the iTV player app, that's because iTV block AirPlay from working with their app.

  • How can I read text files from LAN if I only know the hostname?

    I'm new in Java Developing, and dont know the written classes yet. I need help, how to do the following steps?
    <p>1. How can I read text files from LAN if I only know the hostname, or IP address?
    <p>2. How to read lines from text files without read all lines from the beginning of file, just seek to a position.
    (ex. how can I read the 120th line?)
    <p>Please help!
    <p>sorry for the bad english

    I'm new in Java Developing, and dont know the written classes yet. I need help, how to do the following steps?
    1. How can I read text files from LAN if I only know the hostname, or IP address?You need to know the URL of the file. You need to know the hostname, port, protocl and relative path.
    The hostname is server, not file.
    2. How to read lines from text files without read all lines from the beginning of file, just seek to a position.Use the seek() to get to a random byte.
    (ex. how can I read the 120th line?)The only way to find the 120th line is to read the first 120 lines. You can use other file formats to find the 120th line without reading the whole file but to need to be able to detremine where the 120th line is

  • How do i recover my lost iphone 4 when i only had the "find my iphone" app, how do i locate it, how do i recover my lost iphone 4 when i only had the "find my iphone" app, how do i locate it

    how do i recover my lost iphone 4 when i only had the "find my iphone" app, how do i locate it, how do i recover my lost iphone 4 when i only had the "find my iphone" app, how do i locate it

    As long as you enabled it when you first activated your Iphone, it's pretty straightforward.  Using any computer, go to icloud.com.  Sign in with your Apple ID. A screen will come up with a map showing the general location of your phone.  If you have a friend with an iphone and are logged in using Safari, when you get close, you can tell your iphone to make a sound.  Good luck.

Maybe you are looking for

  • Help,how close pop-up window ,and open another view

    Hello, How click the pop-up window button ,then close the pop-up window . At the same time open another VIEW,and  transfer PO number to the VIEW. thanks

  • When to use collection?

    Sorry to post such question in this forum , but i would like to recieve some interesting about this . I know the basics of collection but i dnt know when to use which one? I am totally confused that all are working for the same thing with little diff

  • Nonchargeable battery

    model resario CQ57 Notebook PC model number : QE264UA#ABA Compaq laptop has newly purchased from USA has brought over to UK for use. Unfortunately, battery is detected but unchargeable(remains at 0% alltime). After undergone a battery check by hp sup

  • HT4889 Mac G4 to MacBook Air

    I would like to copy iTunes from a Mac G4 to a MacBook Air. Is there an easy way to do this?

  • Jpeg from Photoshop showing up  4.5 times bigger in Illustrator

    Hello, I'm working with a jpeg I created in Photoshop that is 300dpi CMYK with an image and canvas size of about 15.8 inches wide. However, when I place it into an Illustrator file it shows up as just over 66" wide. I've checked that the Document Ras