Show TOC

Creating RoutinesLocate this document in the navigation structure

Prerequisites

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

See Differences in Routine Concepts.

Procedure
  1. You are in the transformation editing screen.

    • To create a start routine, choose Start Routine

    • To create an end routine, choose End Routine

    • To create a characteristic routine, double-click the characteristic in the transformation group to open the maintenance screen for the rule details. Select the rule type Routine.

  2. If you are creating a characteristic routine, the routine editor appears immediately. If you are creating a start routine or an end routine, you can first select fields that are to be updated. However, some fields are required for further processing, meaning that they must be updated. For details, see the F1 help.

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

    Between *$*$ begin of global ... and *$*$ end of global ..., you can define 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 number of times. This depends on the number of data packages that are to be processed and the number of process instances that are available. This means that with parallel loads too, data with the 'CLASS DATA' data declaration is not initialized for each data package and may still contain data from predecessor packages.

    Therefore use 'CLASS DATA' or 'DATA' for the global data, depending on the scenario.

    Note

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

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

  5. Check the syntax of your routine.

  6. Save the routine. You end the editing of the routine by leaving the editor.

See also:

Start Routine

Characteristic Routines

End Routine