Powered By

Free XML Skins for Blogger

Powered by Blogger

Wednesday, July 9, 2008

BW BI Transformation Creating Routines

Prerequisites

If you previously worked with the ABAP form routines of the update rules and transfer rules, you have to familiarize yourself with the differences in working with routines in the transformation.

See Differences in Routine Concepts.

Procedure

You are in the routine editor. To create a routine, enter the following:

...

1. Between *$*$ begin of global ... and *$*$ end of global ... you can define the global data declarations 'CLASS DATA'. These are available in all routines. Data declarations with ‘DATA’ can only be accessed in the current package.

This means that you can use intermediate results in other routines, for example, or reuse results when you call a routine again at a later time.

Note

When you perform serial loads, one process instance is used for the entire request. In this case, data with the ‘CLASS DATA’ data declaration can be accessed for the entire request (all packages).

Several process instances are used when you perform parallel loads.

A single process instance can be used a more than once, depending on the number of data packages to be processed and the number of available process instances. This means that with parallel loads, data with the 'CLASS DATA' data declaration is not initialized for each data package and may still contain data from predecessor packages.

For this reason, use 'CLASS DATA' or 'DATA' for the global data, depending on the scenario.

In the routine editor, a maximum of 72 characters per line are currently permitted. Any additional characters are cut off when you save.

2. Enter your program code for the routine between *$*$ begin of routine ... and *$*$ end of routine... . For information about the parameters of the routine, see

Start Routine Parameters

Routine Parameters for Key Figures or Characteristics

End Routine Parameters

Do not use a SAP COMMIT (ABAP statement: COMMIT WORK) in your coding. When this statement is executed, the cursor that is used from the source for reading is lost. Use a DB COMMIT (call function module DB_COMMIT) instead or avoid using such COMMITs altogether.

3. Check the syntax of your routine.

4. Save the routine. You end the maintenance session for the routine by leaving the editor.

More Information:

Example: Start Routine

Example: Characteristic Routines

Example: End Routine

No comments:

Archives