You are on page 1of 15

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.

com
2009 SAP AG 1
Customizing Business Process
Flows
Applies to:
SAP Business Planning and Consolidation 7.0 MS. For more information, visit the Enterprise Performance
Management homepage
Summary
In SAP BPC, we have Business Process Flows (BPFs), which are used to pre-package and sequence
application tasks for different departments within the organization. Any of the available features within BPC
Web, BPC for Office, and BPC Administration can be utilized by a business process flow.
This document describes how to enhance the look & feel of the BPFs by providing a graphical view to the
status of the BPFs.

Author: Nilanjan Chatterjee
Company: Mahindra Satyam
Created on: 2 May 2010
Author Bio
Nilanjan Chatterjee is a Subject Matter Expert (SME) with Mahindra Satyam. Nilanjan has almost 3 years of
experience on Business Process and Simulation (BPS) and Business Planning and Consolidation (BPC).
Customizing Business Process Flows
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
2009 SAP AG 2
Table of Contents
Enhancing Business Process Flows ................................................................................................................... 3
Pre-Requisites ................................................................................................................................................. 4
System Design ............................................................................................................................................................. 5
Related Contents ................................................................................................................................................ 8
Appendix ............................................................................................................................................................. 9
Copyright ........................................................................................................................................................... 15

Customizing Business Process Flows
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
2009 SAP AG 3
Enhancing Business Process Flows
In SAP BPC, we have Business Process Flows (BPFs), which are used to pre-package and sequence
application tasks for different departments within the organization. Any of the available features within BPC
Web, BPC for Office, and BPC Administration can be utilized by a business process flow.
This document describes how to enhance the look & feel of the BPFs by providing a graphical view to the
status of the BPFs. However, this doesnt involve any kind of enhancements in the BPF as such. Instead,
this guide helps you to have a graphical representation of the status of different BPFs in your Application Set.
Usually, when a user runs a particular BPF, it prompts the user for Entity, Category, and Time dimension
members. Once provided, the BPF opens a screen with the different steps involved and the user proceeds
by executing each of these steps in a sequential manner. A general BPF will look something like below.

As a consultant, if we can provide something extra on top of this and make it look something like below.

Customizing Business Process Flows
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
2009 SAP AG 4

The left half of the above figure shows the list of all the steps involved in this particular BPF. The right half
shows the status of this BPF executed on various data regions (combination of Entity, Category, and Time).
Pre-Requisites
To achieve the target of having the BPF in the above manner, we first need to have few files with us.
1. Image for GREEN signal (can be found in the BPC server - BPC:\Websrvr\Web\Images\green-
check2.gif)
2. Image for YELLOW signal (BPC:\Websrvr\Web\Images\warnicon_small.gif)
3. Image for the RED signal (BPC:\Websrvr\Web\Images\cancel-red.gif)
4. ASPX file to display the status, as above figure. Name this file as BPFStatusReport.ASPX
Copy the first 3 image files from the specified paths to BPC:\Websrvr\Web in the BPC server.
Create an ASPX file as described in the Appendix section.

Customizing Business Process Flows
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
2009 SAP AG 5
System Design
Go to BPC Web -> Content Library -> Add a New Web Page. Give a name to the Web Page and select Side
by Side.

One page opens up with 2 sections

On the left side of the page, drag and drop BPF and keep configuring as shown below

Enter a name for the BPF
Enter the Pixel Height
Customizing Business Process Flows
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
2009 SAP AG 6


This completes the configuration of the left side of the page.
On the right side box, drag and drop Website and keep configuring as below



Enter the name of the BPF you
want to open
Give a Description
You can leave this blank
Enter a name for the BPF
Enter the Pixel Height
Enter the URL as
<servername>/osoft/BPFStatu
sReport.aspx?BPFID=<bpfid>
&AppSetID=<AppsetID>
The BPFID can be found in
BPF table in SQL
Customizing Business Process Flows
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
2009 SAP AG 7
This completes the right half of the page.
Assign the desired access to the page and save it.
Go to BPC Web -> Open a business process flow -> Select your BPF, which you formatted. You will be able
to see the BPF as below.


Customizing Business Process Flows
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
2009 SAP AG 8
Related Contents
For more information, visit the Enterprise Performance Management homepage

Customizing Business Process Flows
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
2009 SAP AG 9
Appendix
Below is the code to be maintained in the BPFStatusReport.ASPX file




































<%@ import namespace="System.Data.SqlClient" %>
<%@ import namespace="System.Data" %>
<%@ import namespace="System" %>
<%@ import namespace="System.Web.UI.Page" %>
<%@ import namespace="System.Web" %>
<%@ import namespace="System.Drawing" %>
<%@ import namespace="System.XML" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>BPFReport</title>
<meta content="Microsoft Visual Studio .NET 7.1" name=GENERATOR>
<meta content="Visual Basic .NET 7.1" name=CODE_LANGUAGE>
<meta content=JavaScript name=vs_defaultClientScript>
<meta content=http://schemas.microsoft.com/intellisense/ie5
name=vs_targetSchema>


