View

View is a data access function that can be used to select data and provide projections and aggregations on top of it. This view on the data can then be used for consumption in other functions like Allocation. In addition, a view has several options for fine-tuning data consumption. For example, it can use a table sample or fraction of the input data to select a specific time version of data in history tables or it can only provide input data if a run parameter precondition is met (for example, if MY_READ_PARAM_FLAG = “X”). A view can also run iterations of input function calls, including early exit checks.

Key Features

Header

In the header, you define the principal behavior of the view.

View Type:

  • Implicit Fields: The view adopts all the fields from the input. Only the fields explicitly named in the output are used if you have defined an aggregation on the Output tab using field grouping.

  • Explicit Fields: The view adopts only the fields explicitly named on the Output tab; all other fields are excluded.

Output

You can enter additional field details (such as select conditions, formulas, group aggregations and sort orders) on the Output tab. This is optional for the view type “Implicit Fields”, but mandatory for the type “Explicit Fields”.

Advanced

The following options are available on the Advanced tab:

  • Top: You can enter a constant number or parameter in this field to restrict the data reading to a given absolute number of records. For example, Top = 100 reads only the first 100 records of the input.

  • Run Parameter Precondition: If you enter a parameter condition here, the view only provides an output if this precondition is met. Otherwise, the output is 0 records.

  • Default Type: If you choose “Default output, if input empty”, the view populates and displays results based on the assigned field value in the Output tab. This gives a modeler the option of producing one record table with self-assigned values.

  • Iteration Type:

    The iteration types execute stored procedures of an input function in a loop when the View function is executed.

    If you choose the option “None”, no iteration takes place.

    For scenarios where an input function is a Writer function that writes data to a Model Table, you can use the following iteration types:
    • “For Loop”

    • “Reverse For Loop”

    There are scenarios where the input function contains a processing logic that is outside of the stored procedure, such as in a process chain. An example is the Writer function that writes data to BW. In this case, you can use the following iteration types:
    • “Application Server For Loop”

    • “Application Reverse For Loop”

  • The system bases the number of loops it executes on the limits that you define in the following fields:
    • Low: Minimum number of loops to be executed

    • High: Maximum number of loops to be executed

  • Iteration Parameter: In the Iteration Parameter field, you need to enter a parameter that contains the current loop number and thus makes it available for the input function as well.

  • Early Exit Check: You can register an early exit check from the environment checks. This is applied to the view result and if the check is successful, the iteration is exited early.

  • Iteration Result:
    • All Iterations: The result of all iterative calls of the view input is collected and provided as output.

    • Last Iteration: Only the output of the last iterative call is provided.

Procedure

Function Access

Follow the steps below to access the View function:

  1. In the client where SAP Profitability and Performance Management is installed, choose Start of the navigation pathSAP Menu Next navigation step Profitability and Performance Management Next navigation step Modeling Next navigation step Start My EnvironmentsEnd of the navigation path.

  2. The Environment screen appears in a separate browser window. Choose an existing environment and continue. Within the environment, you can set up the newly added function.

Function Configuration

Follow the steps below to configure the View function:

  1. In edit mode, configure the following required fields in the header. For more information about the header, see the Key Features section above.

    • View Type
    • Suppress initial Result
    • Result Model Table
  2. Define the input function to be used on the Input tab.

  3. Define the fields to be used on the Signature tab.

  4. Define the fields to be used on the Output tab, if needed.

  5. Define the checks to be used on the Checks tab, if needed.

  6. Define the required fields on the Advanced tab, if needed:
    • Top
    • Run Parameter Precondition
    • Default Type
    • Iteration Type
    • Low
    • High
    • Iteration Parameter
    • Early Exit Check
    • Iteration Result
  7. Choose Save and then choose Activate.

Related Information

  • For more information about the Advanced tab of the View function, see View Function: Advanced TabInformation published on SAP site.

  • For more information about common aspects of SAP Profitability and Performance Management functions, see Concepts for Key Users.

  • For more information on how to add and remove functions in SAP Profitability and Performance Management environments, see Function Hierarchy.