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 © 2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 1

.....sap........... 11 SAP COMMUNITY NETWORK © 2010 SAP AG SDN ...................................................................................... 10 Disclaimer and Liability Notice .......com | BPX .............................sap.................................................................sap.....................com | BOC ..................... 5 Example of decision process type ................................... 3 Formula Builder ......................................................................................................sdn...bpx............................................................com | UAC ................................ 7 Related Content .....................................................boc...............com 2 .........................sap......................................................uac............................Using Decision Step in Process Chain Table of Contents Overview of Decision process type ..............

com | BPX .boc.sap.bpx. These commands are nothing but an “If – Else” statement.com 3 .com | BOC . Based upon fulfillment of the particular condition the command is executed thus triggering the event assigned to it.Using Decision Step in Process Chain Overview of Decision process type The decision process type is available in the general services process type category.sap. SAP COMMUNITY NETWORK © 2010 SAP AG SDN . As the name suggest the decision process type execute a specific predecessor process from multiple alternative based on fulfillment of the specific condition. The formulas are assigned to a specific command.uac.com | UAC . This logic for the condition is provided through the formula that is checked at the runtime.sdn.sap.sap.

bpx.uac.sdn.boc.sap.com | BOC . 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.com | BPX . This can be done by clicking on the event tab and selecting the option as shown below. “If” condition is associated with event “1” (Option 01) while the “Else” statement is associated with error event as shown above.com | UAC .sap.sap.com 4 .sap. SAP COMMUNITY NETWORK © 2010 SAP AG SDN . By default.Using Decision Step in Process Chain The initial decision process type has a single “If –Else statement” as shown below.

sdn.com | BPX . Formula Builder The main element of the decision step is the formula builder where the conditions are formulated with the logical expression.com 5 .bpx.sap. If the conditions provided in the “If” statements are not fulfilled the “Else” step is executed.boc.com | UAC .sap.com | BOC . 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.sap.Using Decision Step in Process Chain Note: As we can see in above cases the “Else” statement is not linked with any formula. SAP COMMUNITY NETWORK © 2010 SAP AG SDN .uac. To create a new formula click on the create formula button as shown below.sap.

Some of the functions other than the general function (like Greater then. The initial screen of the formula builder is as shown below.sap.com 6 .bpx.sap.  Pane 1: The formula created is displayed in this pane.com | BOC .sap. Once the description is provided.Using Decision Step in Process Chain Provide the description for the formula.uac.com | BPX .  Pane 4: this pane contains push button for some of the general function for fast entering.  Pane 3: This pane provides the list of the functions that can be used in the formula. 1 4 2 3 The formula builder is divided into 4 panes. equal to) are as below SAP COMMUNITY NETWORK © 2010 SAP AG SDN . the formula editor is opened.com | UAC . For Example SYST-DATUM provide current date of the application server. The function is used to manipulate the formula.  Pane 2: This pane shows the field variable (system variable) that can be used in the formula.sdn.boc.sap. Field variable are the system variable that returns some values that can be used in the formula.

sap.com | BPX . which is on BWA and is loaded on daily basis.sdn.boc.bpx.uac.sap.com | BOC . Example of decision process type Consider a scenario where there is a 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. Rollup of the cube is done daily for the new request loaded to make the data available on BWA.sap. 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. the regular rollup will be carried out.Using Decision Step in Process Chain Using the above feature the formula can be created pertain the logic for the decision condition. 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.com | UAC .com 7 .sap. If the current day is not weekend. The variant for the decision step will be as shown below SAP COMMUNITY NETWORK © 2010 SAP AG SDN . If the current day is weekend (Sunday) the initial fill will be carried out. 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.

sap.sdn.boc.Using Decision Step in Process Chain The “If” step will check if the current day is weekend (Sunday) otherwise else step is carried out.sap.com | BPX .com | BOC . The layout of the process chain will be as follows SAP COMMUNITY NETWORK © 2010 SAP AG SDN .bpx. If the function returns the value 7 that means the current day is weekend (Sunday) the “If” condition is fulfilled and is executed. 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.sap.com | UAC . The function DATE_WEEKDAY1 returns the weekday number from date.uac.com 8 .sap.

com | BOC . SAP COMMUNITY NETWORK © 2010 SAP AG SDN .sap.sap.sap.com | BPX .bpx.com 9 . Thus we can see how decision process type can help us trigger various job based on different condition to meet the business requirement.com | UAC .sap.Using Decision Step in Process Chain The same logic can be used to trigger any load or trigger a broadcast on the weekend.uac.sdn.boc.

SAP COMMUNITY NETWORK © 2010 SAP AG SDN .boc.sap.sdn.sap.com | BOC .htm For more information.sap.bpx.com 10 .uac. visit the Business Intelligence homepage.com | BPX .com/saphelp_nw70ehp1/helpdata/en/06/efd63b54e56276e10000000a11402f/frameset.sap.Using Decision Step in Process Chain Related Content http://help.sap.com | UAC .

sap. SAP COMMUNITY NETWORK © 2010 SAP AG SDN . SAP will not be held liable for any damages caused by using or misusing the information.bpx. code or methods suggested in this document.boc.com | BOC . You agree that you will not hold.com 11 . 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. Changes made based on this information are not supported and can be overwritten during an upgrade.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. or seek to hold.com | UAC .sdn.sap. SAP responsible or liable with respect to the content of this document.com | BPX .sap.sap. including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP.uac. and anyone using these methods does so at his/her own risk.