<style>
A:link {
COLOR: #000000; TEXT-DECORATION: none
}
A:active {
COLOR: #000000; TEXT-DECORATION: none
}
A:visited {
COLOR: #000000; TEXT-DECORATION: none
}
A:hover {
COLOR: #3399ff; TEXT-DECORATION: none
}
.notice {
COLOR: green; TEXT-DECORATION: none
}

body
{
FONT-FAMILY: Arial, Helvetica, sans-serif
}
.maintitle {
background-color:#0264FF;
FONT-SIZE: 14px; COLOR: #FFFFFF;
}
.title {
FONT-SIZE: 14px; COLOR: #006699; FONT-WEIGHT: bold;
}
.content {
FONT-SIZE: 14px; COLOR: #000000;
}
</style>
</HEAD>

Customizing Business Process Flows
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
2009 SAP AG 10








































<body>

<%
StartUPPage
%>

<form name="PerformanceReport" id="PerformanceReport" method="post"
action="BPFReport.aspx">
<table border=0 width="100%">
<tr>
<td class=title align=center>
Entity
</td>
<td class=title align=center>
Category
</td>
<td class=title align=center>
Time
</td>

<%
dim nCol as Integer
for nCol = 0 to m_arrStepName.count - 1%>
<td class=title align=center>
<%=cstr(nCol+1)%> . <%=replace(m_arrStepName(nCol)," ","<br>")%>
</td>
<%next%>
</tr>

<tr>
<td colspan=15><hr></td>
</tr>

<%
dim strkey as string
dim arrDisplay() as string
dim arrComplete as new ArrayList
for each strkey in m_hsDataList.keys
arrComplete=m_hsDataList.item(strkey)
arrDisplay=split(strkey,vbtab)
%>
<tr>
<td class=title align=center><%=arrDisplay(0)%></td>
<td class=title align=center><%=arrDisplay(1)%></td>
<td class=title align=center><%=arrDisplay(2)%></td>

<%
dim arrCheck() as string
dim strStatus as string
dim nBlank as Integer
dim strFirstStatus as string
dim bNotStarted as boolean
bNotStarted= false
for nCol = 0 to arrComplete.count-1

Customizing Business Process Flows
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
2009 SAP AG 11



























































arrCheck=split(arrComplete(nCol),vbtab)
select case arrCheck(2)
case "0"
strStatus="&nbsp;"
case "1"
strStatus="<img src='check_Green.gif'>"
case "2"
strStatus="<img src='check_Red.gif'>"
case "3"
strStatus="<img src='check_Yellow.gif'>"
case else
strStatus="&nbsp;"
end select
%>
<td class=content align=center><%=strStatus%></td>
<%next
nBlank = m_nColumCount-arrComplete.count
if nBlank > 0 then
dim nBlankCol as Integer
for nBlankCol = 1 to nBlank%>
<td>&nbsp;</td>
<%next
end if
%>
</tr>
<%next%>
</table>

</form>
<p>&nbsp;</p>
<table>
<tr>
<td align=center>
<img src="check_Green.gif">
</td>
<td align=center>
<img src="check_Yellow.gif">
</td>
<td align=center>
<img src="check_Red.gif">
</td>
</tr>
<tr>
<td align=center>
Step Completed
</td>
<td align=center>
Step Awaiting Review
</td>
<td align=center>
Step Rejected and Awaiting Update
</td>
</tr>
</table>
</body>
</HTML>

Customizing Business Process Flows
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
2009 SAP AG 12




























































<script language=vb runat="server">
Public strBPFID As String
Public strCategory As String
Public strTime As String
Public strAppSetID As String
Public strUserID As String
Public m_ErrorMsg As String
Public m_arrBPFList() As String
Public m_nColumCount As Integer
Public m_arrStepName As New ArrayList
Public m_hsDataList As New Hashtable
Public m_hsTeamList As New Hashtable
Public m_strQuery as string

Enum BPFDATA
Entity
Category
Time
StepName
Complete
StepOrder
End Enum

Const DBTOOL As String =
"OSoft.Services.Application.DataMgr.Tools.QueryTools"

public sub StartUPPage()
Dim strQuery As String
Dim arrRecord() As String
Dim arrData() As String
Dim objDBTOOL As Object
Dim n As Integer
Dim strItem As String
Dim strItem1 As String
Dim strItem2 As String
Dim arrRecList As ArrayList
Dim arrRecList1 As ArrayList
Dim arrRecList2 As ArrayList
Dim strFirstKey As String
Dim arrCheck() As String
Dim strKey As String
Dim strWhere As String
Dim bStart As Boolean = False
strBPFID = Trim(CType(Request.Params("BPFID"), String))
strAppSetID = Trim(CType(Request.Params("AppSetID"), String))
strUserID = Request.ServerVariables("AUTH_USER").ToString
If Len(strAppSetID) > 0 Then
If Len(strUserID) > 0 Then
bStart = True
End If
End If

Customizing Business Process Flows
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
2009 SAP AG 13



























































