Skip to Content
Author's profile photo Former Member

HowTo create an ABAP process type with a return code (red/green) for use in a process chain in BW 7.x

Introduction

Various customers have asked me how they could integrate the execution of an ABAP program followed by a return code (red/green) inside a process chain in SAP BW 7.x. This document describes the steps that have to be performed to allow for this functionality.

Audience

SAP BW Administrators / Developers.

Table of Contents

Introduction

Audience 

Table of Contents

1. Creation of the process type

2. Integration of the process type

1. Creation of the process type

This chapter describes the steps to create the new process type that allows for the integration of an ABAP program with a return code (red/green) inside a process chain.

Step 1: Log on to the BW system.

Step 2: Execute transaction <RSPC>.

Step 3: Open/Display a process chain.

Step 4: Go to the menu <Settings><Maintain Process Types>.

RSPC - Settings - Maintain Process Types.jpg

Step 5: Select the entry where the process type equals <ABAP>.

Step 6: Go to the menu <Edit><Copy As>.

RSPC - Settings - Maintain Process Types - Copy As.jpg

Step 7: Apply the settings as shown in the picture below and press <Enter>.

Process Type ZABAP.jpg

Step 8: Save the new process type.

Process Type ZABAP - save.jpg

2. Integration of the process type

This chapter describes the steps that are required to integrate the new process type in a process chain.

Step 1: Log on to the BW system.

Step 2: Execute transaction <SE38> and enhance the program for which you want to raise a return status Green “MESSAGE i000(zz)” or Red (MESSAGE i000(zz)) as shown in the example below.

ZABAP_RETURNCODE_SAMPLE.jpg

Step 3: Open the process chain in which you want to include the new process type.

Step 4: Double-click the <ABAP Program with return Status> process type and fill out the required fields as shown in the picture below.

ZABAP_RETURNCODE_SAMPLE - Create.jpg

Step 5: Enter the program name and set the properties for the ABAP program.

ZABAP_RETURNCODE_SAMPLE - Define.jpg

Step 6: Add the additional steps for the process chain in case of ‘Green’ or ‘Red’.

ZABAP_RETURNCODE_SAMPLE - process chain view.jpg

Assigned Tags

      12 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo M. IS-Media
      M. IS-Media

      Hi Edo,

      Indeed a powerful step which can be used often in a PC.

      Thanks for sharing.

      Regards, Martijn

      Author's profile photo Former Member
      Former Member

      Hi Edo,

      Thanks for providing very useful information.

      In my project we had  similar situation for taking decision based on some conditions, our requirement was executing different process chain based on conditions.

      We tried ABAP process type with return code but when that process was returning status 'red' the process chain was stop and overall status of process chain was 'red'. Do you have any idea how to overcome with this situation?

      Thanks,

      Rajendra

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Hi Rajenda,

      You are right. I experienced the same issue when I tried to determine the current status for a real-time cube (status 'planning' or 'loading') to make sure that the end-status was the same after backing-up the plan-data. I haven't found a proper solution yet, but it seems that the document link in the comment from Uladzislau below can help.

      Regards,

      Edo Meinena

      Author's profile photo Veronica Paglia
      Veronica Paglia

      Hi Edo,

      i have the same requirement. I have created the ABAP Custom Process Type with return code and the process chain with two different flow according to the ABAP Program Status (Red/Green). In the ABAP Program, if some checks fail, we stop the program using the MESSAGE E999(RSPC).

      Executing the chain if the program fails, the subsequent processes are not automatically triggered. If i display the chain in the RSPC monitor, a pop up "Termination Discovered" came up and if i select manually yes , the chain updated the status and triggered the subsequent process properly but it's not automatic. How can i solve the issue?

      Thanks

      Veronica

      Author's profile photo Peter Geßler
      Peter Geßler

      We had the same issue. Note 2562807 brought us on the right track. Scheduling the job SAP_CCMS_MONI_BATCH_DP helps to notify the system of failed runs and subsequently, the process step is updated.

      Author's profile photo Uladzislau Pralat
      Uladzislau Pralat

      Hi Edo,

      your approach requires creation of customer ABAP process type each time different decision making logic is required. How many different ABAP process type you might need?

      There is much better out of the box approach - using standard Decision process type along with user-defined function. The biggest advantage of this approach is possibility to have multiple alternatives (If ... Else If ... Else), not just two e.g. true or false. Here is a detailed explanation http://scn.sap.com/docs/DOC-27399

      Regards, Uladzislau

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Hi Uladzislau,

      Thanks for sharing the information. It looks interesting. With regard to your other comment, I would like to point out that your statement about the requirement for a new process type every time decision making logic is needed is not correct. The process type is, just like any other process type, just a placeholder that can read any ABAP-program as a variant. It might have been confusing that I used the same names for both the ABAP-program and the variant. I do realize that more fancy solutions exist to achieve the same result but the document above is designed to describe an easy (and short) way of implementing an ABAP process type with a return code.

      Regards,

      Edo Meinema

      Author's profile photo Vijay Chandra.R
      Vijay Chandra.R

      Hi,

      Good & Helpful Blog.

      I have a concern, I hope without creating generic Process type we can do the same by using ABAP Program process type and include Z program in it.

      Regards,

      rvc

      Author's profile photo HS Kok
      HS Kok

      Very useful blog post. Thanks Edo!

      We were formerly just running ABAP programs and manually checking the status every start of the work date. This tweak will prove extremely useful in aligning the load monitorings as part of the automated view in RSPCM.

      Author's profile photo Raf Boudewijns
      Raf Boudewijns

      Very nice one!

      We used to do this in a more complicated way 😳 ! Just did it this way and it works like a charm (without much "effort").

      Thanks!

      Author's profile photo Former Member
      Former Member

      Hi there,

      I have recently become a Dollar Universe user. Few days ago i had to start making some SAP chains at DU. I was wondering which is the difference between a chain containing a number of SAP uprocs and a single uproc with same number of ABAP steps given the fact that those uprocs have the same SAP chain characteristics and only different ABAP Step charasteristics.

      Author's profile photo Joshua Kime
      Joshua Kime

      Hello,

      Thank you for the helpful article. I noticed a small error though. In step two under "2. Integration of the process type" you list "(MESSAGE i000(zz))" as the message for both the Green and Red statuses while "(MESSAGE e000(zz))" is shown in the example screenshot for the Red status which I believe is correct.