Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 16

All about Process Chains...

in SAP BW Step By Step


Posted by SharathLabels: Process Chains

By: Anonymous I want to continue my series for beginners new to SAP BI. In this blog I write down the necessary steps how to create a process chain loading data with an infopackage and with a DTP, activation and scheduling of this chain. 1.) Call transaction RSPC

RSPC is the central transaction for all your process chain maintenance. Here you find on the left existing process chains sorted by application components. The default mode is planning view. There are two other views available: Check view and protocol view. 2.) Create a new process chain To create a new process chain, press Create icon in planning view. In the following pop -Up window you have to enter a technical name and a description of your new process chain.

The technical name can be as long as up to 20 characters. Usually it starts with a Z or Y. See your project internal naming conventions for it. 3.) Define a start process After entering a process chain name and description, a new window pop-ups. You are asked to define a start variant.

Thats the first step in your process chain! Every process chain does have one and only one starting step. A new step of type Start process will be added. To be able to define unique start processes for your chain you have to create a start variant. These steps you have to do for any other of the subsequent steps. First drag a process type on the design window. Then define a variant for this type and you have to create a process step. The formula is: Process Type + Process Variant = Process Step! If you save your chain, process chain name will be saved into table RSPCCHAIN. The process chain definition with its steps is stored into table RSPCPROCESSCHAIN as a modified version.So press on the create button, a new pop-up appears:

Here you define a technical name for the start variant and a description. In the n ext step you define when the process chain will start. You can choose from direct scheduling or start using meta chain or API. With direct scheduling you can define either to start immediately upon activating and scheduling or to a defined point in time like you know it from the job scheduling in any SAP system. With start using meta chain or API you are able to start this chain as a subchain or from an external application via a function module RSPC_API_CHAIN_START. Press enter and choose an existing transport request or create a new one and you have successfully created the first step of your chain.

4.)

Add a loading step

If you have defined the starting point for your chain you can add now a loading step for loading master data or transaction data. For all of this data choose Execute infopackage from all available process types. See picture below:

You can easily move this step with drag & drop from the left on the right side into your design window.A new pop-up window appears. Here you can choose which infopackage you want to use. You cant create a new one here. Press F4 help and a new window will pop -up with all available infoapckages sorted by use. At the top are infopackages used in this process chain, followed by all other available infopackages not used in the process chain. Choose one and confirm. This step will now be added to your process chain. Your chain should look now like this:

How do you connect these both steps? One way is with right mouse click on the first step and choose Connect with -> Load Data and then the infopackage you want to be the successor.

Another possibility is to select the starting point and keep left mouse button pressed. Then move mouse down to your target step. An arrow should follow your movement. Stop pressing the mouse button and a new connection is created. From the Start process to every second step its a black line. 5.) Add a DTP process In BI 7.0 systems you can also add a DTP to your chain. From the process type window ( see above.) you can choose Data Transfer Process. Drag & Drop it on the design window. You will be asked for a variant for this step. Again as in infopackages press F4 help and choose from the list of available DTPs the one you want to execute. Confirm your choice and a new step for the DTP is added to your chain. Now you have to connect this step again with one of its possible predecessors. As described above choose context menu and connect with -> Data transfer process. But now a new pop-up window appears.

Here you can choose if this successor step shall be executed only if the predecessor was successful, ended with errors or anyhow if successful or not always execute. With this connection type you can control the behaviour of your chain in case of errors. If a step ends successful or with errors is defined in the process step itself. To see the settings for each step you can go to Settings -> Maintain Process Types in the menu. In this window you see all defined (standard and custom ) process types. Choose Data transfer process and display details in the menu. In the new window you can see:

DTP can have the possible event Process ends successful or incorrect, has ID @VK@, which actually means the icon and appears under category 10, which is Load process and post processing. Your process chain can now look like this:

You can now add all other steps necessary. By default the process chain itself suggests successors and predecessors for each step. For loading transaction data with an infopackage it usually adds steps for deleting and creating indexes on a cube. You can switch off this behaviour in the menu under Settings -> Default Chains". In the pop-up choose Do not suggest Process and confirm.

Then you have to add all necessary steps yourself. 6.) Check chain Now you can check your chain with menu Goto -> Checking View or press the button Check. Your chain will now be checked if all steps are connected, have at least one predecessor. Logical errors are not detected. Thats your responsibility. If the chain checking returns with warnings or is ok you can activate it. If check carries out errors you have to remove the errors first. 7.) Activate chain After successful checking you can activate your process chain. In this step the entries in table RSPCPROCCESSCHAIN will be converted into an active version. You can activate your chain with

