Vous êtes sur la page 1sur 11

Using Decision Step in Process

Chain

Applies to:
SAP BI 7.0 and above. For more information, visit the Business Intelligence homepage.

Summary
The current business scenarios are so complex that we require executing specific set of jobs in BW system
based on different conditions (e.g. Date, day etc) to meet the business reporting requirement. The decision
process type can be used to achieve such requirement in the process chain. The document provides an
overview of the decision process type in design of process chain.

Author: Shakir Iqbal Kapdi


Company: Infosys Technologies LTD
Created on: 2nd April 2010

Author Bio
Shakir Kapdi has more than 3 years of experince in SAP. He has worked on various project
like implementation, Upgarde, Application support and Enhancment. He has experince in
SAP BI 3.X and 7.0. He is currently working in Infosys Technologies LTD.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 1
Using Decision Step in Process Chain

Table of Contents
Overview of Decision process type .................................................................................................................... 3
Formula Builder ............................................................................................................................................... 5
Example of decision process type ................................................................................................................................ 7
Related Content ................................................................................................................................................ 10
Disclaimer and Liability Notice .......................................................................................................................... 11

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 2
Using Decision Step in Process Chain

Overview of Decision process type


The decision process type is available in the general services process type category.

As the name suggest the decision process type execute a specific predecessor process from multiple
alternative based on fulfillment of the specific condition.
This logic for the condition is provided through the formula that is checked at the runtime.

The formulas are assigned to a specific command. These commands are nothing but an “If – Else”
statement. Based upon fulfillment of the particular condition the command is executed thus triggering the
event assigned to it.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 3
Using Decision Step in Process Chain

The initial decision process type has a single “If –Else statement” as shown below.

By default, “If” condition is associated with event “1” (Option 01) while the “Else” statement is associated with
error event as shown above.
This association of the “Else” command can be changed if we want the else statement to trigger event “2”
(option 2) rather than giving error.
This can be done by clicking on the event tab and selecting the option as shown below.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 4
Using Decision Step in Process Chain

Note: As we can see in above cases the “Else” statement is not linked with any formula. If the conditions provided in the
“If” statements are not fulfilled the “Else” step is executed. Either we can associate it with error event or we can
trigger other process by associating it to “option 2” event.

We can add multiple “Else If” statement if required in the variant as shown below.

Formula Builder
The main element of the decision step is the formula builder where the conditions are formulated with the
logical expression.
To create a new formula click on the create formula button as shown below.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 5
Using Decision Step in Process Chain

Provide the description for the formula.

Once the description is provided, the formula editor is opened. The initial screen of the formula builder is as
shown below.

4
2 3

The formula builder is divided into 4 panes.


 Pane 1: The formula created is displayed in this pane.
 Pane 2: This pane shows the field variable (system variable) that can be used in the
formula.
 Pane 3: This pane provides the list of the functions that can be used in the formula.
 Pane 4: this pane contains push button for some of the general function for fast
entering.
Field variable are the system variable that returns some values that can be used in the formula. For Example
SYST-DATUM provide current date of the application server.
The function is used to manipulate the formula. Some of the functions other than the general function (like
Greater then, equal to) are as below

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 6
Using Decision Step in Process Chain

Using the above feature the formula can be created pertain the logic for the decision condition.

Example of decision process type


Consider a scenario where there is a cube, which is on BWA and is loaded on daily basis. Rollup
of the cube is done daily for the new request loaded to make the data available on BWA.
To maintain the correctness of the BWA indexes of the cube it is required at least once to run
the in initial activation and fill of BIA index on the cube. Since the cube contain huge set of
data the initial fill of BWA takes time due to which the initial fill cannot be done on weekday. In
order, not to affect the business reporting it is decided to do the initial fill only on weekend
when there is basically less (almost none) reporting done.
To achieve this requirement in the process chain we need to create the decision step which will
check whether the current day is a weekend.
If the current day is weekend (Sunday) the initial fill will be carried out. If the current day is
not weekend, the regular rollup will be carried out.
The variant for the decision step will be as shown below

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 7
Using Decision Step in Process Chain

The “If” step will check if the current day is weekend (Sunday) otherwise else step is carried
out.
The formula used to check the weekend (Sunday) is as follows

Here the filed SYST_DATUM “Current date” is used which returns the current date on the
application server.
The function DATE_WEEKDAY1 returns the weekday number from date.
If the function returns the value 7 that means the current day is weekend (Sunday) the “If”
condition is fulfilled and is executed.
The layout of the process chain will be as follows

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 8
Using Decision Step in Process Chain

The same logic can be used to trigger any load or trigger a broadcast on the weekend.
Thus we can see how decision process type can help us trigger various job based on different
condition to meet the business requirement.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 9
Using Decision Step in Process Chain

Related Content
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/06/efd63b54e56276e10000000a11402f/frameset.htm
For more information, visit the Business Intelligence homepage.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 10
Using Decision Step in Process Chain

Disclaimer and Liability Notice


This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not
supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.
SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document,
and anyone using these methods does so at his/her own risk.
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or
code sample, including any liability resulting from incompatibility between the content within this document and the materials and
services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this
document.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 11

Vous aimerez peut-être aussi