Entering content frame

Function documentation Generic Variant Definition Locate the document in its SAP Library structure

Use

To prevent you from having to explicitly create variants for all users of a query, you can use generic definitions to automatically generate variants for all users or user-specific variants (for individual users). Once the system has found these generic variant definitions, the generic variants are used in place of the variants entered explicitly. This also applies in cases where different users of the same role use different logics.

The advantage of defining generic variants is that you then only have to make the settings once for all users assigned to a query. With a user-specific variant definition, you create exceptions to the general format just for individual users. The system only generates the actual BW variants from these generic definitions during runtime.

Prerequisites

The query is defined with variables that are ready for input. The functions described below are not offered for queries without variables. In such cases, the pushbuttons for activating these functions are not available.

Features

You can generate user-specific BW variants as well as ones that are not user-specific. You make the required entries for this in the Query Request screen under General BW Variant (for all users) or under Users ® User Variants (user-specific).

You can display the variants to be generated as a Preview. In this way, you can run a plausibility check on the variant definitions when you create them and without having to be logged on to SAP BW. From the preview, you can choose Check Variant to display and check the variant directly in the selection screen of the BW query. In the preview, you can also scroll through all users.

Selection Lines

You enter selection lines for all variables (selection criteria) in the query. Your entries are stored internally in the tables SMOBWSEL (header data) and SMOBWSELP (line definitions). As soon as you enter lines, a corresponding header record is created automatically in the background. When the last line is deleted, the header record is also removed. Use the possible entries function (F4) to assist you in making your settings.

The selection lines can contain different types of selections:

·        Variants with Constant Selection Criteria

·        As with the variants to be generated in SAP BW, you can enter values directly in a variable (selection name). You do this with the fields Type, +/- Sign, or Option, as well as Value from and Value to.

·        Variants with Delivered Function Module for Time-Dependent Selections

·        You can use the User Exit field to access the function module SMO2_VARIANT_DATE_CONVERSION that is delivered by SAP. This function module uses the current system date and the formulas stored in the table SMOBWSELP to calculate the values for time-dependent selection criteria (such as 0I_CALYE or 0I_CALMO). For detailed information about the function module and an example of its usage, see the function module documentation in your SAP System.

·        Variants with User-Defined Function Modules

·        In the User Exit field, you can also enter a user-defined function module to perform additional calculations and conversions on the basis of the stored values (see Example: Customer-Defined Conversion Module).

·        Generic Selections

·        Using the fields Publication, Replication Object, and Criteria Field, you can store references to the corresponding CRM Middleware replication tables containing the subscriptions that are created in the Administration Console.

·        Such a generic selection has the following underlying logic: the site ID assigned to the current BW user can be taken from the corresponding CRM Middleware tables. Similarly, the subscriptions assigned to these sites can be obtained in the same way. The distribution criteria that are currently valid in CRM Middleware at the point of processing are applied to determine the selection values for the query, in accordance with the relevant publications entered in the generic variant definitions. This mechanism makes it possible for realignments and other changes to the selection criteria to be automatically considered for the BW connection.

The above methods can be used together in any combination within a variant definition. This makes it possible, for example, to create for all users of a query a variant definition that takes the period from the current date and the preceding 12 months (determined with the function module SMO2_VARIANT_DATE_CONVERSION) to select data for sales organization 1000 (constant value) and all customers from the zip code area assigned to the respective user (access to the subscription tables). Exceptions to this are also possible for individual users.

Generating Variants

When a BW request is executed, the variants are created in SAP BW. The name of a generated variant is made up of the prefix BWA_ and the user name. In this way, the variant BWA_MILLER is generated for user MILLER. This prefix is required so that generated variants do not overwrite any BW variants previously created manually with the same name as the user. If naming conflicts still occur in spite of this (on account of there already being user names starting with the prefix BWA_), the system issues a corresponding warning message that appears in the log. In such cases, you can use the User Links function (see Managing and Monitoring BW Requests for Mobile Clients) to define a different variant name for individual users.

Example

Example: Generic Variant Definition

 

 

 

Leaving content frame