menu Process chain -> Activate or press on the activation button in the symbol bar. You will find your new chain under application component "Not assigned". To assign it to another application component you have to change it. Choose "application component" button in change mode of the chain, save and reactivate it. Then refresh the application component hierarchy. Your process chain will now appear under new application component. 8.) Schedule chain After successful activation you can now schedule your chain. Press button Schedule or menu Execution -> schedule. The chain will be scheduled as background job. You can see it in SM37. You will find a job named BI_PROCESS_TRIGGER. Unfortunately every process chain is scheduled with a job with this name. In the job variant you will find which process chain will be executed. During execution the steps defined in RSPCPROCESSCHAIN will be executed one after each other. The execution of the next event is triggered by events defined in the table. You can watch SM37 for new executed jobs starting with BI_ or look at the protocol view of the chain. 9.) Check protocol for errors You can check chain execution for errors in the protocol or process chain log. Choose in the menu Go to -> Log View. You will be asked for the time interval for which you want to check chain execution. Possible options are today, yesterday and today, one week ago, this month and last month or free date. For us option today is sufficient. Here is an example of another chain that ended incorrect:

On the left side you see when the chain was executed and how it ended. On the right side you see for every step if it ended successfully or not. As you can see the two first steps were successfull and step Load Data of an infopackage failed. You can now check the reason with context menu display messages or Process monitor. Display messages displays the job log of the background job and messages created by the request monitor. With Process monitor you get to the request monitor and see detailed information why the loading failed. THe logs are stored in tables RSPCLOGCHAIN and RSPCPROCESSLOG. Examining request monitor will be a topic of one of my next upcoming blogs.

10.) Comments Here just a little feature list with comments. - You can search for chains, but it does not work properly (at least in BI 7.0 SP15). - You can copy existing chains to new ones. That works really fine. - You can create subchains and integrate them into so-called meta chains. But the application component menu does not reflect this structure. There is no function available to find all meta chains for a subchain or vice versa list all subchains of a meta chain. This would be really nice to have for projects. - Nice to have would be the possibility to schedule chains with a user defined job name and not always as "BI_PROCESS_TRIGGER". But now it's your turn to create process chains.

SAP BI REPORTING
CELL EDITOR:

Cell Editor allows direct definition of specific cells in a query. The cell editor also allows you to mark a specific cell as a 'reference cell' so that it can be referenced in further calculations cells are the intersection of two structures in a query definition therefore the cell editor can only be used in query definitions where there are two structures.

cells can be formulas, selections, references or auxiliary cells. One structure will hold only characteristics while the other structure holds only keyfigure

The cell editor is a function of the BEx Query Designer. We can select the editor only if the query definition contains two structures. We can define a maximum of two structures in a query definition.

Cell-specific definitions allow you, in addition to the implicit cell definitions resulting from the formulas created, to explicitly define formlas and selection conditions for cells, thereby overwriting the implicitly generated values. This function allows you to create more detailed queries.

The formulas or selection conditions that we define for a cell are always effectie at the intersection of two structure elements. If a drilldown characteristic has various characteristic values, the cell definition is always effective at the intersection of the characteristic value with the keyfigure.

Queries with two structures:

A query which uses two structures provides a very large number of opportunities for creative report design.

We can have a maximum of two structures in a query. we can place both structures in the rows or columns or we can put one structure in the row and on in the column. we can mix structures and characteristics in the rows or columns. we can provide our own descriptions for the rows/columns that are represented by structures membrs. (i.e. define the first row of a structure based on required values of 0person and name the row 'My Team'). we can use all the usual filtering options to define the members of the structure, i.e, single values, ranges, hierarchy nodes. We can even use variables to keep the selection flexible.

We can use Navigation Attributes for defining queries in reporting in the same way as characteristics. They are displayed in the characgteristic dimension.

VARIABLES:

Variables are query parameters that you define in the Query Designer and that are filled with values only when you execute the query or Web application.

How can I structure my reports more flexibly? By using Variables

Variables are reusable objects. The variables defined in the query designer are available in all infoproviders for use in query definition. Variables do not depend on the infoprovider, but rather on the infoobject for which they were created.

Variables enable you to set queries more flexibly (query parametrization). When using variables in the query designer, you do not chose fixed characteristic values, hierarchies, hierarchy nodes, texts, or formula elements, but rather you set variables as placeholders. These placeholders are then filled with values at query runtime(when you insert the query into a workbook, when you refresh a workbook or when you launch the query on the web). If you use variables, a query definition can then serve as the basis for many different queries.

Swapping Interval Limits:

If you are using variables when maaking interval selections, you can swap the limits by highlighting the relevant variable in the right selection window, and choosing swap interval limits from the context menu.

By using Formula variable:

