Wednesday, July 27, 2016

Transformations and Routines

Global Variable in BW Routine
If you want data of a certain variable or internal table to be retained in all the infopackages with out being deleted or selecting them again. eg: adding a counter for all records,
we need to declare them as global variables.
The declaration is same as any other abap variable or internal table ( DATA: lv_flag TYPE c ), but place where you declare them makes all the difference.

In the routine, these should be declared right on the top, after the generated structure definition. system indicates the place.

*$*$ begin of global - insert your declaration only below this line  *-*
DATA gv_flag TYPE C.
*$*$ end of global - insert your declaration only before this line   *-*

No comments:

Post a Comment