Thursday, December 22, 2011

TYPES OF ROUTINES

Types of Routines in BW


Routines are used to define complex transformation rules. In most of the cases data won’t be coming directly in desired form before sending to the target. In some cases output needs to be derived on some incoming data. In such cases we need to go for writing of routines at the transformation level.
There are four types of Routines available

  • Characteristic or Field Routine

  • Start Routine

  • End Routine

  • Expert Routine

The routine which we need to go for depends on when it needs to be executed. Suppose if some logic needs to be implemented before transformation then the start routine needs to be implemented.

Characteristic or Field Routine

It operates on a single record for a single characteristic or key figure. The value gets modified in the routine based on one or more source fields before it is transferred to the target

Start Routine
The start routine is run at the start of the transformation. The start routine has a table in the format of the source structure as input and output parameters. It is used to perform preliminary calculations and store these in a global data structure or in a table. This structure or table can be accessed from other routines. You can modify or delete data in the source_package .
For field routine it will act on each record but in start routine it will have all the data in source_package . In Start routine we will have the structure of the source fields.

End Routine
An end routine is a routine with a table in the target structure format as input and output parameters. You can use an end routine to postprocess data after transformation on a package-by-package basis. Data is stored in result_package.
End Routine is processed after start routine, mappings, field routines and finally before the values is transferred to the output. End routine has the structure of the target and result_package contains the entire data which finally is the output.

Expert Routine
An Expert routine is a routine with contains both the source and target structure. we can use Expert routine if there are not sufficient functions to perform transformation.
For Expert Routine every things needs to be written using coding. In simple an expert routine performs all the actions of Start Routine, Mappings, Field and End Routines.
In Expert Routine we will read from source_package which contains all the data and update into result_package which should be the output .

No comments:

Post a Comment