Powered By

Free XML Skins for Blogger

Powered by Blogger

Tuesday, August 5, 2008

BAdI: Customer-Defined Functions in the Formula Builder BW BI Transformation Rule Type

Use

You can integrate self-defined functions in the transformation library of the formula builder. In doing so, you can also make special functions available for frequent use that are not contained in the transformation library. The Business Add-In RSAR_CONNECTOR is available for this. For more information about using Business Add-Ins (BAdIs), see Classic BAdls.

Procedure

Implementing the BAdI

...

To implement a BAdI, see Implementing a Classic BAdl. The specific special features for the implementation of the BAdI RSAR_CONNECTOR are described below.

1. Call transaction SE19. Enter RSAR_CONNECTOR as the name for the Add-In, for which you want to create the implementation.

By double-clicking the method (GET), the class builder appears. You can enter your coding for implementing the enhancement. For more information, see Structure of Implementation of a Functionand Implementation of a Category.

A function does not have a type. Therefore, the TYPE field of structure SFBEOPRND cannot be filled.

2. Save and activate your implementation.

Naming Conventions

The technical name of a self-defined function:

cannot be empty

must be consistent

must begin with ‘C_’

can only contain alphanumeric characters, that is, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_' (small letters, blank spaces and special characters are not allowed)

can have a maximum of 61 characters

Implementing the Methods

The ABAP methods specified in the function description under class and method are called later in maintenance and formula evaluation. Therefore, the customer-defined functions must additionally be implemented as methods for BAdI implementation in an additional class. These methods must have the following properties:

They are declared static and public.

They can only have importing, exporting, and returning parameters. Changing parameters are not permitted.

They can only have one exporting or returning parameter.

Exporting parameters cannot have a generic type.

In the methods, you can use ABAP code to implement the function.

The system does not check whether the class or method specified in BAdI implementation actually exists. If a class or method does not exist, a runtime error occurs when the function is used in the formula builder.

Result

The functions you have defined are available in the transformation library in the Customer-Defined Functions selection.

No comments:

Archives