Wednesday 15 July 2009

Boosting performance of START routine

There are several 'places' where custom made ABAP code can be added within a SAP BI system. One of those places is the START ROUTINE (of an update rule). Within such a start routine, the (incomming) data package can be altered/extended.
This alteration is usually done via 'looping' over the datapackage:

(AS IS)
loop at datapackage (into wa_datapackage).
   datapackage-field = 'new value'.
   modify datapackage.
endloop

The correct way of altering a data package, from a performance point of view, should be by using field symbols.

(TO BE)
field-symbols: < fs_dp > type data_package_structure.

loop at datapackage assigning < fs_dp >.
   < fs_dp >-field = 'new value'.
endloop

Within the TO BE situation, the modify datapackage statement is no longer required!

No comments:

Post a Comment