Friday, February 6, 2009

SAP Specifying Selection Variables for Flow Definitions With Parallel Branches

Specifying Selection Variables for Flow Definitions With Parallel Branches


Use

Normally the selection criteria for period-end closing do not change very often. Criteria that do change regularly are the closing period and the fiscal year. The period and fiscal year must be changed for each program or flow definition specified as a task in the task list.

To avoid having to change these values for every single program or every flow definition, you can define selection variables in the program variants.

Example

You have five programs that must run with the same valuation for nine plants. That means that every program must run with a plant-specific variant for each plant. These variants differ only in their Plant specification.

As described below, you define global variables for fiscal year, period and plant . Create variants for the five programs and define the global variants that you created previously. Finally define a flow definition (A) for the five programs. Define a flow definition (B) with nine parallel branches (for the plants). Include the flow definition A in each of these branches. A dialog box appears that displays the three global variables (fiscal year, period, plant). Enter a value for the variable Plant and flag the entry as to be saved. The dialog box reappears when you plan flow definition B in the day view. Enter values for each fiscal year and period. Do not make an entry for the variable Plant. If you make an entry here, the system does not accept it. You defined the plant when creating the flow definition.

Prerequisites

Y ou have defined the variables already. For more information, see Defining Selection Variables.

You are in flow definition in Schedule Manager (Extras ® Flow definition ® Edit flow definition).

  1. Choose a processing step in the navigation area.
    On the right of the screen, you see Flow definition: Task details.
  2. Enter a new variant for this processing step and define a name for this new variant in the Variant field .
  3. Choose Change variant.
    The Maintain Variant: Program , Variant screen appears.

Procedure

  1. Choose Attributes.
  2. Make an entry in the Description field.
  3. Now you want to specify variables for the period and fiscal year that you can then change once centrally for all programs and flow definitions that use those variables. To do this, under the heading Selection screen objects, select the column S in the lines Period and Fiscal year.
  4. Choose Selection variables.
  5. To choose selection criteria for the variables P_FROM (period) and P_GJAHR (fiscal year), use the input help.

Note

You previously entered these variables in table TVARV.

  1. Save your entries.
    The Maintain Variant: Program , Variant screen appears.

Result

The system uses these entries for the following purposes:

  • To feed these variables to a program created directly as a task in the workflow.
  • To feed these variables to the parallel branches.

Note

The system mixes the variables of the parallel branches with those of the main workflow.

If the parameter values of the main workflow are different from those of the subworkflows, the system uses the parameter values that were specified when the subworkflows were created.

No comments:

Archive

All Rights Reserved