Skip to Content

Sometimes we may have a requirement in a Process chain wherein we need to trigger a process subsequent to the ABAP program, based on whether the ABAP program has status – completed or failed.

The Standard ABAP process type does not offer this option. This can be achieved by creating a custom process type.

Steps:

1)  Goto transaction RSPC and from the Menu, choose Settings –> Maintain Process Types

 

image

 

2) The “Possible Process Types” will be in “Display mode”. Switch to “Change Mode”

 

Image 2

 

3) Now the “New Entries” button will be displayed. Click the “New Entries” button.

 

Image 3

 

4) Create a new custom ABAP process type, say ZABAP – “ABAP Program (Custom Process Type)”.

 Enter the following details.

  Image 4

 

 

For Standard “ABAP Program” process type, the “Possible Events” will be “Process ends “non-specifically””.  

 

 To trigger the subsequent processes in a Process Chain based on the Success or Failure of the ABAP program, we need to change it to “Process ends “successful” or “incorrect”

 

All other parameters will be the same as that of standard “ABAP Program” process type.

 

6) After entering the above parameters, SAVE the process type.

                                  

7) The new Process Type “ABAP Program (Custom Process Type)” will be displayed in the “General Services”.

 

Image 5

 

8) Use this Process type instead of the standard “ABAP Program” process type in the Process chain. Now the prompt will be displayed to choose between the following three options.

 

image

 A Sample Process chain with the custom process type – “ABAP Program (Custom Process Type)”.

Image 7

As you can see, if the Test Program is successful, 0MAT_PLANT_ATTR will be loaded.

If the Test Program fails, 0MATL_GROUP_TEXT will be loaded.

To report this post you need to login first.

12 Comments

You must be Logged on to comment or reply to a post.

    1. Balaji Venugopal Post author
      Hi Kenneth,
      Here sy-subrc does not come in picture.

      Whenever the program fails the ABAP process in the process chain will turn RED. This you can check from the job in SM37.

      For instance if the program in the process chain is running for a very long time, and if you manually terminate the job, then the “Failure” event will be triggered.

      Cheers,
      Balaji V

      (0) 
      1. anil kamsala
        Hi Balaji,

        Nice Blog..

        I think, we can raise error message in ABAP program. Which denotes the process type is failed.

        Regards,
        anil

        (0) 
        1. Balaji Venugopal Post author
          Hi Anil,
          Yes. The purpose of this custom ABAP program process type is to raise alert notification when the program fails, which is not supported by standard “ABAP program” process type.
          (0) 
          1. anil kamsala
            HI Balaji,
            My comment was in response to Kenneth’s Q’n  🙂

            I think we can make custom ABAP process type to fail based on the requirement. i.e. if some condition doesnt met then we can rise a error message in the program so that ABAP process type will fail and subsequent process type will run accordingly..  am i right?

            Regards,
            anil

            (0) 
  1. Dinesh D
    Hi balaji,

    It is really very interesting blog. Step-by-step screenshot explains the procedure very clearly. Indeed very useful blog. This blog we can understand that we can create our own process types similarly as you explained for other process types also. Thanks for your time and effort for making this valuable contribution.

    Regards,
    Dinesh D

    (0) 
  2. benedict vasanth
    Good work Balaji. Till now I wasn’t even aware that a normal ABAP Program process type cannot be defined with an ‘failure’ event. Also, now I know that we can create our own Process Types.

    Vasanth.VF

    (0) 
  3. Dennis Staiger
    Instead of clicking on the “new entry” button, I suggest selecting the ABAP process and clicking on the “copy” button. This will prepopulate all settings exactly as they are for the standard ABAP process type, so all you have to do is changing the “possible events” drop-down to “Process ends successful or incorrect”.
    (0) 
  4. Laurent THIBERT
    Hi,
    I implemented what is suggested in your weblog. It works fine in theory and in testing.
    However when I execute in batch my process chain, and when I monitor it, SAP prompts me a popup as soon as there is a failure, asking me to choose between Yes (to continue) or No.
    How could we have the Yes by default? I do not want the chain to wait for a manual confirmation. I understood that the goal of this weblog is to have a complete execution of the chain whatever is the return code in the Abap step.
    Regards,
    Laurent
    (0) 
    1. Veronica Paglia

      Hi Guys,

      we have implemented the solution but we have the same behaviour taht Laurent explained in the previous post.

      So if the ABAP program fails, the following subsequent steps are not triggered automatically. If we open the monitor we have to answer to the pop up otherwise nothing happens. Any solution for this?

      Thanks ,

      Veronica

      (0) 

Leave a Reply