To calculate the average sales by store, use a formula variable to provide the number of stores to the calculation. This values could be read from a master table, supplied by a user at run time, it could even be an

attribute of an organization.

The customer exit processing type for variables enables you to determine values for variables by means of a function module exit. The function module used is EXIT_SAPLRRSO_001.

we create a project in transaction CMOD by selecting the SAP enhancement RSR00001 and assigning this to the enhancement project.

For more information about working with the SAP enhancement for global variables in reporting, see the SAP enhancement help. Call the transaction SMOD. Enter the name of the enhancement(RSR00001), choose documentation and then Edit Display/Change. For general information about working with Customer Exits, see the application help in transaction CMOD.

Defining New Variables

New variables are defined in the dialogs where they used. The settings are made on a series of tabs. That is

General Tab Replacement path Details Default values and

Currencies and units.

The setting Offset Start and Offset Length enables yo to determine the start and the length of the text output. For example, if the only the first 10 characters of the text are to be used, the Offset Start value would be 0 and the Offset Length value would be 10.

In order to structure our reports flexibly,you want to use variable instead of fixed values to restrict our keyfigures. We want to list the sales volume for each of our materials for a particular month and for a time interval. We want to display the chosen time or time period in the column header of the sales volumes.

In order for the exception to take effect, all characteristics with a value on this screen other than Standard must be in the drilldown of the report. If there is a characteristic in the report drilldown that has standard as the assigned value on this screen, we have to place this characteristic at the end of the drilldown, otherwise the exception will not take effect.

The sales department wants the flexibility to restrict a report so that only the most important information displays. This should enable a more efficient analysis of data when large amounts of data are analyzed. We now have the task of using conditions within a query definition in order to meet the aims of the sales department.

A condition row consists of a keyfigure, an operator, and a value for the operator. In query definitions that contain two structures, there is an additional field for defining a structural component.

The SAP BI users use BEx Analyser as an analytical, reporting, and design tool embedded in Microsoft Excel to easily access Infoprovider data, Queries, Query Views, and workbooks and to analyze the data by navigating interactively. They can configure global settings and specific settings for workbooks, create new workbooks and trigger the distribution of them. In order to define new query definitions they also can launch the BEx Query Designer.

Creating Reusable Structures


Use
You can use structures in several different queries. You have to save them in the InfoProvider to reuse them. These structures are then called reusable structures.

When you use a reusable structure in a query, the structure is not copied, but rather the reference to it is. Changes made to reusable structures affect all queries in which reusable structures are used.

To better distinguish between the two kinds of structures, structures that are not saved as reusable structures are called local structures. Local structures are used in only one query. You can change local structures into reusable structures in any existing query by selecting the structure and, choosing Save as... from the context menu and then entering a technical name and a description in the Save Structure as... dialog box.

You can change reusable structures that you are using in a query into local structures by selecting the structure and choosing Remove Reference from the context menu.

Prerequisites
At least one InfoProvider that is filled with data must be available in the Business Information Warehouse.

Procedure
1. Start the Query Designer. You open the Query Designer from Start/Programs/Business Explorer/Query Designer. You can also call up the BEx Query Designer from the following components: BEx Analyzer BEx Web Application Designer

Crystal Reports Business Explorer Analyzer: In the BEx toolbar, choose Open Queries. In the BEx Open Dialog, you have access to the selection screen displaying all available queries in your history, favorites and roles or assigned to the InfoAreas. Choose New Web Application Designer: In the menu toolbar in the Web Application Designer, choose Tools Query Designer. Choose New Query . 2. You get to the selection screen for all InfoProviders for which you can define a new query. From the list of all available InfoProviders, select the InfoProvider for which you want to create the reusable structure. The available objects in the InfoProvider you selected are displayed as a directory tree in the left side of the Query Designer. 3. In the Rows or Columns directory of the Query Designer, choose New Structure from the context menu (right mouse button). 4. Create a new structure. Select the characteristics and key figures of the InfoProvider that you want to use in the new structure and drag them into the structure directory. Where necessary, restrict a characteristic or a key figure, or define a new calculated key figure.

You can copy individual structural components within a structure. This enables you to create similarly structured structural components quickly and easily. For example, if you want to use the formula for a calculated key figure (K1) in another calculated key figure (K2), you can copy K1 and continue to build the formula in K2. From the context menu of the structural component, choose Copy and from the context menu of the structure, choose Insert. You can also copy structural components using temporary storage locations (Ctrl-C, Ctrl-V). 5. Highlight the new structure. From the context menu (right mouse-click), choose Save as... and enter a Technical name and a Description.

Result
The reusable structure is in the structure list of the InfoProvider tree and you can use it again when you create new queries.

You might also like