Entering content frame

Function documentation Routines In the Transformation Locate the document in its SAP Library structure

Use

You use routines to define complex transformation rules.

Routines are local ABAP classes that consist of a predefined definition area and an implementation area. The TYPES for the inbound and outbound parameters and the signature of the method are determined in the definition area. The actual routine is created in the implementation area. In the method, ABAP object statements are available Upon generation, this method is embedded in the local class of the transformation program.

Routines are available as rule types; you can define a routine as a transformation rule for a key figure or a characteristic. For more information, see the Routine section under Rule Type.

In addition to routines as rule types, there are other types of routine with which you can implement additional transformations: the start routine, end routine and expert routine.

The following graphic shows the position of these routines in the data flow:

This graphic is explained in the accompanying text

Features

Start Routine

The start routine is run for each data package at the start of the transformation. The start routine does not have a return value. It is used to perform preliminary calculations and store these in a global data structure or in a table. You can access this structure or table from other routines. You can modify or delete data.

End Routine

An end routine is a routine with a table in the target structure format as an input parameter and an output parameter. You can use an end routine to execute the postprocessing of data after transformation on a package-by-package basis. For example, you can delete records that are not to be updated, or perform data checks.

Expert Routine

This type of routine is only intended for use in special cases. You can use the expert routine if there are not sufficient functions to perform a transformation. You can use the expert routine as an interim solution until the necessary functions are available in the standard routine.

You can use this to program the transformation yourself without using the available rule types. You must implement the message transfer to the monitor yourself.

If you have already created transformation rules, the system deletes them once you have created an expert routine.

 

 

Leaving content frame