If bStart Then
strQuery = "select "
strQuery += "ins.entity,"
strQuery += "ste.stepname,"
strQuery += "st.complete,"
strQuery += "ste.steporder,"
strQuery += "ins.category,"
strQuery += "ins.time, "
strQuery += "st.instanceid,"
strQuery += "st.bpfid,"
strQuery += "st.stepid "
strQuery += "from "
strQuery += "bpfstatus as st,"
strQuery += "bpfinstance as ins,"
strQuery += "bpfStep as ste "
strQuery += "where "
strQuery += "st.bpfid='{0}' and "
strQuery += "st.bpfid =ins.bpfid and "
strQuery += "st.instanceid =ins.instanceid and "
strQuery += "st.stepID = ste.stepID "
strQuery += "order by st.instanceid,ste.steporder"
strQuery = String.Format(strQuery, strBPFID)
m_strQuery =strQuery
objDBTOOL = CreateObject(DBTOOL)
If Not objDBTOOL Is Nothing Then
If objDBTOOL.Connect(strAppSetID) Then
If objDBTOOL.queryserver(strQuery, arrRecord) Then
For n = 1 To UBound(arrRecord)
arrData = Split(arrRecord(n), vbTab)
strItem1 = arrData(BPFDATA.Entity) & vbTab &
arrData(BPFDATA.Complete) & vbTab & arrData(BPFDATA.StepOrder)
If m_hsDataList.ContainsKey(strItem1) Then
arrRecList = m_hsDataList.Item(strItem1)
strItem = arrData(BPFDATA.Category) & vbTab &
arrData(BPFDATA.StepName) & vbTab & arrData(BPFDATA.Time)
arrRecList.Add(strItem)
m_hsDataList.Item(strItem1) = arrRecList
Else
arrRecList = New ArrayList
strItem = arrData(BPFDATA.Category) & vbTab &
arrData(BPFDATA.StepName) & vbTab & arrData(BPFDATA.Time)
arrRecList.Add(strItem)
m_hsDataList.Add(strItem1, arrRecList)
End If
Next
'need to find longest header
Dim nLongest As Integer = 0
For Each strKey In m_hsDataList.Keys
arrRecList = m_hsDataList.Item(strKey)
If nLongest < arrRecList.Count Then
nLongest = arrRecList.Count
strFirstKey = strKey
End If
Next
If Len(strFirstKey) Then
arrRecList = m_hsDataList.Item(strFirstKey)
m_nColumCount = m_hsDataList.Item(strFirstKey).count

Customizing Business Process Flows
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
2009 SAP AG 14










































For n = 0 To arrRecList.Count - 1
arrCheck = Split(arrRecList(n), vbTab)
m_arrStepName.Add(arrCheck(0))
Next
End If
End If
End If
End If
Else
objDBTOOL = CreateObject(DBTOOL)
objDBTOOL.Connect(strAppSetID)
End If
strWhere = GetSecurityWhere(strAppSetID, strUserID)
If Len(strWhere) Then
strQuery = "select distinct BPFID from BPFAccess where " &
GetSecurityWhere(strAppSetID, strUserID)
If Not objDBTOOL Is Nothing Then
If objDBTOOL.queryserver(strQuery, m_arrBPFList) Then
If UBound(m_arrBPFList) < 0 Then
m_ErrorMsg = "You do not have access to any of BPF."
Else
If Len(m_arrBPFList(0)) = 0 Then
m_ErrorMsg = "You do not have access to any of BPF."
End If
End If
Else
m_ErrorMsg = "An error occurred while getting BPF List."
End If
End If
Else
m_ErrorMsg = "You do not have access to any of BPF."
End If

'select BPFID from BPFAccess where
objDBTOOL.CloseDB()
objDBTOOL = Nothing
end sub

Customizing Business Process Flows
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
2009 SAP AG 15
Copyright
Copyright 2009 SAP AG. All rights reserved.
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG.
The information contained herein may be changed without prior notice.
Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.
Microsoft, Windows, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation.
IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, System z10, System z9, z10, z9,
iSeries, pSeries, xSeries, zSeries, eServer, z/VM, z/OS, i5/OS, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server,
PowerVM, Power Architecture, POWER6+, POWER6, POWER5+, POWER5, POWER, OpenPower, PowerPC, BatchPipes,
BladeCenter, System Storage, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX,
Intelligent Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered trademarks of IBM Corporation.
Linux is the registered trademark of Linus Torvalds in the U.S. and other countries.
Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks of Adobe Systems
Incorporated in the United States and/or other countries.
Oracle is a registered trademark of Oracle Corporation.
UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.
Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of
Citrix Systems, Inc.
HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts
Institute of Technology.
Java is a registered trademark of Sun Microsystems, Inc.
JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by
Netscape.
SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP Business ByDesign, and other SAP products and services mentioned
herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries.
Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and
other Business Objects products and services mentioned herein as well as their respective logos are trademarks or registered
trademarks of Business Objects S.A. in the United States and in other countries. Business Objects is an SAP company.
All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document
serves informational purposes only. National product specifications may vary.
These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP
Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or
omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the
express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an
additional warranty.

You might also like