Jan 21, 2013

Customer specific adjusting of BEx web-based variable screen


1 Introduction

The possibilities of adaptation of a web-based report dialog variables were previously restricted. About parameters of the WebTemplate and using the Web Design API that can be charged affects the behavior of Web Templates in the variables but not the layout and processing logic of the input

Figure 1.1: SAP Standard Variable Dialog

With patch NW730 BI JAVA SP08 Patch 30 (see also Note 1622306),

SAP offers a possibility the layout and processing logic for the following dialogues with respect to variable processing to adapt:
Variables
Dialogue
Filter

For customer-specific adaptation of the variables dialog, two alternative routes are available:
Customized formatting and positioning
Customer-specific layout and processing logic

The principle of implementation is the same for all kinds of adjustment. About a Web item types of Individual expansion of the BEx Web runtime, an HTML and / or JavaScript code segment (Snipplte) is passed. The BEx Web runtime replaces the standard SAP code passed by the code segments. Thus, the BEx Web runtime performs this replacement process, certain conditions must be met. I go even further down into the details of the implementation.

2 Customized formatting and positioning

The first way is to adjust the variable dialog customized, positioning to the individual elements of the variables dialog customized. For determining the positions of the individual elements can be any HTML tags are used. For the individual elements are patterns (pattern) are available which can be placed within a customized HTML text.

The following items are available:
Area variants
Areaersonalize
Eachvariable of the report
OK-Button
Check-Button

The pattern will be placed as a custom XML tags in customized HTML coding. The BEx Web runtime environment recognizes the pattern and replaces them with the necessary coding.

Figure 2.2 shows in (1) a custom dialog variables in the areas of personalization options and were just like the OK button and check positioned similar to the standard variable dialog.

The variables were divided into time-related variables, and not time-related variables. To better highlight this structure for each type, a separate group was formed.


Figure 2.1: Customer-specific formatting and positioning
Adjustment in (2) illustrates the use of more complex HTML components. Here, only the time-related variables shown directly and all other variables are hidden on a tray. This allows the variable dialog for reports with a lot of variables to be made ​​clearer and thus the ease of use increased.

The implementation of the component tray used here is purely on HTML and JavaScript, and needs no round-trip.

This representation could be achieved through a personalization that could not be controlled centrally.

3 Customer Individual Variable dialog
Another option is to adjust the variable dialog to make the layout and processing logic for each variable individually customized.

In this variant is not the SAP standard HTML coding of the entire variables dialogue replaced by customer-specific HTML coding but only the ranges for the input variable values. In the Variables dialog in Figure 3.1, the SAP standard HTML coding for the two variables CURRENT PREVIOUS YEAR PERIOD
YERA PERIOD and was replaced by customized HMTL code.


Figure 3.1: Individual customer's variables dialog

For the example implementation shown in Figure 3.1 has been deposited adjacent to the surface for the input of a very specific period still additional JavaScript code, through which a function of the two variables and PREVIOUS YEAR CURRENT PERIOD YEAR PERIOD was implemented.

Validation and adjustment of variable values

When entering a value for a period of two variables is automatically checked whether the variable value of the other period, according to custom rules, is still
valid. This is not the case; the value is adjusted according to the rules directly.

Such validation and adjustment is not possible without this extension, since it is in the customer exit in I_STEP 3 is not possible to override the values of the user.

Analogous to the implementation of a customized variables dialogue must also be replaced by a Web item types from individual extension of the SAP standard HTML code. In this variant, for each variable of a Web item types must Individual expansion in WebTemplate be deposited.

For the implementation of custom HTML code for some HTML elements are also patterns provided. For these HTML elements are patterns available:
Input Feld
Dropdown-Box
Label

The pattern is used to facilitate the creation of a portal layout compliant HTML code, but they are not to use it. Some properties of the extension can be customized via parameters from the Web item type Individual expansion in WebTemplate.

For each extension the BEx Web runtime environment add a standard variable input field automatically into the layout. About the Web item parameters, you can control whether the input field should be displayed above or below the user-defined layouts.

Standard input field
Using JavaScript, it is also possible to hide the standard input field. Important is that it is available within the HTML page. Also, the button for the F4 help can be hidden using JavaScript if it is not needed.

The aim of the implementation is to fill this field with the variable value.

Layout
In the current version you some adjustments at the layout of are necessary. This applies, for example, the width of the dialog variables; the height of the row in a customer-specific adaptation is embedded. Positioning of the standard input field for the variable value.

4 Customized F4 and filter dialogs
Another way of displaying variables is the customer-specific adaptation of the F4 and filter dialogs. Figure 4.1 shows two different implementations of an F4 input help dialog for the variable ZTK_0I0DAYS. In the above example, the values ​​are displayed with a reference period.

Dependencies between variables
The F4 help dialog is used explicitly for a variable. In this variant, it is not possible to influence the values of another with. Technically, the dialogue contains
an extra field that contains the value of the variable. This field is closely associated with the variable. The value of this field is passed when you close the dialog via the OK button of the dialog variables for exactly that variable. The extension replaces only the HTML code within the F4 help dialog.


Figure 4.1: Individual customers F4 and filter dialog

For each dialogue has its own Web item types of Individual expansion in WebTemplate provided. Here it is possible to reuse the implementation. You want an individual F4 help dialog for variable 0I_CALMONTH (based on 0CALMONTH) Implement. At the same time you want, however, that if the user in the report a filter to the feature 0CALMONTH applying the filter dialog has the analogous behavior as the F4 help dialog. You can do this in the Web item you both use the same implementation class. It is equally possible to implement different dialogues.

5 Implementation
The implementation of all the extensions described above is always the same principle. Figure 5.1 shows the architecture of the individual extensions.


Figure 5.1: Architecture – SAP Standard

The number of implementations of the Web item types of Individual expansion may increase due to the many possible combinations quickly. To every implementation of a Web item types of Individual expansion ever heard an implementing ABAP OO class.

Using a BAdI, the different implementations to be better organized and structured. It also provides the advanced architecture of the BAdI framework
the ability to create templates that simplify the implementation costs of new implementations and greatly shorten. Additionally, a fallback implementation is stored in the event that an implementation is not available.

Figure 5.2: Architecture - SAP standard with BAdI

~~~END~~~



No comments: